• 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
AdHoc bug with 3 or 4 raspberries
#1
Hello,

i have currently this setup working
raspberry main daemon with config, 3 raspberries as slaves, fixed IP addresses set in slaves to connect to main daemon
All have same version 7.0 of pilight running, to check if problem exists in nightly i installed the nightly build on control01 ( this is the one with the problem )
I removed one of them from this setup, as it doesnt affect the problem.

Code:
main:                           0000-b8-27-eb-fa5551        
                                        /                  \    
control01:  0000-80-1f-02-f6fe8d    control02:  0000-80-1f-02-f741c8

each of the slaves have different "things" connected to the gpios, the configuration file is ( removed gui settings to make it smaller )


Code:
( pi1_* references control01, pi2_* references control02 )

cat /etc/pilight/config.json
{
    "devices": {
        "pi1_light1": {
            "uuid": "0000-80-1f-02-f6fe8d",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 15
            }],
            "state": "off"
        },
        "pi1_light2": {
            "uuid": "0000-80-1f-02-f6fe8d",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 16
            }],
            "state": "off"
        },
        "pi1_light3": {
            "uuid": "0000-80-1f-02-f6fe8d",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 1
            }],
            "state": "off"
        },
        "pi1_light4": {
            "uuid": "0000-80-1f-02-f6fe8d",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 4
            }],
            "state": "off"
        },
        "pi1_light5": {
            "uuid": "0000-80-1f-02-f6fe8d",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 5
            }],
            "state": "off"
        },
        "pi1_light6": {
            "uuid": "0000-80-1f-02-f6fe8d",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 6
            }],
            "state": "off"
        },
        "pi1_light7": {
            "uuid": "0000-80-1f-02-f6fe8d",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 10
            }],
            "state": "off"
        },
        "pi1_switch1": {
            "uuid": "0000-80-1f-02-f6fe8d",
            "protocol": [ "gpio_switch" ],
            "id": [{
                "gpio": 12
            }],
            "state": "off"
        },
        "pi1_switch2": {
            "uuid": "0000-80-1f-02-f6fe8d",
            "protocol": [ "gpio_switch" ],
            "id": [{
                "gpio": 13
            }],
            "state": "off"
        },
        "pi1_switch3": {
            "uuid": "0000-80-1f-02-f6fe8d",
            "protocol": [ "gpio_switch" ],
            "id": [{
                "gpio": 14
            }],
            "state": "off"
        },
        "pi2_light1": {
            "uuid": "0000-80-1f-02-f741c8",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 15
            }],
            "state": "off"
        },
        "pi2_light2": {
            "uuid": "0000-80-1f-02-f741c8",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 16
            }],
            "state": "off"
        },
        "pi2_light3": {
            "uuid": "0000-80-1f-02-f741c8",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 10
            }],
            "state": "off"
        },
        "pi2_light4": {
            "uuid": "0000-80-1f-02-f741c8",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 4
            }],
            "state": "off"
        },
        "pi2_light5": {
            "uuid": "0000-80-1f-02-f741c8",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 0
            }],
            "state": "off"
        },
        "pi2_light6": {
            "uuid": "0000-80-1f-02-f741c8",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 2
            }],
            "state": "off"
        },
        "pi2_light7": {
            "uuid": "0000-80-1f-02-f741c8",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 3
            }],
            "state": "off"
        },
        "pi2_light8": {
            "uuid": "0000-80-1f-02-f741c8",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 12
            }],
            "state": "off"
        }
    },
    "rules": {
        "pi1_switch1_on": {
            "rule": "IF pi1_switch1.state IS on THEN toggle DEVICE pi1_light1 BETWEEN on AND off",
            "active": 1
        },
        "pi1_switch1_off": {
            "rule": "IF pi1_switch1.state IS off THEN toggle DEVICE pi1_light1 BETWEEN on AND off",
            "active": 1
        }
    },
    "gui": {
    },
    "settings": {
        "log-level": 6,
        "pid-file": "/var/run/pilight.pid",
        "log-file": "/var/log/pilight.log",
        "port": 5000,
        "standalone": 0,
        "webserver-enable": 1,
        "webserver-root": "/usr/local/share/pilight/",
        "webserver-http-port": 5001,
        "webserver-cache": 1
    },
    "hardware": {
        "none": {}
    },
    "registry": {
        "webgui": {
            "tabs": 1
        },
        "pilight": {
            "version": {
                "current": "7.0"
            }
        }
    }
}

Problematic thing is pi1_switch1 and pi2_light8. It looks like they dont work together. Whenever control01 is started, i get error messages that the pin is not configured as input.


Code:
0000-80-1f-02-f6fe8d

control01:/home/pi# tail -f /var/log/pilight.log
[Jul 09 23:02:50:954788] pilight-daemon: INFO: version v7.0-31-gbbf23a3
[Jul 09 23:02:50:963103] pilight-daemon: INFO: a pilight daemon was found, clientizing
[Jul 09 23:02:52:103615] pilight-daemon: ERROR: raspberrypi->waitForInterrupt: Trying to read from pin 12, but it's not configured as interrupt
[Jul 09 23:02:52:103763] pilight-daemon: ERROR: raspberrypi: error while calling waitForInterrupt
[Jul 09 23:02:53:989174] pilight-daemon: cpu usage way too high 99.168204%

with debugging on i see some weird things, it looks like the "ownership" of the pin12 is taken over at some point:

