• 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 network with 2 Raspberry and 2 GPIO transmitter not working
#1
Hey there,

hope anybody can help me with my AdHoc setup.

My configuration:

One Raspberry Pi connected with GPIO transmitter and receiver is running as daemon wit the following configuration.
This node should only send the signal to devices with uuid 0000-b8-27-eb-8945ae.

version v7.0
Raspberry master: 0000-b8-27-eb-8945ae

Code:
{
        "devices": {
                "Steckdose1": {
                        "uuid": "0000-b8-27-eb-8945ae",
                        "protocol": [ "elro_800_switch" ],
                        "id": [{
                                "systemcode": 21,
                                "unitcode": 15
                        }],
                        "state": "on"
                },
                "Steckdose16": {
                        "uuid": "0000-24-05-0f-3134de",
                        "protocol": [ "kaku_switch_old" ],
                        "id": [{
                                "id": 15,
                                "unit": 10
                        }],
                        "state": "off"
                }
        },
        "rules": {},
        "gui": {},
        "settings": {
                "log-level": 6,
                "pid-file": "/var/run/pilight.pid",
                "log-file": "/var/log/pilight.log",
                "port": 5000,
                "webserver-enable": 1,
                "webserver-root": "/usr/local/share/pilight/",
                "webserver-http-port": 8080,
                "webserver-cache": 1
        },
        "hardware": {
                "433gpio": {
                        "sender": 1,
                        "receiver": 0
                }
        },
        "registry": {
                "pilight": {
                        "firmware": {
                                "version": 33961,
                                "lpf": 62570,
                                "hpf": 102720
                        },
                        "version": {
                                "current": "7.0"
                        }
                }
        }
}

The second Raspberry Pi connected with GPIO transmitter only is running as client to extend the signal for switching the light in the bedroom with the following configuration.
The device in the bedroom (Steckdose16) is configured with the uuid 0000-24-05-0f-3134de.

version v7.0
Raspberry client: 0000-24-05-0f-3134de

Code:
{
        "devices": {},
        "rules": {},
        "gui": {},
        "settings": {
                "log-level": 6,
                "pid-file": "/var/run/pilight.pid",
                "log-file": "/var/log/pilight.log"
        },
        "hardware": {
                "433gpio": {
                        "sender": 1,
                        "receiver": 0
                }
        },
        "registry": {
                "pilight": {
                        "version": {
                                "current": "7.0"
                        }
                }
        }
}

The problem is, as soon as I have started the pilight service on the second node in client-mode the signal is not switching the light in the bedroom on.

But I can see that the command is arriving on the client
Quote:[Apr 25 05:50:01:388558] pilight-daemon: DEBUG: socket recv: {"code":{"id":15,"unit":10,"on":1,"protocol":["kaku_switch_old"]},"action":"send"}
[Apr 25 05:50:01:389395] pilight-daemon: DEBUG: **** RAW CODE ****
[Apr 25 05:50:01:389472] pilight-daemon: DEBUG: socket write succeeded: {"status":"success"}

335 1005 335 1005 335 1005 1005 335 335 1005 335 1005 335 1005 1005 335 335 1005 1005 335 335 1005 1005 335 335 1005 1005 335 335 1005 1005 335 335 1005 335 1005 335 1005 1005 335 335 1005 1005 335 335 1005 1005 335 335 11390
[Apr 25 05:50:01:389660] pilight-daemon: DEBUG: **** RAW CODE ****
[Apr 25 05:50:01:517369] pilight-daemon: DEBUG: cpu: 1.293446%, ram: 0.322213%
[Apr 25 05:50:01:518952] pilight-daemon: DEBUG: socket write succeeded: {"values":{"cpu":1.2934460751332100,"ram":0.3222129907756545},"origin":"core","type":-1,"uuid":"0000-24-05-0f-3134de","action":"update"}

