• 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
HELP - New Config in V6.x
#1
Hi all,

I have big problems with the new config-file in version 6, first i always got a empty config-json file after starting v6 with the config from v5 and after i edited the config.json i now get alway "pilight-daemon: ERROR: config is not in a valid json format".
I checked the json and it's valid.
Could someone help me out? - I have to get this thing running again as it is stearing a friends terrarium together with pimatic :-o


It would also be an option if someone could give me a hint on how to install the old pilight version that my old configs are working again as it was working perfect before.


My config.json:

Code:
{
    "devices": {
    
      "tempterrarium1":{
         "name":"Temp / Hygro KLO",
         "protocol":[
            "dht22"
         ],
         "id":[
            {
               "gpio":5
            }
         ],
         "humidity":361,
         "temperature":252,
         "poll-interval":45,
         "device-humidity-offset":23,
         "device-temperature-offset":2
      },
      "tempterrarium2":{
         "name":"Temp / Hygro KLU",
         "protocol":[
            "dht22"
         ],
         "id":[
            {
               "gpio":2
            }
         ],
         "humidity":359,
         "temperature":257,
         "poll-interval":45,
         "device-humidity-offset":23,
         "device-temperature-offset":2
      },
      "tempterrarium3":{
         "name":"Temp / Hygro WRO",
         "protocol":[
            "dht22"
         ],
         "id":[
            {
               "gpio":3
            }
         ],
         "humidity":323,
         "temperature":272,
         "poll-interval":45,
         "device-humidity-offset":23,
         "device-temperature-offset":2
      },
      "tempterrarium4":{
         "name":"Temp / Hygro WRU",
         "protocol":[
            "dht22"
         ],
         "id":[
            {
               "gpio":4
            }
         ],
         "humidity":340,
         "temperature":277,
         "poll-interval":45,
         "device-humidity-offset":23,
         "device-temperature-offset":2
      },
      "wunderground":{
         "name":"Wetter Bülach",
         "protocol":[
            "wunderground"
         ],
         "id":[
            {
               "api":"5e0ef8fb250deefb",
               "location":"bulach",
               "country":"ch"
            }
         ],
         "humidity":5100,
         "temperature":1400,
         "sunrise":627,
         "sunset":2023,
         "sun":"rise",
         "poll-interval":900
      },
      "wunderground2":{
         "name":"Wetter Australien",
         "protocol":[
            "wunderground"
         ],
         "id":[
            {
               "api":"5e0ef8fb250deefb",
               "location":"windorah",
               "country":"au"
            }
         ],
         "humidity":4000,
         "temperature":1900,
         "sunrise":646,
         "sunset":1809,
         "sun":"rise",
         "poll-interval":900
      },
      "switch1":{
         "name":"Wärmelampe_70W",
         "protocol":[
            "kaku_switch"
         ],
         "id":[
            {
               "id":7203866,
               "unit":0
            }
         ],
         "state":"on"
      },
      "switch2":{
         "name":"Wärmelampe_50W",
         "protocol":[
            "kaku_switch"
         ],
         "id":[
            {
               "id":7203866,
               "unit":1
            }
         ],
         "state":"on"
      },
      "switch3":{
         "name":"LED",
         "protocol":[
            "kaku_switch"
         ],
         "id":[
            {
               "id":7203866,
               "unit":2
            }
         ],
         "state":"on"
      },
      "switch4":{
         "name":"Kühlung",
         "protocol":[
            "kaku_switch"
         ],
         "id":[
            {
               "id":7203866,
               "unit":12
            }
         ],
         "state":"on"
      },
      "switch5":{
         "name":"Luftbefeuchter",
         "protocol":[
            "kaku_switch"
         ],
         "id":[
            {
               "id":7203866,
               "unit":13
            }
         ],
         "state":"off"
      },
      "switch6":{
         "name":"7Links Webcam",
         "protocol":[
            "kaku_switch"
         ],
         "id":[
            {
               "id":7203866,
               "unit":14
            }
         ],
         "state":"on"
      },
      "dimmer":{
         "name":"Heizung",
         "protocol":[
            "kaku_dimmer"
         ],
         "id":[
            {
               "id":7203866,
               "unit":3
            }
         ],
         "state":"on",
         "dimlevel":2
      }
      },
    "gui": { },
    "settings": {
        "log-level": 4,
        "pid-file": "/var/run/pilight.pid",
        "log-file": "/var/log/pilight.log",
        "send-repeats": 10,
        "receive-repeats": 1,
        "webserver-enable": 1,
        "webserver-root": "/usr/local/share/pilight/",
        "webserver-port": 5001,
        "webserver-cache": 1,
        "whitelist": "",
        "firmware-update": 0
    },
    "hardware": {
        "433gpio": {
            "sender": 0,
            "receiver": 1
        }
    },
    "registry": { }
}

Thanks in advance
Marcel
 
Reply
#2
There are some issues with your config:
1) In pilight 6, device no longer have a "name" key
2) There seem to be some issues with your indenting (just before the "gui" section key
3) If you want to have the device in your pilight web interface, you need to have a gui definition for all devices in the gui section
 
Reply
#3
thanks, will try to remove the name key :-)
about the gui i know, i do not need it in first instance as pimatic is the gui we work with, but if pilight is starting up i will also try to configure the gui section.
 
Reply
#4
It shouldn't make a difference if they are defined in the GUI section or not.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  invalid config file when using dimlevel-minimum or dimlevel-maximum ro.m 3 733 06-12-2018, 03:54 PM
Last Post: curlymo
  Config issues from development to stable 8.0 terrar 5 1,771 10-28-2017, 09:56 AM
Last Post: curlymo
Question [SOLVED]pilight-daemon: ERROR: config is not in a valid json format herrmeier 4 7,691 11-28-2015, 11:28 PM
Last Post: herrmeier
  Problem on config.json aXpi 14 7,298 10-14-2015, 09:13 PM
Last Post: curlymo
  How to merge old settings and config? Aweponken 5 3,021 03-27-2015, 08:02 PM
Last Post: Aweponken
  config protocol 'program' - stop-command for Flamingo Workaround flowolf 1 3,163 02-13-2015, 01:39 PM
Last Post: Flexzuu
  problems in config.json ejverf 3 2,987 12-14-2014, 07:46 PM
Last Post: ejverf
  ASUN-650 config vorkiej 0 1,776 10-26-2014, 04:57 PM
Last Post: vorkiej
Question pilight-send or pilight-control --> update config.json terrar 3 3,451 10-23-2014, 07:52 PM
Last Post: curlymo
  SOLVED - Config file does not work after upgrade to 5.0 Jeroenk 6 4,851 10-12-2014, 08:49 PM
Last Post: Jeroenk

Forum Jump:


Browsing: 1 Guest(s)