Code:
[Jul 10 10:03:58:898038] pilight-daemon: DEBUG: new thread program, 5 threads running
[Jul 10 10:03:58:907645] pilight-daemon: DEBUG: running on a raspberrypi
[color=#FF0000][Jul 10 10:03:58:910155] pilight-daemon: DEBUG: new thread gpio_switch, 6 threads running
[Jul 10 10:03:58:913025] pilight-daemon: DEBUG: new thread gpio_switch, 7 threads running
[Jul 10 10:03:58:916318] pilight-daemon: DEBUG: new thread gpio_switch, 8 threads running[/color]
[Jul 10 10:03:58:939807] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":15,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 10:03:58:945408] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":15,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 10:03:58:950612] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":13,"state":"off"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 10:03:58:963981] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":13,"state":"off"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 10:03:58:982283] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":16,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 10:03:58:983865] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":16,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 10:03:58:986486] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":1,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 10:03:58:988536] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":1,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[  Jul 10 10:03:59:5665] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":4,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[  Jul 10 10:03:59:8126] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":4,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[ Jul 10 10:03:59:11848] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":5,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[ Jul 10 10:03:59:12914] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":5,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[ Jul 10 10:03:59:15561] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":6,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[ Jul 10 10:03:59:21864] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":6,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[ Jul 10 10:03:59:24599] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":10,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[ Jul 10 10:03:59:25596] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":10,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[ Jul 10 10:03:59:28133] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":15,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[ Jul 10 10:03:59:29208] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":15,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[ Jul 10 10:03:59:33175] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":16,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[ Jul 10 10:03:59:37456] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":16,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[ Jul 10 10:03:59:39854] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":10,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[ Jul 10 10:03:59:40856] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":10,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[ Jul 10 10:03:59:44654] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":4,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[ Jul 10 10:03:59:49474] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":4,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[ Jul 10 10:03:59:53094] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":0,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[ Jul 10 10:03:59:61685] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":0,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[ Jul 10 10:03:59:63625] pilight-daemon: DEBUG: loaded master configuration
[color=#FF4500][ Jul 10 10:03:59:64942] pilight-daemon: DEBUG: socket recv: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fa5551","devices":["pi1_switch2"],"values":{"timestamp":1436522638,"state":"off"}}
[ Jul 10 10:03:59:65970] pilight-daemon: ERROR: raspberrypi->waitForInterrupt: Trying to read from pin 12, but it's not configured as interrupt
[ Jul 10 10:03:59:66962] pilight-daemon: ERROR: raspberrypi: error while calling waitForInterrupt[/color]
[ Jul 10 10:03:59:70526] pilight-daemon: DEBUG: garbage collected wiringX library
[ Jul 10 10:03:59:75048] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":2,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[color=#FF0000][ Jul 10 10:03:59:81796] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":2,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[ Jul 10 10:03:59:85087] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":12,"state":"off"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[ Jul 10 10:03:59:86095] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":12,"state":"off"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d"}[/color]
[ Jul 10 10:03:59:89094] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":3,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[color=#FF4500][ Jul 10 10:03:59:92350] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":3,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[ Jul 10 10:03:59:94806] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":12,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}
[/color]
[Jul 10 10:03:59:101752] pilight-daemon: DEBUG: socket recv: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fa5551","devices":["pi1_switch1"],"values":{"timestamp":1436522639,"state":"off"}}
[Jul 10 10:03:59:103128] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":12,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 10:03:59:105950] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":12,"state":"on"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d","action":"update"}
[color=#FF0000]
[Jul 10 10:03:59:106991] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":12,"state":"on"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d"}[/color]
[Jul 10 10:03:59:137956] pilight-daemon: DEBUG: socket recv: {"code":{"gpio":15,"on":1,"protocol":["relay"],"uuid":"0000-80-1f-02-f6fe8d"},"action":"send"}
[Jul 10 10:03:59:138951] pilight-daemon: ERROR: relay: invalid gpio range
[Jul 10 10:03:59:139537] pilight-daemon: DEBUG: socket write succeeded: {"status":"failed"}

[color=#FF0000][Jul 10 10:03:59:146332] pilight-daemon: DEBUG: socket recv: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fa5551","devices":["pi1_switch1"],"values":{"timestamp":1436522639,"state":"on"}}[/color]
[Jul 10 10:03:59:188154] pilight-daemon: DEBUG: socket recv: {"code":{"gpio":15,"on":1,"protocol":["relay"],"uuid":"0000-80-1f-02-f6fe8d"},"action":"send"}
[Jul 10 10:03:59:189145] pilight-daemon: ERROR: relay: invalid gpio range
[Jul 10 10:03:59:189712] pilight-daemon: DEBUG: socket write succeeded: {"status":"failed"}

[Jul 10 10:03:59:954986] pilight-daemon: DEBUG: socket write succeeded: {"message":{"name":"xbmc","state":"stopped","pid":0},"origin":"receiver","protocol":"program","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 10:03:59:956199] pilight-daemon: DEBUG: broadcasted: {"message":{"name":"xbmc","state":"stopped","pid":0},"origin":"receiver","protocol":"program","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 10:03:59:965286] pilight-daemon: DEBUG: socket recv: {"origin":"update","type":7,"devices":["pi1_wakeonlan"],"values":{"timestamp":1436522639,"state":"stopped","pid":0}}
[Jul 10 10:03:59:969072] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":13,"state":"on"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 10:03:59:978506] pilight-daemon: DEBUG: socket recv: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fa5551","devices":["pi1_switch2"],"values":{"timestamp":1436522639,"state":"on"}}
[Jul 10 10:03:59:980805] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":13,"state":"on"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 10:03:59:984183] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":14,"state":"on"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 10:03:59:997080] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":14,"state":"on"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 10:04:00:854124] pilight-daemon: WARNING: cpu usage too high 88.578589%
[Jul 10 10:04:00:855778] pilight-daemon: WARNING: checking again in 10 seconds
^C[Jul 10 10:04:02:696870] pilight-daemon: DEBUG: received interrupt signal, stopping pilight...
[Jul 10 10:04:02:698215] pilight-daemon: DEBUG: socket write succeeded: HEART


If both pins on the 2 rasbs are configured the same way ( as input or output ) it looks like this doesnt happen.
 
Reply
#2
Let's start by saying that to work in AdHoc mode, all pilight version must be exactly the same.
 
Reply
#3
All version were the same till yesterday night, and it happens on the stable version exactly in the same way. I installed nightly last night to check , if its just a problem in the stable version, but it happens in exactly same way.
 
Reply
#4
Do you also have the sender / receiver connected on one of the pi's?
 
