• 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
[Fixed] GPIO at second (clientized) node isn't triggered
#1
Hello,

I believe I followed http://www.pilight.org/getting-started/adhoc-network/ but it's not working as expected for me.

Only difference:
The setting at Node B is basically the same as Node A except that WebUI is disabled with "0". If I remove the webserver stuff, it comes up with an error, so documentation needs an update for my opinion:
Code:
root@squeezeplug:/etc/pilight# pilight-daemon -D
[Apr 09 00:03:10:468670] pilight-daemon: ERROR: setting "port" and "webserver-port" cannot be the same

I've Node A with RF Sender and Relays which can successfully be triggered via pilight-control/webui or other clients.

Node B has only a relay connected currently. But here starts the problem, I can trigger the relay fine when Node B is the standalone but not when it's in client mode. Neither with or without UUIDs set at config.

Also the rpi_temp protocol is setup for both Nodes including UUID, but always both entries are updated with same values from Node A. I don't see the Node B is polling temperature at all.

So I may miss(interpreted) some basic stuff, any idea why GPIO and Node B (Client) is not triggered. Even running pilight-control at this host doesn't work.

Below the Debug including the configs if necessary.

Thanks for looking at it.
Regards Martin

Code:
Node A
pi@raspberrypi ~ $ pilight-uuid
0302-00-00-02-000300

Node B
root@squeezeplug:~# pilight-uuid
0329-00-00-29-000300

