• 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
Issue with dashes in config settings
#1
Hi,

I am having issues with dashes in some settings. For example, e-mail addresses with dashes are not accepted in the "smtp-user" setting. Also, for the "wunderground" protocol, "location" names with dashes are rejected with the error message "ilight-daemon: ERROR: config device setting #2 "id" of "outside", invalid". This latter point, in particular, is annoying if one lives in a city with dashes in the name. Weather Underground accepts this name in a direct API call, but pilight rejects it before even trying to call the api it seems. Any suggestions?

Cheers,

Tobias Isenberg
 
Reply
#2
What's a dash? :p
 
Reply
#3
@curlymo, the "-" symbol, https://en.wikipedia.org/wiki/Dash.

@isenberg, Can you post examples for all these configuration issues please?
 
Reply
#4
Here is an example for the Weather Underground issue:

City: Saint-Étienne, France

WU API call: http://api.wunderground.com/api/00000000...ienne.json

-> works with a valid API key

config file:

Code:
{
    "devices": {
        "outsideWU": {
            "protocol": [ "wunderground" ],
            "id": [{
                "api": "0000000000000000",
                "location": "saint-etienne",
                "country": "fr"
            }],
            "humidity": 67,
            "temperature": 13.00,
            "sunrise": 7.22,
            "sunset": 20.26,
            "sun": "rise",
            "update": 0,
            "poll-interval": 1200
        }
    },
    "rules": {},
    "gui": {
        "outsideWU": {
            "name": "WU Weather",
            "group": [ "Outside" ],
            "media": [ "all" ],
            "temperature-decimals": 1,
            "humidity-decimals": 1
        }
    },
    "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,
        "whitelist": "*.*.*.*"
    },
    "hardware": {
        "433gpio": {
            "sender": 0,
            "receiver": 1
        }
    },
    "registry": {
        "pilight": {
            "version": {
                "current": "7.0"
            }
        }
    }
}

-> does not work; error message:

pilight-daemon: ERROR: config device setting #2 "id" of "outsideWU", invalid

The same script works with a town name without a dash.

Any help would be appreciated.

Tobias Isenberg

PS: I solved the other issue with the dash in the e-mail by using an address without a dash. Not a solution but a work-around. But I cannot rename official city names ... Confused
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  ERROR: failed to read config. stack: 2 Stefan 6 568 02-03-2020, 09:37 PM
Last Post: curlymo
  raspberry pi 4 config.json Stefan 2 521 02-02-2020, 09:59 AM
Last Post: Stefan
  Issue with dimmer ITLR-300 genfersee 5 799 05-02-2019, 10:47 AM
Last Post: genfersee
  Config migration from pilight 7 .0 to 8.1.3 "Rules" Nonaamee 4 1,403 11-17-2018, 08:35 PM
Last Post: Nonaamee
  Dimmer issue when Homebridge is running genfersee 3 1,105 03-13-2018, 07:43 PM
Last Post: curlymo
  Dependency issue while installing pilight 8 from repository nightlight 5 2,782 11-06-2017, 03:36 PM
Last Post: nightlight
Smile config, device uuid <-> id Twain 2 1,587 06-22-2017, 05:49 PM
Last Post: Twain
  ERROR: config is not in a valid json format Sisko4 6 2,143 03-27-2017, 08:24 AM
Last Post: Sisko4
  config device #1 "living", missing protocol jjlf 5 2,428 11-08-2016, 11:55 PM
Last Post: jjlf
  pilight not starting with edited config departet 4 2,206 08-12-2016, 09:52 PM
Last Post: departet

Forum Jump:


Browsing: 1 Guest(s)