Reply
#5
but of course, i can reinstall the stable version again:
Code:
root@control01:/home/pi/save/s2# apt-get remove pilight
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libgail-3-0 libpcap0.8 libunwind8
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  pilight pilight-webgui
0 upgraded, 0 newly installed, 2 to remove and 2 not upgraded.
After this operation, 120 MB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 75427 files and directories currently installed.)
Removing pilight ...
Removing pilight-webgui ...
vi /e    root@control01:/home/pi/save/s2# vi /etc/apt/sources.list.d/pilight.list
root@control01:/home/pi/save/s2# apt-get install pilight
^Cading package lists... 56%
root@control01:/home/pi/save/s2# apt-get update
Get:1 http://apt.pilight.org stable Release.gpg [473 B]
Hit http://raspberrypi.collabora.com wheezy Release.gpg                                                                                                                  
Get:2 http://apt.pilight.org stable Release [3,099 B]                                                                                        
Hit http://archive.raspberrypi.org wheezy Release.gpg                                          
Get:3 http://mirrordirector.raspbian.org wheezy Release.gpg [490 B]                            
Hit http://raspberrypi.collabora.com wheezy Release                                        
Hit http://archive.raspberrypi.org wheezy Release                                
Get:4 http://mirrordirector.raspbian.org wheezy Release [14.4 kB]                
Get:5 http://apt.pilight.org stable/main armhf Packages [3,862 B]              
Hit http://raspberrypi.collabora.com wheezy/rpi armhf Packages                              
Hit http://archive.raspberrypi.org wheezy/main armhf Packages                                  
Get:6 http://mirrordirector.raspbian.org wheezy/main armhf Packages [6,904 kB]                                
Ign http://apt.pilight.org stable/main Translation-en_GB                                                          
Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en_GB                                                  
Ign http://apt.pilight.org stable/main Translation-en                                          
Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en                                  
Ign http://archive.raspberrypi.org wheezy/main Translation-en_GB                                
Ign http://archive.raspberrypi.org wheezy/main Translation-en            
Get:7 http://mirrordirector.raspbian.org wheezy/contrib armhf Packages [23.6 kB]
Get:8 http://mirrordirector.raspbian.org wheezy/non-free armhf Packages [49.3 kB]
Get:9 http://mirrordirector.raspbian.org wheezy/rpi armhf Packages [592 B]
100% [6 Packages xz 0 B] [Waiting for headers]                                                                                                                                                                                                                    1,248 kB/s 0sl100% [6 Packages xz 0 B] [Waiting for headers]                                                                                                                                                                                                                    1,248 kB/s 0s
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en_GB                                                                                                                                                                                                        
Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en                                                                                                                                                                                                          
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en_GB                                                                                                                                                                                                          
Ign http://mirrordirector.raspbian.org wheezy/main Translation-en                                                                                                                                                                                                              
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en_GB                                                                                                                                                                                                      
Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en                                                                                                                                                                                                          
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en_GB                                                                                                                                                                                                            
Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en                                                                                                                                                                                                              
Fetched 6,999 kB in 32s (216 kB/s)                                                                                                                                                                                                                                            
Reading package lists... Done
W: Duplicate sources.list entry http://apt.pilight.org/ stable/main armhf Packages (/var/lib/apt/lists/apt.pilight.org_dists_stable_main_binary-armhf_Packages)
W: You may want to run apt-get update to correct these problems
root@control01:/home/pi/save/s2# apt-get install pilight
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following package was automatically installed and is no longer required:
  libgail-3-0
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
  pilight-webgui
Suggested packages:
  php5-cgi pilight-firmware
The following NEW packages will be installed:
  pilight pilight-webgui
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/4,817 kB of archives.
After this operation, 36.4 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Selecting previously unselected package pilight-webgui.
(Reading database ... 75362 files and directories currently installed.)
Unpacking pilight-webgui (from .../pilight-webgui_7.0_armhf.deb) ...
Selecting previously unselected package pilight.
Unpacking pilight (from .../archives/pilight_7.0_armhf.deb) ...
Setting up pilight-webgui (7.0) ...
Setting up pilight (7.0) ...

root@control01:/home/pi/save/s2# vi /etc/init.d/pilight
root@control01:/home/pi/save/s2# /etc/init.d/pilight stop
[ ok ] Stopping : pilight.
root@control01:/home/pi/save/s2# vi /etc/pilight/config.json
root@control01:/home/pi/save/s2# /etc/init.d/pilight start
[....] Starting : pilight[Jul 10 11:07:20:333876] pilight-daemon: INFO: version v7.0
[Jul 10 11:07:20:343023] pilight-daemon: INFO: a pilight daemon was found, clientizing
[Jul 10 11:07:20:347348] pilight-daemon: DEBUG: cpu: 0.000000%, ram: 0.600250%
[Jul 10 11:07:20:349276] pilight-daemon: DEBUG: new thread node, 1 thread running
[Jul 10 11:07:20:350517] pilight-daemon: DEBUG: new thread sender, 2 threads running
[Jul 10 11:07:20:353408] pilight-daemon: DEBUG: new thread broadcaster, 3 threads running
[Jul 10 11:07:20:354880] pilight-daemon: DEBUG: new thread receive parser, 4 threads running
[Jul 10 11:07:20:357777] pilight-daemon: DEBUG: socket write succeeded: {"values":{"cpu":0.0000000045533447,"ram":0.6002498045593825},"origin":"core","type":-1,"uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:358840] pilight-daemon: DEBUG: broadcasted: {"values":{"cpu":0.0000000045533447,"ram":0.6002498045593825},"origin":"core","type":-1,"uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:361254] pilight-daemon: DEBUG: socket write succeeded: {"action":"identify","uuid":"0000-80-1f-02-f6fe8d","options":{"receiver":1,"forward":1,"config":1}}

[Jul 10 11:07:20:365108] pilight-daemon: DEBUG: socket recv: {"status":"success"}
[Jul 10 11:07:20:366423] pilight-daemon: DEBUG: socket write succeeded: {"action":"request config"}