Node A
Code:
pi@raspberrypi ~ $ sudo pilight-daemon -D
[Apr 09 00:09:53:818521] pilight-daemon: DEBUG: ssdp sent search
[Apr 09 00:09:53:917216] pilight-daemon: NOTICE: no pilight daemon found, daemonizing
[Apr 09 00:09:53:927720] pilight-daemon: DEBUG: -- start parsed config file --
{
    "outside": {
        "name": "Garten",
        "order": 1,
        "lampe": {
            "name": "Lampe",
            "order": 1,
            "type": 1,
            "uuid": "0302-00-00-02-000300",
            "origin": "0302-00-00-02-000300",
            "protocol": [ "elro_he" ],
            "id": [{
                "systemcode": 31,
                "unitcode": 1
            }],
            "state": "off",
            "settings": {
                "readonly": 0,
                "states": "on,off"
            }
        },
        "relay1": {
            "name": "Relay1",
            "order": 2,
            "type": 4,
            "uuid": "0302-00-00-02-000300",
            "origin": "0302-00-00-02-000300",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 17
            }],
            "state": "off",
            "settings": {
                "readonly": 0,
                "states": "on,off",
                "default": "off"
            }
        },
        "relay2": {
            "name": "Relay2",
            "order": 3,
            "type": 4,
            "uuid": "0302-00-00-02-000300",
            "origin": "0302-00-00-02-000300",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 18
            }],
            "state": "off",
            "settings": {
                "readonly": 0,
                "states": "on,off",
                "default": "off"
            }
        },
        "relay3": {
            "name": "Relay3",
            "order": 4,
            "type": 4,
            "uuid": "0302-00-00-02-000300",
            "origin": "0302-00-00-02-000300",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 19
            }],
            "state": "off",
            "settings": {
                "readonly": 0,
                "states": "on,off",
                "default": "off"
            }
        },
        "relay4": {
            "name": "Relay4",
            "order": 5,
            "type": 4,
            "uuid": "0302-00-00-02-000300",
            "origin": "0302-00-00-02-000300",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 20
            }],
            "state": "off",
            "settings": {
                "readonly": 0,
                "states": "on,off",
                "default": "off"
            }
        },
        "sound": {
            "name": "Außenlautsprecher",
            "order": 6,
            "type": 4,
            "uuid": "0329-00-00-29-000300",
            "origin": "0302-00-00-02-000300",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 0
            }],
            "state": "off",
            "settings": {
                "readonly": 0,
                "states": "on,off",
                "default": "off"
            }
        },
        "temperature": {
            "name": "Außentemperatur",
            "order": 7,
            "type": 3,
            "uuid": "0302-00-00-02-000300",
            "origin": "0302-00-00-02-000300",
            "protocol": [ "dht22" ],
            "id": [{
                "gpio": 0
            }],
            "humidity": 320,
            "temperature": 68,
            "settings": {
                "interval": 120,
                "battery": 0,
                "temperature": 1,
                "humidity": 1,
                "decimals": 1
            }
        },
        "temperature1": {
            "name": "Gewaechshaus",
            "order": 8,
            "type": 3,
            "uuid": "0302-00-00-02-000300",
            "origin": "0302-00-00-02-000300",
            "protocol": [ "dht22" ],
            "id": [{
                "gpio": 4
            }],
            "humidity": 860,
            "temperature": 56,
            "settings": {
                "interval": 120,
                "battery": 0,
                "temperature": 1,
                "humidity": 1,
                "decimals": 1
            }
        },
        "rasp_outside": {
            "name": "Raspberry Temp outside",
            "order": 9,
            "type": 3,
            "uuid": "0302-00-00-02-000300",
            "origin": "0302-00-00-02-000300",
            "protocol": [ "rpi_temp" ],
            "id": [{
                "id": 1
            }],
            "temperature": 33628,
            "settings": {
                "interval": 120,
                "battery": 0,
                "temperature": 1,
                "humidity": 0,
                "decimals": 3
            }
        }
    },
    "inside": {
        "name": "Haus",
        "order": 2,
        "lampe1": {
            "name": "EckLampe",
            "order": 1,
            "type": 1,
            "uuid": "0302-00-00-02-000300",
            "origin": "0302-00-00-02-000300",
            "protocol": [ "elro_he" ],
            "id": [{
                "systemcode": 21,
                "unitcode": 1
            }],
            "state": "off",
            "settings": {
                "readonly": 0,
                "states": "on,off"
            }
        },
        "rasp_inside": {
            "name": "Raspberry Temp inside",
            "order": 2,
            "type": 3,
            "uuid": "0329-00-00-29-000300",
            "origin": "0302-00-00-02-000300",
            "protocol": [ "rpi_temp" ],
            "id": [{
                "id": 1
            }],
            "temperature": 33628,
            "settings": {
                "interval": 120,
                "battery": 0,
                "temperature": 1,
                "humidity": 0,
                "decimals": 3
            }
        }
    }
}
[Apr 09 00:09:53:931654] pilight-daemon: DEBUG: -- end parsed config file --
[Apr 09 00:09:53:932093] pilight-daemon: INFO: daemon listening to port: 5000
[Apr 09 00:09:53:940935] pilight-daemon: DEBUG: new thread webserver daemon, 1 thread running
[Apr 09 00:09:53:941378] pilight-daemon: DEBUG: new thread 433gpio, 2 threads running
[Apr 09 00:09:53:941731] pilight-daemon: DEBUG: new thread updater, 3 threads running
[Apr 09 00:09:53:942080] pilight-daemon: DEBUG: new thread broadcaster, 4 threads running
[Apr 09 00:09:53:942427] pilight-daemon: DEBUG: new thread sender, 5 threads running
[Apr 09 00:09:53:942773] pilight-daemon: DEBUG: new thread ssdp, 6 threads running
[Apr 09 00:09:53:943137] pilight-daemon: DEBUG: new thread socket, 7 threads running
[Apr 09 00:09:53:943501] pilight-daemon: DEBUG: new thread rpi_temp, 8 threads running
[Apr 09 00:09:53:943854] pilight-daemon: DEBUG: new thread dht22, 9 threads running
[Apr 09 00:09:53:944204] pilight-daemon: DEBUG: new thread dht22, 10 threads running
[Apr 09 00:09:53:945056] pilight-daemon: INFO: webserver listening to port: 5001
[Apr 09 00:09:53:949749] pilight-daemon: DEBUG: new thread webserver broadcast, 11 threads running
[Apr 09 00:09:53:950192] pilight-daemon: DEBUG: new thread webserver client, 12 threads running
[Apr 09 00:09:53:950973] pilight-daemon: DEBUG: ssdp sent search
[Apr 09 00:09:53:951659] pilight-daemon: DEBUG: ssdp sent notify
[ Apr 09 00:09:54:48243] pilight-daemon: DEBUG: socket write succeeded: {"message":"client gui"}

