• 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
  ERROR: failed to read config. stack: 2 Stefan 6 181 02-03-2020, 09:37 PM
Last Post: curlymo
  raspberry pi 4 config.json Stefan 2 146 02-02-2020, 09:59 AM
Last Post: Stefan
  Raspberry 4B installation error royw 3 281 12-05-2019, 10:58 AM
Last Post: royw
  pilight error after update to 8.1.5 on Odroid C2 WitchDoctor 3 362 11-29-2019, 09:56 PM
Last Post: curlymo
  "FOR '2 MINUTE' FROM off" resulting in error hansrijn2 5 323 11-15-2019, 02:04 PM
Last Post: hansrijn2
  433gpio platform error after raspbian dist upgrade HuberDe 2 432 10-12-2019, 07:35 PM
Last Post: HuberDe
  pilight usb nano format conversion ettman8 2 703 07-14-2019, 08:32 AM
Last Post: curlymo
  Config migration from pilight 7 .0 to 8.1.3 "Rules" Nonaamee 4 1,079 11-17-2018, 08:35 PM
Last Post: Nonaamee
  error pilightsend, recieve and control hansipi 2 592 11-04-2018, 03:46 PM
Last Post: hansipi
  Error with loading LPF firmware Rschnauzer 14 7,501 02-10-2018, 04:21 PM
Last Post: Rschnauzer

Forum Jump:


Browsing: 1 Guest(s)