[Jul 10 11:07:20:377720] pilight-daemon: DEBUG: socket recv: {"message":"config","config":{"devices":{"pi1_wakeonlan":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["program"],"id":[{"name":"xbmc"}],"program":"/bin/sh","arguments":"/home/pi/scripts/wol/wakeup","stop-command":"/etc/init.d/wakeonlan stop","start-command":"/etc/init.d/wakeonlan start","state":"stopped","pid":0},"pi1_light1":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["relay"],"id":[{"gpio":15}],"state":"off"},"pi1_light2":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["relay"],"id":[{"gpio":16}],"state":"on"},"pi1_light3":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["relay"],"id":[{"gpio":1}],"state":"off"},"pi1_light4":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["relay"],"id":[{"gpio":4}],"state":"off"},"pi1_light5":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["relay"],"id":[{"gpio":5}],"state":"off"},"pi1_light6":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["relay"],"id":[{"gpio":6}],"state":"off"},"pi1_light7":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["relay"],"id":[{"gpio":10}],"state":"on"},"pi1_switch1":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["gpio_switch"],"id":[{"gpio":12}],"state":"on"},"pi1_switch2":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["gpio_switch"],"id":[{"gpio":13}],"state":"on"},"pi1_switch3":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["gpio_switch"],"id":[{"gpio":14}],"state":"on"},"pi2_light1":{"uuid":"0000-80-1f-02-f741c8","protocol":["relay"],"id":[{"gpio":15}],"state":"on"},"pi2_light2":{"uuid":"0000-80-1f-02-f741c8","protocol":["relay"],"id":[{"gpio":16}],"state":"on"},"pi2_light3":{"uuid":"0000-80-1f-02-f741c8","protocol":["relay"],"id":[{"gpio":10}],"state":"on"},"pi2_light4":{"uuid":"0000-80-1f-02-f741c8","protocol":["relay"],"id":[{"gpio":4}],"state":"on"},"pi2_light5":{"uuid":"0000-80-1f-02-f741c8","protocol":["relay"],"id":[{"gpio":0}],"state":"off"},"pi2_light6":{"uuid":"0000-80-1f-02-f741c8","protocol":["relay"],"id":[{"gpio":2}],"state":"off"},"pi2_light7":{"uuid":"0000-80-1f-02-f741c8","protocol":["relay"],"id":[{"gpio":3}],"state":"off"},"pi2_light8":{"uuid":"0000-80-1f-02-f741c8","protocol":["relay"],"id":[{"gpio":12}],"state":"off"}},"rules":{"pi1_switch1_on":{"rule":"IF pi1_switch1.state IS on THEN toggle DEVICE pi1_light1 BETWEEN on AND off","active":1},"pi1_switch1_off":{"rule":"IF pi1_switch1.state IS off THEN toggle DEVICE pi1_light1 BETWEEN on AND off","active":1}},"gui":{"pi1_light1":{"name":"Oben","group":["Dining"],"media":["web"],"readonly":0},"pi1_light2":{"name":"Aussen links","group":["Dining"],"media":["web"],"readonly":0},"pi1_light5":{"name":"Aussen rechts","group":["Dining"],"media":["web"],"readonly":0},"pi1_light4":{"name":"Innen rechts","group":["Dining"],"media":["web"],"readonly":0},"pi1_light7":{"name":"Innen links","group":["Dining"],"media":["web"],"readonly":0},"pi1_light6":{"name":"Garten","group":["Dining"],"media":["web"],"readonly":0},"pi2_light5":{"name":"Sternenhimmel","group":["Living"],"media":["web"],"readonly":0},"pi2_light6":{"name":"Vorne","group":["Living"],"media":["web"],"readonly":0},"pi2_light7":{"name":"Hinten","group":["Living"],"media":["web"],"readonly":0},"pi2_light8":{"name":"Unten","group":["Living"],"media":["web"],"readonly":0},"pi1_switch1":{"name":"Switch 1","group":["Switches"],"media":["all"]},"pi1_switch2":{"name":"Switch 2","group":["Switches"],"media":["all"]},"pi1_switch3":{"name":"Switch 3","group":["Switches"],"media":["all"]},"pi1_wakeonlan":{"name":"XBMC/KODI","group":["Programme"],"media":["all"]}},"settings":{"log-level":6,"pid-file":"/var/run/pilight.pid","log-file":"/var/log/pilight.log","port":5000,"standalone":0,"webserver-enable":1,"webserver-root":"/usr/local/share/pilight/","webserver-http-port":5001,"webserver-cache":1},"hardware":{"none":{}},"registry":{"webgui":{"tabs":1},"pilight":{"version":{"current":"7.0"}}}}}
[Jul 10 11:07:20:383842] pilight-daemon: DEBUG: garbage collected config gui library
[Jul 10 11:07:20:384793] pilight-daemon: DEBUG: garbage collected config devices library
[Jul 10 11:07:20:385672] pilight-daemon: DEBUG: garbage collected config rules library
[Jul 10 11:07:20:386609] pilight-daemon: DEBUG: garbage collected config registry library
[Jul 10 11:07:20:388741] pilight-daemon: DEBUG: new thread program, 5 threads running
[Jul 10 11:07:20:395859] pilight-daemon: DEBUG: running on a raspberrypi
[Jul 10 11:07:20:398199] pilight-daemon: DEBUG: new thread gpio_switch, 6 threads running
[Jul 10 11:07:20:400486] pilight-daemon: DEBUG: new thread gpio_switch, 7 threads running
[Jul 10 11:07:20:403085] pilight-daemon: DEBUG: new thread gpio_switch, 8 threads running
[Jul 10 11:07:20:416078] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":15,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:417079] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":15,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:435641] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":13,"state":"off"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:436662] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":13,"state":"off"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:443701] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":16,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:448079] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":16,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:451097] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":1,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:462114] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":1,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:465325] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":4,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:472047] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":4,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:474547] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":5,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:481852] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":5,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:484282] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":6,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:485272] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":6,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:487485] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":10,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:488851] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":10,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:502089] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":15,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:503667] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":15,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:506047] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":16,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:507794] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":16,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:510109] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":10,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:511096] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":10,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:514751] pilight-daemon: DEBUG: loaded master configuration
[Jul 10 11:07:20:516066] pilight-daemon: ERROR: raspberrypi->waitForInterrupt: Trying to read from pin 12, but it's not configured as interrupt
[Jul 10 11:07:20:517021] pilight-daemon: ERROR: raspberrypi: error while calling waitForInterrupt
[Jul 10 11:07:20:519892] pilight-daemon: DEBUG: garbage collected wiringX library
[Jul 10 11:07:20:525329] pilight-daemon: DEBUG: socket recv: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fa5551","devices":["pi1_switch2"],"values":{"timestamp":1436526440,"state":"off"}}
[Jul 10 11:07:20:533985] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":4,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:534984] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":4,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:537358] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":12,"state":"off"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:538462] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":12,"state":"off"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:552970] pilight-daemon: DEBUG: socket recv: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fa5551","devices":["pi1_switch1"],"values":{"timestamp":1436526440,"state":"off"}}
[Jul 10 11:07:20:555177] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":0,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:556232] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":0,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:557524] pilight-daemon: DEBUG: socket recv: {"code":{"gpio":15,"on":1,"protocol":["relay"],"uuid":"0000-80-1f-02-f6fe8d"},"action":"send"}
[Jul 10 11:07:20:559037] pilight-daemon: ERROR: relay: invalid gpio range
[Jul 10 11:07:20:559595] pilight-daemon: DEBUG: socket write succeeded: {"status":"failed"}