[ Apr 09 00:09:54:48819] pilight-daemon: INFO: new client, ip: 192.168.0.155, port: 46314
[ Apr 09 00:09:54:49042] pilight-daemon: DEBUG: client fd: 11
[ Apr 09 00:09:54:49190] pilight-daemon: DEBUG: client id: 0
[ Apr 09 00:09:54:49442] pilight-daemon: DEBUG: socket recv: {"message":"client gui"}
[ Apr 09 00:09:54:50020] pilight-daemon: DEBUG: socket write succeeded: {"message":"accept client"}

[ Apr 09 00:09:54:50395] pilight-daemon: INFO: client recognized as gui
[Apr 09 00:09:54:948612] pilight-daemon: DEBUG: socket write succeeded: {"origin":"config","type":3,"uuid":"0302-00-00-02-000300","devices":{"outside":[ "rasp_outside" ],"inside":[ "rasp_inside" ]},"values":{"temperature":33628,"temperature":33628}}

[Apr 09 00:09:54:949309] pilight-daemon: DEBUG: broadcasted: {"origin":"config","type":3,"uuid":"0302-00-00-02-000300","devices":{"outside":[ "rasp_outside" ],"inside":[ "rasp_inside" ]},"values":{"temperature":33628,"temperature":33628}}
[Apr 09 00:09:54:949555] pilight-daemon: DEBUG: broadcasted: {"code":{"id":1,"temperature":33628},"origin":"receiver","protocol":"rpi_temp"}
[Apr 09 00:09:55:477856] pilight-daemon: DEBUG: socket write succeeded: {"origin":"config","type":3,"uuid":"0302-00-00-02-000300","devices":{"outside":[ "temperature1" ]},"values":{"humidity":852,"temperature":56}}

[Apr 09 00:09:55:478473] pilight-daemon: DEBUG: broadcasted: {"origin":"config","type":3,"uuid":"0302-00-00-02-000300","devices":{"outside":[ "temperature1" ]},"values":{"humidity":852,"temperature":56}}
[Apr 09 00:09:55:478707] pilight-daemon: DEBUG: broadcasted: {"code":{"gpio":4,"temperature":56,"humidity":852},"origin":"receiver","protocol":"dht22"}
[Apr 09 00:09:55:479368] pilight-daemon: DEBUG: socket write succeeded: {"origin":"config","type":3,"uuid":"0302-00-00-02-000300","devices":{"outside":[ "temperature" ]},"values":{"humidity":324,"temperature":68}}

[Apr 09 00:09:55:479948] pilight-daemon: DEBUG: broadcasted: {"origin":"config","type":3,"uuid":"0302-00-00-02-000300","devices":{"outside":[ "temperature" ]},"values":{"humidity":324,"temperature":68}}
[Apr 09 00:09:55:480179] pilight-daemon: DEBUG: broadcasted: {"code":{"gpio":0,"temperature":68,"humidity":324},"origin":"receiver","protocol":"dht22"}

Node B
Code:
root@squeezeplug:/etc/pilight# pilight-daemon -D
[ Apr 09 00:10:25:57341] pilight-daemon: DEBUG: ssdp sent search
[Apr 09 00:10:25:162314] pilight-daemon: NOTICE: a pilight daemon was found, clientizing
[Apr 09 00:10:25:171467] pilight-daemon: DEBUG: new thread 433gpio, 1 thread running
[Apr 09 00:10:25:171907] pilight-daemon: DEBUG: new thread broadcaster, 2 threads running
[Apr 09 00:10:25:172346] pilight-daemon: DEBUG: new thread sender, 3 threads running
[Apr 09 00:10:25:172697] pilight-daemon: DEBUG: new thread node, 4 threads running
[Apr 09 00:10:25:173431] pilight-daemon: DEBUG: ssdp sent search
[Apr 09 00:10:25:285733] pilight-daemon: DEBUG: socket write succeeded: {"message":"client node","uuid":"0329-00-00-29-000300"}