[Apr 25 05:50:01:519118] pilight-daemon: DEBUG: broadcasted: {"values":{"cpu":1.2934460751332100,"ram":0.3222129907756545},"origin":"core","type":-1,"uuid":"0000-24-05-0f-3134de"}
[Apr 25 05:50:01:840376] pilight-daemon: DEBUG: successfully send arctech_switch_old code
[Apr 25 05:50:01:842327] pilight-daemon: DEBUG: socket write succeeded: {"origin":"sender","protocol":"arctech_switch_old","message":{"id":15,"unit":10,"state":"on"},"repeat":1,"uuid":"0000-24-05-0f-3134de","action":"update"}

[Apr 25 05:50:01:842448] pilight-daemon: DEBUG: broadcasted: {"origin":"sender","protocol":"arctech_switch_old","message":{"id":15,"unit":10,"state":"on"},"repeat":1,"uuid":"0000-24-05-0f-3134de"}
[Apr 25 05:50:01:848050] pilight-daemon: DEBUG: socket recv: {"origin":"update","type":1,"devices":["Steckdose16"],"values":{"timestamp":1461563401,"state":"on"}}

[Apr 25 05:50:04:521729] pilight-daemon: DEBUG: cpu: 0.819310%, ram: 0.322213%
[Apr 25 05:50:04:522640] pilight-daemon: DEBUG: socket write succeeded: {"values":{"cpu":0.8193104311678705,"ram":0.3222129907756545},"origin":"core","type":-1,"uuid":"0000-24-05-0f-3134de","action":"update"}



In the debug mode I can see that the client is successfully connecting to the master and synchronizing the configuration.
Quote:root@osmc-Schlafzimmer-Pi2 ~ # pilight-daemon -D
[ Apr 25 05:46:27:25588] pilight-daemon: INFO: version v7.0
[ Apr 25 05:46:27:26808] pilight-daemon: DEBUG: ssdp sent search
[Apr 25 05:46:27:138374] pilight-daemon: NOTICE: a pilight daemon was found @192.168.1.4, clientizing
[Apr 25 05:46:27:140767] pilight-daemon: DEBUG: new thread node, 1 thread running
[Apr 25 05:46:27:141059] pilight-daemon: DEBUG: new thread sender, 2 threads running
[Apr 25 05:46:27:141351] pilight-daemon: DEBUG: new thread broadcaster, 3 threads running
[Apr 25 05:46:27:141352] pilight-daemon: DEBUG: ssdp sent search
[Apr 25 05:46:27:142568] pilight-daemon: DEBUG: running on a raspberrypi
[Apr 25 05:46:27:145474] pilight-daemon: DEBUG: new thread 433gpio, 4 threads running
[Apr 25 05:46:27:149830] pilight-daemon: DEBUG: new thread receive parser, 5 threads running
[Apr 25 05:46:27:150741] pilight-daemon: DEBUG: cpu: 0.000000%, ram: 0.322746%
[Apr 25 05:46:27:277757] pilight-daemon: DEBUG: socket write succeeded: {"action":"identify","uuid":"0000-24-05-0f-3134de","options":{"receiver":1,"forward":1,"config":1}}

[Apr 25 05:46:27:286803] pilight-daemon: DEBUG: socket recv: {"status":"success"}
[Apr 25 05:46:27:287017] pilight-daemon: DEBUG: socket write succeeded: {"action":"request config"}