[Jul 10 11:07:20:563317] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":2,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:564326] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":2,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:567049] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":3,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:568059] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":3,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:570963] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":12,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:581617] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":12,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:584094] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":12,"state":"on"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:20:585095] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":12,"state":"on"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:20:628787] pilight-daemon: DEBUG: socket recv: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fa5551","devices":["pi1_switch1"],"values":{"timestamp":1436526440,"state":"on"}}
[Jul 10 11:07:20:669838] pilight-daemon: DEBUG: socket recv: {"code":{"gpio":15,"on":1,"protocol":["relay"],"uuid":"0000-80-1f-02-f6fe8d"},"action":"send"}
[Jul 10 11:07:20:670461] pilight-daemon: ERROR: relay: invalid gpio range
[Jul 10 11:07:20:670977] pilight-daemon: DEBUG: socket write succeeded: {"status":"failed"}

[Jul 10 11:07:21:445672] pilight-daemon: DEBUG: socket write succeeded: {"message":{"name":"xbmc","state":"stopped","pid":0},"origin":"receiver","protocol":"program","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:21:451752] pilight-daemon: DEBUG: broadcasted: {"message":{"name":"xbmc","state":"stopped","pid":0},"origin":"receiver","protocol":"program","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:21:457264] pilight-daemon: DEBUG: socket recv: {"origin":"update","type":7,"devices":["pi1_wakeonlan"],"values":{"timestamp":1436526441,"state":"stopped","pid":0}}
[Jul 10 11:07:21:470163] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":13,"state":"on"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:21:471161] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":13,"state":"on"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:07:21:477082] pilight-daemon: DEBUG: socket recv: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fa5551","devices":["pi1_switch2"],"values":{"timestamp":1436526441,"state":"on"}}
[Jul 10 11:07:21:524497] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":14,"state":"on"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:07:21:531752] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":14,"state":"on"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d"}
^C[Jul 10 11:07:22:916072] pilight-daemon: DEBUG: received interrupt signal, stopping pilight...
[Jul 10 11:07:22:917425] pilight-daemon: DEBUG: socket write succeeded: HEART

[Jul 10 11:07:22:918352] pilight-daemon: DEBUG: garbage collected event operator library
[Jul 10 11:07:22:919568] pilight-daemon: DEBUG: freed options struct
[Jul 10 11:07:22:920448] pilight-daemon: DEBUG: freed options struct
[Jul 10 11:07:22:921297] pilight-daemon: DEBUG: freed options struct

No senders or receivers installed, all the slave nodes have same config.json file

Code:
cat /etc/pilight/config.json
{
    "devices": {},
    "rules": {},
    "gui": {},
    "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": {
        "none": {}
    },
    "registry": {}
}

And when checking gpio exports, WX pin12 is exported ( i think its gpio10 on raspberry )

Code:
root@control01:/sys/class/gpio# cd /sys/class/gpio/
root@control01:/sys/class/gpio# ls
export    gpio10    gpio18    gpiochip0  unexport
root@control01:/sys/class/gpio# ls -al
total 0
drwxrwx---  2 root gpio    0 Jul 10 11:07 .
drwxr-xr-x 46 root root    0 Jul  9 20:49 ..
-rwxrwx---  1 root gpio 4096 Jul 10 11:07 export
lrwxrwxrwx  1 root gpio    0 Jul  9 20:50 gpio10 -> ../../devices/platform/soc/20200000.gpio/gpio/gpio10
lrwxrwxrwx  1 root gpio    0 Jul 10 11:04 gpio18 -> ../../devices/platform/soc/20200000.gpio/gpio/gpio18
lrwxrwxrwx  1 root gpio    0 Jan  1  1970 gpiochip0 -> ../../devices/platform/soc/20200000.gpio/gpio/gpiochip0
-rwxrwx---  1 root gpio 4096 Jul 10 11:07 unexport
root@control01:/sys/class/gpio#
 
Reply
#6
Can you unexport pin12?

What's the config on the master node?
 
Reply
#7
the master node config.json is in the first post. I removed now many of the devices to surround the problem..

Code:
root@pigate:/etc/pilight# cat config.json
{
    "devices": {
        "pi1_switch1": {
            "uuid": "0000-80-1f-02-f6fe8d",
            "protocol": [ "gpio_switch" ],
            "id": [{
                "gpio": 12
            }],
            "state": "off"
        },
        "pi1_light1": {
            "uuid": "0000-80-1f-02-f6fe8d",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 15
            }],
            "state": "off"
        },
        "pi1_light2": {
            "uuid": "0000-80-1f-02-f6fe8d",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 16
            }],
            "state": "on"
        },
        "pi1_light4": {
            "uuid": "0000-80-1f-02-f6fe8d",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 4
            }],
            "state": "off"
        },
        "pi2_light8": {
            "uuid": "0000-80-1f-02-f741c8",
            "protocol": [ "relay" ],
            "id": [{
                "gpio": 12
            }],
            "state": "on"
        }
    },
    "rules": {
        "pi1_switch1_on": {
            "rule": "IF pi1_switch1.state IS on THEN toggle DEVICE pi1_light1 BETWEEN on AND off",
            "active": 1
        },
        "pi1_switch1_off": {
            "rule": "IF pi1_switch1.state IS off THEN toggle DEVICE pi1_light1 BETWEEN on AND off",
            "active": 1
        }
    },
    "gui": {
        "pi1_switch1": {
            "name": "Switch 1",
            "group": [ "Switches" ],
            "media": [ "all" ]
        },
        "pi2_light8": {
            "name": "Light",
            "group": [ "relay" ],
            "media": [ "all" ]
        }
    },
    "settings": {
        "log-level": 6,
        "pid-file": "/var/run/pilight.pid",
        "log-file": "/var/log/pilight.log",
        "port": 5000,
        "standalone": 0,
        "webserver-enable": 1,
        "webserver-root": "/usr/local/share/pilight/",
        "webserver-http-port": 5001,
        "webserver-cache": 1
    },
    "hardware": {
        "none": {}
    },
    "registry": {
        "webgui": {
            "tabs": 1
        },
        "pilight": {
            "version": {
                "current": "7.0"
            }
        }
    }
}