[Apr 09 00:10:25:292726] pilight-daemon: DEBUG: socket recv: {"message":"accept client"}

[Apr 09 00:10:25:293126] pilight-daemon: DEBUG: socket write succeeded: {"message":"request config"}

[Apr 09 00:10:25:304149] pilight-daemon: DEBUG: socket recv: {"config":{"outside":{"name":"Garten","order":1,"lampe":{"name":"Lampe","order":1,"type":1,"uuid":"0302-00-00-02-000300","origin":"0302-00-00-02-000300","protocol":[ "elro_he" ],"id":[ {"systemcode":31,"unitcode":1} ],"state":"off","settings":{"readonly":0,"states":"on,off"}},"relay1":{"name":"Relay1","order":2,"type":4,"uuid":"0302-00-00-02-000300","origin":"0302-00-00-02-000300","protocol":[ "relay" ],"id":[ {"gpio":17} ],"state":"off","settings":{"readonly":0,"states":"on,off","default":"off"}},"relay2":{"name":"Relay2","order":3,"type":4,"uuid":"0302-00-00-02-000300","origin":"0302-00-00-02-000300","protocol":[ "relay" ],"id":[ {"gpio":18} ],"state":"off","settings":{"readonly":0,"states":"on,off","default":"off"}},"relay3":{"name":"Relay3","order":4,"type":4,"uuid":"0302-00-00-02-000300","origin":"0302-00-00-02-000300","protocol":[ "relay" ],"id":[ {"gpio":19} ],"state":"off","settings":{"readonly":0,"states":"on,off","default":"off"}},"relay4":{"name":"Relay4","order":5,"type":4,"uuid":"0302-00-00-02-000300","origin":"0302-00-00-02-000300","protocol":[ "relay" ],"id":[ {"gpio":20} ],"state":"off","settings":{"readonly":0,"states":"on,off","default":"off"}},"sound":{"name":"Außenlautsprecher","order":6,"type":4,"uuid":"0329-00-00-29-000300","origin":"0302-00-00-02-000300","protocol":[ "relay" ],"id":[ {"gpio":0} ],"state":"off","settings":{"readonly":0,"states":"on,off","default":"off"}},"temperature":{"name":"Außente
[Apr 09 00:10:25:306940] pilight-daemon: DEBUG: socket recv: mperatur","order":7,"type":3,"uuid":"0302-00-00-02-000300","origin":"0302-00-00-02-000300","protocol":[ "dht22" ],"id":[ {"gpio":0} ],"humidity":324,"temperature":68,"settings":{"interval":120,"battery":0,"temperature":1,"humidity":1,"decimals":1}},"temperature1":{"name":"Gewaechshaus","order":8,"type":3,"uuid":"0302-00-00-02-000300","origin":"0302-00-00-02-000300","protocol":[ "dht22" ],"id":[ {"gpio":4} ],"humidity":852,"temperature":56,"settings":{"interval":120,"battery":0,"temperature":1,"humidity":1,"decimals":1}},"rasp_outside":{"name":"Raspberry Temp outside","order":9,"type":3,"uuid":"0302-00-00-02-000300","origin":"0302-00-00-02-000300","protocol":[ "rpi_temp" ],"id":[ {"id":1} ],"temperature":33628,"settings":{"interval":120,"battery":0,"temperature":1,"humidity":0,"decimals":3}}},"inside":{"name":"Haus","order":2,"lampe1":{"name":"EckLampe","order":1,"type":1,"uuid":"0302-00-00-02-000300","origin":"0302-00-00-02-000300","protocol":[ "elro_he" ],"id":[ {"systemcode":21,"unitcode":1} ],"state":"off","settings":{"readonly":0,"states":"on,off"}},"rasp_inside":{"name":"Raspberry Temp inside","order":2,"type":3,"uuid":"0329-00-00-29-000300","origin":"0302-00-00-02-000300","protocol":[ "rpi_temp" ],"id":[ {"id":1} ],"temperature":33628,"settings":{"interval":120,"battery":0,"temperature":1,"humidity":0,"decimals":3}}}},"version":[ "3.0", "3.0" ],"firmware":{"version":0,"hpf":0,"lpf":0}}
 
#2
Please post your settings for both nodes and please upgrade to the latest development code.
 
#3
I've just added the dev part of config to Node A.

Latest development means for git or apt package. I believe git, as apt.pilight.org didn't changed for some time.

Regards Martin

Node A:
Code:
{
    "port": 5000,
    "log-level": 4,
    "pid-file": "/var/run/pilight.pid",
    "config-file": "/etc/pilight/config.json",
    "hardware-file": "/etc/pilight/hardware.json",
    "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,
    "webserver-authentication": 0,
    "webserver-username": "",
    "webserver-password": "",
    "whitelist": "",
    "update-check": 1,
    "update-mirror": "http://apt.pilight.org/mirror.txt",
    "update-development": 1
}

Node B
- tried with and without config file set
Code:
{
    "log-level": 4,
    "pid-file": "/var/run/pilight_inside.pid",
    "config-file": "/etc/pilight/config.json",
    "hardware-file": "/etc/pilight/hardware.json",
    "log-file": "/var/log/pilight-inside.log",
    "send-repeats": 10,
    "receive-repeats": 1,
    "webserver-enable": 0,
    "webserver-root": "/usr/local/share/pilight",
    "webserver-port": 5001,
    "webserver-cache": 1,
    "webserver-authentication": 0,
    "webserver-username": "",
    "webserver-password": "",
    "whitelist": "",
    "update-check": 1
}
 
#4
Latest git dev version.

Can you also post the config.
 
#5
Hi,

looks great now with latest git dev. GPIO is working and rpi_temp as well after I changed the ID which was the same for both. So layer 8 error here Wink, so just adding UUID doesn't work.

Also to get it working a few changes were required:

settings.json
- removal of webauthentication
- removal of webuser and password

Code:
[Apr 09 21:20:48:296972] pilight-daemon: ERROR: setting "webserver-authentication" is invalid

config.json
- settings - interval is replaced with poll-interval for rpi_temp and dht22
Code:
[Apr 09 20:57:22:882494] pilight-daemon: ERROR: setting #6 "settings" of "temperature", invalid

- naming rasp_outside required a number, so just removed underscore
Code:
[Apr 09 21:02:50:984085] pilight-daemon: ERROR: device #10 "rasp_outside" of "outside", not alphanumeric

- uuid changed and had to be updated

In case someone wants to look at config:
Code:
{
    "outside": {
        "name": "Garten",
        "lampe": {
            "name": "Lampe",
            "protocol": [ "elro_he" ],
            "id": [{
                "systemcode": 31,
                "unitcode": 1
            }],
            "state": "off"
        },
        "relay1": {
            "name": "Relay1",
            "uuid": "0000-00-00-ab-864006",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 17
            }],
            "state": "off"
        },
        "relay2": {
            "name": "Relay2",
            "uuid": "0000-00-00-ab-864006",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 18
            }],
            "state": "off"
        },
        "relay3": {
            "name": "Relay3",
            "uuid": "0000-00-00-ab-864006",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 19
            }],
            "state": "off"
        },
        "relay4": {
            "name": "Relay4",
            "uuid": "0000-00-00-ab-864006",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 20
            }],
            "state": "off"
        },
        "sound": {
            "name": "Außenlautsprecher",
            "uuid": "0000-00-00-08-0340c5",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 0
            }],
            "state": "off"
        },
        "temperature": {
            "name": "Aussentemperatur",
            "protocol": [ "dht22" ],
            "id": [{
                "gpio": 0
            }],
            "humidity": 821,
            "temperature": 84,
            "poll-interval": 120
        },
        "temperature1": {
            "name": "Gewaechshaus",
            "protocol": [ "dht22" ],
            "id": [{
                "gpio": 4
            }],
            "humidity": 806,
            "temperature": 103,
            "poll-interval": 120
        },
        "raspoutside": {
            "name": "Raspberry Temp outside",
            "uuid": "0000-00-00-ab-864006",
            "protocol": [ "rpi_temp" ],
            "id": [{
                "id": 1
            }],
            "temperature": 41160,
            "poll-interval": 120
        }
    },
    "inside": {
        "name": "Haus",
        "lampe1": {
            "name": "EckLampe",
            "protocol": [ "elro_he" ],
            "id": [{
                "systemcode": 21,
                "unitcode": 1
            }],
            "state": "off"
        },
        "raspinside": {
            "name": "Raspberry Temp inside",
            "uuid": "0000-00-00-08-0340c5",
            "protocol": [ "rpi_temp" ],
            "id": [{
                "id": 2
            }],
            "temperature": 41160,
            "poll-interval": 120
        }
    }
}