[Apr 25 05:46:27:331783] pilight-daemon: DEBUG: socket recv: {"message":"config","config":{"devices":{"Steckdose1":{"uuid":"0000-b8-27-eb-8945ae","protocol":["elro_800_switch"],"id":[{"systemcode":21,"unitcode":15}],"state":"on"},"Steckdose2":{"uuid":"0000-b8-27-eb-8945ae","protocol":["elro_800_switch"],"id":[{"systemcode":5,"unitcode":15}],"state":"off"},"Steckdose3":{"uuid":"0000-b8-27-eb-8945ae","protocol":["elro_800_switch"],"id":[{"systemcode":21,"unitcode":14}],"state":"off"},"Steckdose4":{"uuid":"0000-b8-27-eb-8945ae","protocol":["elro_800_switch"],"id":[{"systemcode":5,"unitcode":14}],"state":"off"},"Steckdose5":{"protocol":["elro_800_switch"],"id":[{"systemcode":21,"unitcode":13}],"state":"on"},"Steckdose6":{"protocol":["elro_800_switch"],"id":[{"systemcode":21,"unitcode":13}],"state":"on"},"Steckdose7":{"protocol":["elro_800_switch"],"id":[{"systemcode":21,"unitcode":13}],"state":"on"},"Steckdose8":{"protocol":["elro_800_switch"],"id":[{"systemcode":21,"unitcode":13}],"state":"on"},"Steckdose9":{"protocol":["elro_800_switch"],"id":[{"systemcode":21,"unitcode":11}],"state":"on"},"Steckdose10":{"protocol":["elro_800_switch"],"id":[{"systemcode":5,"unitcode":11}],"state":"on"},"Steckdose11":{"protocol":["kaku_switch_old"],"id":[{"id":10,"unit":10}],"state":"off"},"Steckdose12":{"protocol":["elro_800_switch"],"id":[{"systemcode":5,"unitcode":2}],"state":"off"},"Steckdose13":{"protocol":["kaku_switch_old"],"id":[{"id":12,"unit":10}],"state":"off"},"Steckdose14":{"protocol":["elro_800_switch"],"id":[{"systemcode":21,"unitcode":13}],"state":"on"},"Steckdose15":{"protocol":["elro_800_switch"],"id":[{"systemcode":21,"unitcode":13}],"state":"on"},"Steckdose16":{"uuid":"0000-24-05-0f-3134de","protocol":["kaku_switch_old"],"id":[{"id":15,"unit":10}],"state":"off"},"Flur":{"protocol":["program"],"id":[{"name":"AllON"}],"program":"/bin/sh","arguments":"/root/.homebridge/scripts/flurlicht.sh","stop-command":"/bin/sh /root/.homebridge/scripts/flurlicht.sh","start-command":"/bin/sh /root/.homebridge/scripts/flurlicht.sh","state":"stopped","pid":0}},"rules":{},"gui":{"Steckdose1":{"name":"TV Wohnzimmer","group":["Wohnzimmer"],"media":["all"],"readonly":0},"Steckdose2":{"name":"Stehlampe","group":["Wohnzimmer"],"media":["all"],"readonly":0},"Steckdose4":{"name":"LED-Stripes Fensterbank","group":["Wohnzimmer"],"media":["all"],"readonly":0},"Steckdose11":{"name":"LED-Stripes-Küche","group":["Küche"],"media":["all"],"readonly":0},"Steckdose9":{"name":"Drucker","group":["Flur"],"media":["all"],"readonly":0},"Flur":{"name":"Flurbeleuchtung","group":["Flur"],"media":["all"],"readonly":0},"Steckdose10":{"name":"PC-Fabian","group":["Prinzessinnenzimmer"],"media":["all"],"readonly":0},"Steckdose13":{"name":"TV Schlafzimmer","group":["Schlafzimmer"],"media":["all"],"readonly":0},"Steckdose16":{"name":"Schlafzimmerbeleuchtung","group":["Schlafzimmer"],"media":["all"],"readonly":0}},"settings":{"log-level":6,"pid-file":"/var/run/pilight.pid","log-file":"/var/log/pilight.log","port":5000,"webserver-enable":1,"webserver-root":"/usr/local/share/pilight/","webserver-http-port":8080,"webserver-cache":1},"hardware":{"433gpio":{"sender":1,"receiver":0}},"registry":{"pilight":{"firmware":{"version":238,"lpf":404300,"hpf":463900},"version":{"current":"7.0"}}}}}
[Apr 25 05:46:27:333376] pilight-daemon: DEBUG: garbage collected config gui library
[Apr 25 05:46:27:333500] pilight-daemon: DEBUG: garbage collected config devices library
[Apr 25 05:46:27:333557] pilight-daemon: DEBUG: garbage collected config rules library
[Apr 25 05:46:27:333612] pilight-daemon: DEBUG: garbage collected config registry library
[Apr 25 05:46:27:342753] pilight-daemon: DEBUG: loaded master configuration
[Apr 25 05:46:27:342997] pilight-daemon: DEBUG: new thread program, 6 threads running