unexporting

Code:
root@control01:/home/pi# echo 10 > /sys/class/gpio/unexport
root@control01:/home/pi# ls -al /sys/class/gpio/
total 0
drwxrwx---  2 root gpio    0 Jul 10 11:43 .
drwxr-xr-x 46 root root    0 Jul 10 11:17 ..
-rwxrwx---  1 root gpio 4096 Jul 10 11:41 export
lrwxrwxrwx  1 root gpio    0 Jan  1  1970 gpiochip0 -> ../../devices/platform/soc/20200000.gpio/gpio/gpiochip0
-rwxrwx---  1 root gpio 4096 Jul 10 11:43 unexport
root@control01:/home/pi# /etc/init.d/pilight start


i restarted the master several times and took one device out after another. when i removed pi1_light3 it started to work. I added it again and it still worked. next restart ( without change of config ) same issue. I removed pi1_light3 and added pi1_light4, restarted and it worked without problems. stopping and restarting again leading to the issue described in first post:


start 1 - no problem

Code:
root@control01:/home/pi# ls -al /sys/class/gpio/
total 0
drwxrwx---  2 root gpio    0 Jul 10 11:48 .
drwxr-xr-x 46 root root    0 Jul 10 11:17 ..
-rwxrwx---  1 root gpio 4096 Jul 10 11:47 export
lrwxrwxrwx  1 root gpio    0 Jan  1  1970 gpiochip0 -> ../../devices/platform/soc/20200000.gpio/gpio/gpiochip0
-rwxrwx---  1 root gpio 4096 Jul 10 11:48 unexport
root@control01:/home/pi# /etc/init.d/pilight start
[....] Starting : pilight[Jul 10 11:48:10:637761] pilight-daemon: INFO: version v7.0
[Jul 10 11:48:10:646459] pilight-daemon: INFO: a pilight daemon was found, clientizing
[Jul 10 11:48:10:650325] pilight-daemon: DEBUG: cpu: 0.000000%, ram: 0.602047%
[Jul 10 11:48:10:652240] pilight-daemon: DEBUG: new thread node, 1 thread running
[Jul 10 11:48:10:653497] pilight-daemon: DEBUG: new thread sender, 2 threads running
[Jul 10 11:48:10:656691] pilight-daemon: DEBUG: new thread broadcaster, 3 threads running
[Jul 10 11:48:10:658044] pilight-daemon: DEBUG: new thread receive parser, 4 threads running
[Jul 10 11:48:10:660902] pilight-daemon: DEBUG: socket write succeeded: {"values":{"cpu":0.0000000045730372,"ram":0.6020469596628537},"origin":"core","type":-1,"uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:48:10:661932] pilight-daemon: DEBUG: broadcasted: {"values":{"cpu":0.0000000045730372,"ram":0.6020469596628537},"origin":"core","type":-1,"uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:48:10:665533] pilight-daemon: DEBUG: socket write succeeded: {"action":"identify","uuid":"0000-80-1f-02-f6fe8d","options":{"receiver":1,"forward":1,"config":1}}

[Jul 10 11:48:10:673490] pilight-daemon: DEBUG: socket recv: {"status":"success"}
[Jul 10 11:48:10:674901] pilight-daemon: DEBUG: socket write succeeded: {"action":"request config"}