Many Thanks for pointing me into right direction. Hope that above details help others.

Regards Martin

Just found that most, of the findings are listed here already:
http://wiki.pilight.org/doku.php/changes_features_fixes
 
#6
Does this mean the rpi_temp protcol is not broadcasted in a 3.0 stable clientized node?
I have 2 nodes, both running 3.0 and the second node isn't broadcasting the rpi_temp.
 
#7
How does your config look?
 
#8
snip from the config:

Code:
"rpitemp": {
                        "name": "Raspberry Pi Temperature",
                        "protocol": [ "rpi_temp" ],
                        "id": [{
                                "id": 1
                        }],
                        "temperature": 55686,
                        "settings": {
                                "temperature": 1,
                                "interval": 60
                        }
                },
                "rpitempbijkeuken": {
                        "name": "Raspberry Pi Bijkeuken Temperature",
                        "uuid": "03EA-00-00-EA-000300",
                        "protocol": [ "rpi_temp" ],
                        "id": [{
                                "id": 2
                        }],
                        "temperature": 56224,
                        "settings": {
                                "temperature": 1,
                                "interval": 60
                        }
                }
 
#9
Can you try pilight 4.0?
 
#10
(04-28-2014, 01:40 PM)curlymo Wrote: Can you try pilight 4.0?