If I execute pilight-send I can switch the light on. This is working from the master and the client Raspberry Pi.

Does anybody have a similar setup that is working?

I'm thankful for every feedback und hopefully solving the problem.

Thanks,
Fabian
 
Reply
#2
As far as I know, UUID only affects direct connected (Wired to GPIO) devices.

The Problem is, that if you send out Wireless Signals on two senders, they interfere each other.

My Solution was to have a daemon in my Serverrack, only receiving, and a wireless connected node in an central Position equipped with +3dbi- Antennas to reach every socket around the house.
 
Reply
#3
Hi Alex,
thanks for your feedback!

Interferencing sounds like the problem I have too. I thought that the uuid is also working for devices not directly connected...

What do you mean with wirelsess node? Raspberry with wlan and transmitter?

This is a good idea and should work for me also.

What antenna are you using?

Thanks,
Fabian
 
Reply
#4
The UUID also applies to RC devices, so specifying a uuid for a 433 MHz device will cause only a specific node to send this signal.

Interference is quite a common problem if there are several nodes sending the same signals at the same time. I always specify a uuid for all device that require sending.
 
Reply
#5
Can you please let me know how to configure this?
A short example would be nice ;-)
 
Reply
#6
@pilino1234, that feature is not implemented in the development branch, only in the rewrite code.
 
Reply
#7
I´ve soldered an SMA-Connector to my Pi and use one of These

http://www.amazon.de/DeLock-ISM-433-MHz-...detailpage
http://www.amazon.de/DELOCK-Antenne-ISM-...detailpage

SMA-Connector
 
Reply
#8
I found this rather old thread by accident, looking for something else.

This feature will be implemented in the rewrite version, but for those interested, it can easily be implemented in the development version too.

It can be done just by adding a check for devices with hwtype RF433 in both devices.c (line 446) and daemon.c (line 1106). Ofc you will have to rebuild pilight on both master and client.

That is what I did myself some time ago because my ad hoc network was useless because of interference and it is working like a charm. If you add the uuid of the client to a 433 device in your master config, only the client will send for that device. Without uuid or with the uuid of the master, only the master will send.
 
Reply
#9
@Niek

can you post a code snippet?
I also have problems with interference in my ad hoc network with three pilights (one master, two slaves)

Thanks
Werner
 
Reply
#10
@curlymo

Perhaps it is possible to backport this from 8.x_dev to the nightly-Version?

Would be really helpful!

Best Alex
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  ERROR: The Broadcom 2835 GPIO 0 is not set to output mode stuckinger 10 762 05-07-2019, 09:11 PM
Last Post: curlymo
  Issue send actions over Socket API in AdHoc network ggtrts 10 777 03-13-2019, 06:32 AM
Last Post: curlymo
  433 mhz receiver working on Raspberry pi with a hack knex 3 1,880 01-21-2018, 06:28 PM
Last Post: curlymo
Bug Bug report: WIFI dongle stops when gpio_switch.gpio = 20 woutput 16 5,028 01-03-2018, 10:11 PM
Last Post: zackdvd
  pilight on RPi with latest Arch stopped working Ypsilon 12 4,706 12-17-2017, 12:43 PM
Last Post: tinusv
  pilight-raw working in nightly? Cipher 8 1,703 08-30-2017, 09:35 PM
Last Post: curlymo
  development, orangepi pc+, "no gpio-platform configured" Twain 1 2,198 06-01-2017, 05:51 PM
Last Post: curlymo
  glibc 2.24 / kernel 4.8.x breaks things on raspberry pi? Forumkel 0 804 12-11-2016, 02:25 PM
Last Post: Forumkel
  Reset of GPIO ports / Detection of mobile phone NormBot 1 1,345 09-02-2016, 08:30 AM
Last Post: wo_rasp
  BUG: BMP180 in AdHoc Network Alex 5 1,581 06-19-2016, 02:24 PM
Last Post: Alex

Forum Jump:


Browsing: 1 Guest(s)