[Jul 10 11:48:10:722708] pilight-daemon: DEBUG: socket recv: {"message":"config","config":{"devices":{"pi1_switch1":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["gpio_switch"],"id":[{"gpio":12}],"state":"off"},"pi1_light1":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["relay"],"id":[{"gpio":15}],"state":"off"},"pi1_light2":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["relay"],"id":[{"gpio":16}],"state":"on"},"pi1_light4":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["relay"],"id":[{"gpio":4}],"state":"off"},"pi2_light8":{"uuid":"0000-80-1f-02-f741c8","protocol":["relay"],"id":[{"gpio":12}],"state":"on"}},"rules":{"pi1_switch1_on":{"rule":"IF pi1_switch1.state IS on THEN toggle DEVICE pi1_light1 BETWEEN on AND off","active":1},"pi1_switch1_off":{"rule":"IF pi1_switch1.state IS off THEN toggle DEVICE pi1_light1 BETWEEN on AND off","active":1}},"gui":{"pi1_switch1":{"name":"Switch 1","group":["Switches"],"media":["all"]},"pi2_light8":{"name":"Light","group":["relay"],"media":["all"]}},"settings":{"log-level":6,"pid-file":"/var/run/pilight.pid","log-file":"/var/log/pilight.log","port":5000,"standalone":0,"webserver-enable":1,"webserver-root":"/usr/local/share/pilight/","webserver-http-port":5001,"webserver-cache":1},"hardware":{"none":{}},"registry":{"webgui":{"tabs":1},"pilight":{"version":{"current":"7.0"}}}}}
[Jul 10 11:48:10:725025] pilight-daemon: DEBUG: garbage collected config gui library
[Jul 10 11:48:10:726044] pilight-daemon: DEBUG: garbage collected config devices library
[Jul 10 11:48:10:727238] pilight-daemon: DEBUG: garbage collected config rules library
[Jul 10 11:48:10:728105] pilight-daemon: DEBUG: garbage collected config registry library
[Jul 10 11:48:10:732216] pilight-daemon: DEBUG: running on a raspberrypi
[Jul 10 11:48:10:734474] pilight-daemon: DEBUG: new thread gpio_switch, 5 threads running
[Jul 10 11:48:10:739851] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":15,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:48:10:740857] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":15,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:48:10:742485] pilight-daemon: DEBUG: loaded master configuration
[Jul 10 11:48:10:757305] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":16,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:48:10:758433] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":16,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:48:10:760653] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":4,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:48:10:763980] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":4,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:48:10:766470] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":12,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:48:10:767462] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":12,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:48:10:770760] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":12,"state":"off"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:48:10:776077] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":12,"state":"off"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:48:13:656112] pilight-daemon: DEBUG: cpu: 0.162092%, ram: 0.644280%
[Jul 10 11:48:13:658138] pilight-daemon: DEBUG: socket write succeeded: {"values":{"cpu":0.1620916226317333,"ram":0.6442801045944270},"origin":"core","type":-1,"uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:48:13:659931] pilight-daemon: DEBUG: broadcasted: {"values":{"cpu":0.1620916226317333,"ram":0.6442801045944270},"origin":"core","type":-1,"uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:48:16:664860] pilight-daemon: DEBUG: cpu: 0.157398%, ram: 0.644280%
[Jul 10 11:48:16:667218] pilight-daemon: DEBUG: socket write succeeded: {"values":{"cpu":0.1573977319299938,"ram":0.6442801045944270},"origin":"core","type":-1,"uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:48:16:668287] pilight-daemon: DEBUG: broadcasted: {"values":{"cpu":0.1573977319299938,"ram":0.6442801045944270},"origin":"core","type":-1,"uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:48:19:673200] pilight-daemon: DEBUG: cpu: 0.156499%, ram: 0.644280%
[Jul 10 11:48:19:675293] pilight-daemon: DEBUG: socket write succeeded: {"values":{"cpu":0.1564991106005969,"ram":0.6442801045944270},"origin":"core","type":-1,"uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:48:19:676577] pilight-daemon: DEBUG: broadcasted: {"values":{"cpu":0.1564991106005969,"ram":0.6442801045944270},"origin":"core","type":-1,"uuid":"0000-80-1f-02-f6fe8d"}
^C[Jul 10 11:48:21:848466] pilight-daemon: DEBUG: received interrupt signal, stopping pilight...
[Jul 10 11:48:21:849719] pilight-daemon: DEBUG: socket write succeeded: HEART

[Jul 10 11:48:21:850633] pilight-daemon: DEBUG: garbage collected event operator library

start 2 - again problem with pin 12: ( no changes in config, just restart )

Code:
root@control01:/home/pi# ls -al /sys/class/gpio/
total 0
drwxrwx---  2 root gpio    0 Jul 10 11:48 .
drwxr-xr-x 46 root root    0 Jul 10 11:17 ..
-rwxrwx---  1 root gpio 4096 Jul 10 11:48 export
lrwxrwxrwx  1 root gpio    0 Jan  1  1970 gpiochip0 -> ../../devices/platform/soc/20200000.gpio/gpio/gpiochip0
-rwxrwx---  1 root gpio 4096 Jul 10 11:48 unexport
root@control01:/home/pi# /etc/init.d/pilight start
[....] Starting : pilight[Jul 10 11:48:25:867599] pilight-daemon: INFO: version v7.0
[Jul 10 11:48:25:874932] pilight-daemon: INFO: a pilight daemon was found, clientizing
[Jul 10 11:48:25:879945] pilight-daemon: DEBUG: cpu: 0.000000%, ram: 0.611931%
[Jul 10 11:48:25:881768] pilight-daemon: DEBUG: new thread node, 1 thread running
[Jul 10 11:48:25:883333] pilight-daemon: DEBUG: new thread sender, 2 threads running
[Jul 10 11:48:25:886020] pilight-daemon: DEBUG: new thread broadcaster, 3 threads running
[Jul 10 11:48:25:887684] pilight-daemon: DEBUG: new thread receive parser, 4 threads running
[Jul 10 11:48:25:890381] pilight-daemon: DEBUG: socket write succeeded: {"values":{"cpu":0.0000000044529560,"ram":0.6119313127319453},"origin":"core","type":-1,"uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:48:25:891455] pilight-daemon: DEBUG: broadcasted: {"values":{"cpu":0.0000000044529560,"ram":0.6119313127319453},"origin":"core","type":-1,"uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:48:25:897428] pilight-daemon: DEBUG: socket write succeeded: {"action":"identify","uuid":"0000-80-1f-02-f6fe8d","options":{"receiver":1,"forward":1,"config":1}}

[Jul 10 11:48:25:901250] pilight-daemon: DEBUG: socket recv: {"status":"success"}
[Jul 10 11:48:25:902556] pilight-daemon: DEBUG: socket write succeeded: {"action":"request config"}

[Jul 10 11:48:25:952233] pilight-daemon: DEBUG: socket recv: {"message":"config","config":{"devices":{"pi1_switch1":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["gpio_switch"],"id":[{"gpio":12}],"state":"off"},"pi1_light1":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["relay"],"id":[{"gpio":15}],"state":"off"},"pi1_light2":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["relay"],"id":[{"gpio":16}],"state":"on"},"pi1_light4":{"uuid":"0000-80-1f-02-f6fe8d","protocol":["relay"],"id":[{"gpio":4}],"state":"off"},"pi2_light8":{"uuid":"0000-80-1f-02-f741c8","protocol":["relay"],"id":[{"gpio":12}],"state":"on"}},"rules":{"pi1_switch1_on":{"rule":"IF pi1_switch1.state IS on THEN toggle DEVICE pi1_light1 BETWEEN on AND off","active":1},"pi1_switch1_off":{"rule":"IF pi1_switch1.state IS off THEN toggle DEVICE pi1_light1 BETWEEN on AND off","active":1}},"gui":{"pi1_switch1":{"name":"Switch 1","group":["Switches"],"media":["all"]},"pi2_light8":{"name":"Light","group":["relay"],"media":["all"]}},"settings":{"log-level":6,"pid-file":"/var/run/pilight.pid","log-file":"/var/log/pilight.log","port":5000,"standalone":0,"webserver-enable":1,"webserver-root":"/usr/local/share/pilight/","webserver-http-port":5001,"webserver-cache":1},"hardware":{"none":{}},"registry":{"webgui":{"tabs":1},"pilight":{"version":{"current":"7.0"}}}}}
[Jul 10 11:48:25:954498] pilight-daemon: DEBUG: garbage collected config gui library
[Jul 10 11:48:25:955403] pilight-daemon: DEBUG: garbage collected config devices library
[Jul 10 11:48:25:956816] pilight-daemon: DEBUG: garbage collected config rules library
[Jul 10 11:48:25:957759] pilight-daemon: DEBUG: garbage collected config registry library
[Jul 10 11:48:25:961601] pilight-daemon: DEBUG: running on a raspberrypi
[Jul 10 11:48:25:963944] pilight-daemon: DEBUG: new thread gpio_switch, 5 threads running
[Jul 10 11:48:25:968519] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":15,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:48:25:969503] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":15,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:48:25:972794] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":16,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:48:25:988316] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":16,"state":"on"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:48:25:989920] pilight-daemon: DEBUG: loaded master configuration
[Jul 10 11:48:25:992233] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":4,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:48:25:993236] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":4,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:48:25:996252] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":12,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:48:25:997317] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":12,"state":"off"},"origin":"sender","protocol":"relay","uuid":"0000-80-1f-02-f6fe8d"}
[Jul 10 11:48:25:998557] pilight-daemon: ERROR: raspberrypi->waitForInterrupt: Trying to read from pin 12, but it's not configured as interrupt
[Jul 10 11:48:25:999787] pilight-daemon: ERROR: raspberrypi: error while calling waitForInterrupt
[  Jul 10 11:48:26:4882] pilight-daemon: DEBUG: garbage collected wiringX library
[  Jul 10 11:48:26:7722] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":12,"state":"off"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[ Jul 10 11:48:26:16172] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":12,"state":"off"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d"}
[ Jul 10 11:48:26:19355] pilight-daemon: DEBUG: socket write succeeded: {"message":{"gpio":12,"state":"on"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[ Jul 10 11:48:26:20416] pilight-daemon: DEBUG: broadcasted: {"message":{"gpio":12,"state":"on"},"origin":"receiver","protocol":"gpio_switch","uuid":"0000-80-1f-02-f6fe8d"}
[ Jul 10 11:48:26:37569] pilight-daemon: DEBUG: socket recv: {"origin":"update","type":1,"uuid":"0000-b8-27-eb-fa5551","devices":["pi1_switch1"],"values":{"timestamp":1436528906,"state":"on"}}
[ Jul 10 11:48:26:82875] pilight-daemon: DEBUG: socket recv: {"code":{"gpio":15,"on":1,"protocol":["relay"],"uuid":"0000-80-1f-02-f6fe8d"},"action":"send"}
[ Jul 10 11:48:26:83557] pilight-daemon: ERROR: relay: invalid gpio range
[ Jul 10 11:48:26:84155] pilight-daemon: DEBUG: socket write succeeded: {"status":"failed"}

[Jul 10 11:48:28:885693] pilight-daemon: DEBUG: cpu: 99.169699%, ram: 0.641584%
[Jul 10 11:48:28:887956] pilight-daemon: DEBUG: socket write succeeded: {"values":{"cpu":99.1696987630053144,"ram":0.6415843719392202},"origin":"core","type":-1,"uuid":"0000-80-1f-02-f6fe8d","action":"update"}

[Jul 10 11:48:28:888921] pilight-daemon: DEBUG: broadcasted: {"values":{"cpu":99.1696987630053144,"ram":0.6415843719392202},"origin":"core","type":-1,"uuid":"0000-80-1f-02-f6fe8d"}
^C[Jul 10 11:48:30:162445] pilight-daemon: DEBUG: received interrupt signal, stopping pilight...
[Jul 10 11:48:30:164543] pilight-daemon: DEBUG: socket write succeeded: HEART

[Jul 10 11:48:30:165507] pilight-daemon: DEBUG: garbage collected event operator library

By the way, after the error the CPU load goes up to 99% and stays there till i shutdown pilight again.
 
Reply
#8
Are you sure nothing else is using GPIO 12? Really sure?
 
Reply
#9
yes, in fact nothing is even wired at moment on that raspberry, just blank raspberry, freshly installed. just i2c module is enabled, but it shouldnt use pin 12/gpio 10.

the problem started around 2 weeks ago, when i attached my third one ( the master with the config ) to the cluster.
First i thought it was a problem with the hardware, i updated, upgraded etc, at last i even exchanged the raspberry completly and made a fresh install of raspbian on a fresh sd card and named it control01.
Im using pilight for a very long time, the setup was "control01" was master and "control02" was slave. After i had some issues with the wireless connection i added a third one connected by wire as master, and copied the config files there. From that point I have no light in the living room anymore and the switches also not working Big Grin
 
Reply
#10
Nothing being connected does not tell us that nothing is using the GPIO kernel wise. Can you check (if available):
Code:
cat /sys/kernel/debug/gpio
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Issue send actions over Socket API in AdHoc network ggtrts 10 777 03-13-2019, 06:32 AM
Last Post: curlymo
  AdHoc network with 2 Raspberry and 2 GPIO transmitter not working webdandy 29 6,517 09-06-2017, 02:39 PM
Last Post: wseifert
  BUG: BMP180 in AdHoc Network Alex 5 1,582 06-19-2016, 02:24 PM
Last Post: Alex
  AdHoc network with different senders Mr.Montesa 6 2,739 02-11-2016, 01:29 PM
Last Post: Karel
  Disable adhoc network? heikoh81 5 3,493 09-17-2015, 09:01 PM
Last Post: heikoh81
  Sending with 2 transmitters (AdHoc) tobid 11 4,403 08-23-2015, 05:12 PM
Last Post: curlymo
  AdHoc - Defining MainDaemon tobid 18 8,168 08-12-2015, 07:41 AM
Last Post: gregnau

Forum Jump:


Browsing: 1 Guest(s)