• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ERROR: config is not in a valid json format
#1
So i got this problem after hours of getting this software to work.
I am now at a point, where i want to purge this software and use my sockets with the included remote, it is not worth that much work to get one of three switches to work...

I edited the config.json like the manual says, but i can´t get it to work because of an invalid format...

What did i do wrong?


.jpg   pilight.jpg (Size: 155.81 KB / Downloads: 14)
 
Reply
#2
Hi,

try this :

Code:
{
    "devices": {
        "Schalter2": {
            "protocol": [ "elro_800_switch" ],
            "id": [{
                "systemcode": 13,
                "unitcode": 2
            }],
            "state": "off"
        }
    },
    "rules": {},
    "gui": {
        "Schalter2": {
            "name": "Schalter 2",
            "group": [ "Schalter" ],
            "media": [ "all" ],
            "readonly": 0
        }
    },
    "settings": {
        "log-level": 6,
        "pid-file": "/var/run/pilight.pid",
        "log-file": "/var/log/pilight.log",
        "webserver-enable": 1,
        "webserver-root": "/usr/local/share/pilight/",
        "webserver-http-port": 5001,
        "webserver-cache": 1
    },
    "hardware": {
        "433gpio": {
            "sender": 0,
            "receiver": 1
        }
    },
    "registry": {
        "pilight": {
            "version": {
                "current": "7.0"
            }
        }
    }
}

Errors in your Version : systemcode,unitcode and missing commas...

Marc
 
Reply
#3
Fix the json syntax. As it may happen more often, just google for "json valid syntax" and use the 3rd party json validator.
 
Reply
#4
Okay, it happened again and i don´t know why...

Just added my other two sockets.


Attached Files
.jpg   again.jpg (Size: 139.87 KB / Downloads: 11)
 
Reply
#5
Have a look at http://www.jsonlint.com, it'll show you where your syntax errors are. At the moment, you're missing commas between your device definitions.
 
Reply
#6
I think he has a problem to copy the config file to the validator....

@Sisko4
what terminal prog do you use for editing the config files ?

Here are your errors in your last screenshots, see attachment... :

Marc


Attached Files
.jpg   again2.jpg (Size: 82.16 KB / Downloads: 12)
 
Reply
#7
Aaaaaa thanks, i saw that config at other sites that installed them, but there were no commas at those points.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  pilight usb nano format conversion ettman8 2 348 07-14-2019, 08:32 AM
Last Post: curlymo
  Config migration from pilight 7 .0 to 8.1.3 "Rules" Nonaamee 4 791 11-17-2018, 08:35 PM
Last Post: Nonaamee
  error pilightsend, recieve and control hansipi 2 425 11-04-2018, 03:46 PM
Last Post: hansipi
  Error with loading LPF firmware Rschnauzer 14 6,854 02-10-2018, 04:21 PM
Last Post: Rschnauzer
  generic_dimmer error / or not visible in 8.0.5 terrar 13 1,489 01-16-2018, 10:04 PM
Last Post: terrar
  pilight does no longer start because of hardware error stratege-0815 2 971 12-27-2017, 11:16 PM
Last Post: stratege-0815
  ERROR: uv_custom_poll_cb: bad file descriptor Gisto 6 1,460 12-19-2017, 03:03 PM
Last Post: Gisto
  [Solved] Error manual compiling Thuurke 2 1,145 09-02-2017, 05:06 PM
Last Post: Thuurke
Smile config, device uuid <-> id Twain 2 1,161 06-22-2017, 05:49 PM
Last Post: Twain
  Setup.sh CMAKE error ripper121 0 769 02-09-2017, 09:22 AM
Last Post: ripper121

Forum Jump:


Browsing: 1 Guest(s)