No, that's why I asked whether rpi_temp is functioning in the 3.0 stable or not.
If it is a known issue in 3.0 (not broadcasting the rpi_temp from client node to master) then I'll have to wait.
If It is a configuration fault on my side I can try to solve it.

Just to rule out any errors: only Node A is suppposed to have a config,json, other nodes have an empty value for the config-file setting, correct ?
 
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Fixed] Segmentation fault when using Socket API wrong tomk 2 126 08-19-2019, 07:09 PM
Last Post: curlymo
  [Fixed] High CPU usage when pilight usb nano disconnects DieterK 1 136 08-13-2019, 05:43 PM
Last Post: curlymo
  ERROR: The Broadcom 2835 GPIO 0 is not set to output mode stuckinger 10 778 05-07-2019, 09:11 PM
Last Post: curlymo
  communication between main daemon and clientized daemon stops tomk 29 1,806 05-06-2019, 08:57 PM
Last Post: curlymo
Bug Bug report: WIFI dongle stops when gpio_switch.gpio = 20 woutput 16 5,059 01-03-2018, 10:11 PM
Last Post: zackdvd
  AdHoc network with 2 Raspberry and 2 GPIO transmitter not working webdandy 29 6,550 09-06-2017, 02:39 PM
Last Post: wseifert
  development, orangepi pc+, "no gpio-platform configured" Twain 1 2,210 06-01-2017, 05:51 PM
Last Post: curlymo
  Reset of GPIO ports / Detection of mobile phone NormBot 1 1,352 09-02-2016, 08:30 AM
Last Post: wo_rasp
  invalid gpio range koos147 2 1,927 11-02-2015, 08:40 AM
Last Post: woutput
  GPIO for other application koos147 1 1,623 10-31-2015, 08:08 PM
Last Post: pilino1234

Forum Jump:


Browsing: 1 Guest(s)