• 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
pilight-send seems successful but doesn't actually send RF signal
#1
Hi all,

I've always been using pilight 7.0 on Raspbian 8 (Jessie) to turn on/off my RF plugs using kaku_switch protocol on my Raspberry 2B.

However, I have recently decided to start from scratch on Raspbian 10 (Buster) and have installed pilight 8.1.5 on the same hardware.

After following the installation instructions, I managed to get everything "almost" working. I say "almost" because transmission seems to be successful, but switch doesn't actually turn on.
To make things simple and exclude possible SSDP issues, I'm running pilight in "standalone" mode.

In order to troubleshoot this, I have started pilight in debug mode and it seems process spawning is correct:

Code:
(/home/pilight/source/daemon-dev/daemon.c #3082) [Mar 01 13:17:38:512116] INFO: version v8.1.5
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #168) [Mar 01 13:17:38:530679] INFO: daemon listening to port: 5000
(/home/pilight/source/daemon-dev/libs/pilight/core/threads.c #165) [Mar 01 13:17:38:532354] DEBUG: new thread socket, 1 thread running
(/home/pilight/source/daemon-dev/libs/pilight/core/threads.c #167) [Mar 01 13:17:38:533286] DEBUG: new thread sender, 2 threads running
(/home/pilight/source/daemon-dev/libs/pilight/core/threads.c #167) [Mar 01 13:17:38:534368] DEBUG: new thread broadcaster, 3 threads running
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #577) [Mar 01 13:17:38:534683] INFO: new client, ip: 127.0.0.1, port: 40794
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #578) [Mar 01 13:17:38:535504] DEBUG: client fd: 12
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #605) [Mar 01 13:17:38:535675] DEBUG: client id: 1
(/home/pilight/source/daemon-dev/libs/pilight/core/threads.c #167) [Mar 01 13:17:38:536807] DEBUG: new thread receive parser, 4 threads running
(/home/pilight/source/daemon-dev/libs/pilight/core/threads.c #167) [Mar 01 13:17:38:537448] DEBUG: new thread events client, 5 threads running
(/home/pilight/source/daemon-dev/libs/pilight/core/webserver.c #1889) [Mar 01 13:17:38:537813] INFO: secured webserver started on port: 5002 (fd 13)
(/home/pilight/source/daemon-dev/libs/pilight/core/webserver.c #1892) [Mar 01 13:17:38:538041] INFO: regular webserver started on port: 5001 (fd 14)
(/home/pilight/source/daemon-dev/libs/pilight/core/ssdp.c #181) [Mar 01 13:17:38:538615] DEBUG: ssdp sent search
(/home/pilight/source/daemon-dev/libs/pilight/core/threads.c #167) [Mar 01 13:17:38:539586] DEBUG: new thread events loop, 6 threads running
(/home/pilight/source/daemon-dev/libs/pilight/events/events.c #2137) [Mar 01 13:17:38:642667] NOTICE: no pilight ssdp connections found
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #577) [Mar 01 13:17:38:643936] INFO: new client, ip: 127.0.0.1, port: 40796
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #578) [Mar 01 13:17:38:644108] DEBUG: client fd: 16
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #605) [Mar 01 13:17:38:644240] DEBUG: client id: 2
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #395) [Mar 01 13:17:38:644834] DEBUG: socket write succeeded: {"action":"identify","options":{"config":1,"receiver":1},"media":"all"}

(/home/pilight/source/daemon-dev/daemon.c #1186) [Mar 01 13:17:38:645230] DEBUG: socket recv: {"action":"identify","options":{"config":1,"receiver":1},"media":"all"}
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #395) [Mar 01 13:17:38:645659] DEBUG: socket write succeeded: {"status":"success"}
Then I issue a pilight-send from the same machine:

Code:
pilight-send -S 127.0.0.1 -P 5000 -p kaku_switch -i 47670957 -u 10 -t

And the pilight-daemon seems to be processing the command just fine:
Code:
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #577) [Mar 01 13:19:45:51966] INFO: new client, ip: 127.0.0.1, port: 40798
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #578) [Mar 01 13:19:45:52119] DEBUG: client fd: 17
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #605) [Mar 01 13:19:45:52345] DEBUG: client id: 3
(/home/pilight/source/daemon-dev/daemon.c #1186) [Mar 01 13:19:45:52668] DEBUG: socket recv: {"action":"identify"}
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #395) [Mar 01 13:19:45:53034] DEBUG: socket write succeeded: {"status":"success"}

(/home/pilight/source/daemon-dev/daemon.c #1186) [Mar 01 13:19:45:53448] DEBUG: socket recv: {"action":"send","code":{"on":1,"unit":10,"id":47670957,"protocol":["kaku_switch"]}}
(/home/pilight/source/daemon-dev/daemon.c #738) [Mar 01 13:19:45:54269] DEBUG: **** RAW CODE ****
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #395) [Mar 01 13:19:45:54349] DEBUG: socket write succeeded: {"status":"success"}

315 2835 315 1260 315 315 315 315 315 1260 315 1260 315 315 315 1260 315 315 315 315 315 1260 315 1260 315 315 315 315 315 1260 315 1260 315 315 315 1260 315 315 315 1260 315 315 315 315 315 1260 315 1260 315 315 315 1260 315 315 315 315 315 1260 315 315 315 1260 315 1260 315 315 315 1260 315 315 315 315 315 1260 315 1260 315 315 315 315 315 1260 315 1260 315 315 315 315 315 1260 315 1260 315 315 315 1260 315 315 315 315 315 1260 315 1260 315 315 315 315 315 1260 315 1260 315 315 315 1260 315 315 315 315 315 1260 315 1260 315 315 315 315 315 1260 315 10710
(/home/pilight/source/daemon-dev/daemon.c #745) [Mar 01 13:19:45:54702] DEBUG: **** RAW CODE ****
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #414) [Mar 01 13:19:45:54942] DEBUG: client disconnected, ip 127.0.0.1, port 40798
(/home/pilight/source/daemon-dev/libs/pilight/lua_c/async.c #865) [Mar 01 13:19:45:60275] DEBUG: lua async on state #0
(/home/pilight/source/daemon-dev/libs/pilight/core/socket.c #395) [Mar 01 13:19:45:60909] DEBUG: socket write succeeded: {"origin":"sender","protocol":"arctech_switch","message":{"id":47670957,"unit":10,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-c73cb4"}

(/home/pilight/source/daemon-dev/daemon.c #496) [Mar 01 13:19:45:61011] DEBUG: broadcasted: {"origin":"sender","protocol":"arctech_switch","message":{"id":47670957,"unit":10,"state":"on"},"repeat":1,"uuid":"0000-b8-27-eb-c73cb4"}
(/home/pilight/source/daemon-dev/libs/pilight/lua_c/async.c #737) [Mar 01 13:19:45:161516] DEBUG: lua timer on state #0

However, the switch does not turn on.
This is my pilight config:
Code:
{
    "devices": {},
    "rules": {},
    "gui": {},
    "settings": {
        "log-level": 6,
        "pid-file": "/var/run/pilight.pid",
        "log-file": "/var/log/pilight.log",
        "standalone": 1,
        "port": 5000,
        "webserver-enable": 0,
        "webserver-root": "/usr/local/share/pilight/webgui",
        "webserver-http-port": 5001,
        "webserver-https-port": 5002,
        "webserver-cache": 1,
        "whitelist": "*.*.*.*",
        "gpio-platform": "raspberrypi2"
    },
    "hardware": {
        "433gpio": {
            "sender": 1,
            "receiver": -1
        }
    },
    "registry": {
        "webserver": {
            "ssl": {
                "certificate": {
                    "location": "/etc/pilight/pilight.pem"
                }
            }
        },
        "pilight": {
            "version": {
                "current": "8.1.5"
            }
        },
        "hardware": {
            "RF433": {
                "mingaplen": 4420,
                "maxgaplen": 72900,
                "minrawlen": 26,
                "maxrawlen": 400
            }
        }
    }
}

As you can see, I have:
1. customized the port (5000)
2. disabled the webserver as I don't need it
3. whitelisted all IPs
4. specified the gpio platform to raspberrypi2
5. set the GPIO PIN according to my setup (the same one that used to work fine in the past)
Do you have suggestions on how to troubleshoot this further?
Thanks
 
Reply
#2
Can you connect a LED instead of the sender to see if that blinks when sending.
 
Reply
#3
(03-01-2020, 07:13 PM)curlymo Wrote: Can you connect a LED instead of the sender to see if that blinks when sending.

Thanks for your prompt reply curlymo, that's very good idea indeed! However I have no small resistors handy, I ran out of them and need to order, so that might take a while until I receive them.
Any other suggestions in the meantime?
 
Reply
#4
Using the LED without resistor. It won't break that easy.
 
Reply
#5
Hi, I have just verified with a multimeter and it seems the GPIO is receiving something when pilight-send is issued (voltage goes up during transmission and down to 0 at the end of it).

I'm wondering if anything was changed in the actual RF transmission wrt pilight 7.0? Maybe some timing change upon sending the signal?

One change I noticed in the pilight config file is that we now have parameters like mingaplen, maxgaplen, minrawlen, maxrawlen... which seem to be related to the length of the signals and the gap between them... are they the same as in pilight 7.0 or they got changed?

Thanks in advance
 
Reply
#6
Have you tried the latest nightly?
 
Reply
#7
Yes, I have just given it a try, but unfortunately I see the same behaviour.
 
Reply
#8
Can you connect a sender and check what pilight receives when sending?
 
Reply
#9
Unfortunately I have no 433Mhz receiver handy to check that.

In the end I gave up and switched back to the old pilight version, which works just fine.

Thanks for all your inputs
 
Reply
#10
Just one more question: was pilight 8.1.5 ever tested on Raspbian Buster? I would really like to move to the latest version.

The reason why I'm starting afresh is because I ended up in a weird situation where the memory of my PI is getting corrupted every few weeks. Now, starting from scratch with Buster and re-installing the old kernel to let pilight work (sudo rpi-update 52241088c1da59a359110d39c1875cda56496764) yesterday, I've just experienced file system corruption again. I'm afraid this might be due to the old kernel (maybe this https://lore.kernel.org/patchwork/patch/856115/)... so it would be really great for me to avoid the kernel downgrade via rpi-update.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  pilight switch node in node-red framp 0 112 06-24-2020, 10:01 PM
Last Post: framp
  pilight-control TML 13 693 05-27-2020, 07:51 AM
Last Post: curlymo
  API Requests by HTTP from other devices fore use in pilight scootermacro 2 299 05-10-2020, 08:19 AM
Last Post: scootermacro
  Can't send or receive on Raspberry Pi Zero W ChristophH 12 725 04-09-2020, 06:34 PM
Last Post: curlymo
  pilight 8.1.5 not working on Raspberry pi after reboot beejayf 4 720 03-08-2020, 12:14 AM
Last Post: beejayf
  pilight cpu usage possibly associated with noticeable sluggishness? hepcat72 4 749 01-28-2020, 08:02 PM
Last Post: hepcat72
  apt.pilight.org stable Release' is not signed. thomasol 2 827 01-23-2020, 11:34 PM
Last Post: thomasol
  pilight and SIGNALduino cc1101 Caleus 0 570 01-19-2020, 09:13 AM
Last Post: Caleus
  filter stopped working after update to pilight 8.1.5 zlin50 19 1,805 01-03-2020, 02:15 PM
Last Post: curlymo
Question [Solved] Openweathermap with pilight 7.0-40 doesn't work Seebueb 2 725 01-01-2020, 06:45 PM
Last Post: Seebueb

Forum Jump:


Browsing: 1 Guest(s)