• 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
how to compile pilight with custom protocol code? am i missing something?
#1
i found this code containing a custom pilight weather protocol on the internet:

github.com/mikepparks/pilight-protocols

i have successfully compiled it in pilight 8.0.2 under raspbian and debian stretch for armhf and aarch64 respectively, but i can't tell if it's working or not. i'm wondering if i missed any steps. here is a rundown of what i did:

- installed libunwind-dev, libwiringx-dev dependencies (aarch64 required me to compile libunwind-1.5.0 from source)
- downloaded and extracted pilight v8.0.2.tar.gz
- cloned github.com/mikepparks/pilight-protocols and copied acurite_606tx.* to pilight_8.0.2/libs/pilight/protocols/433.92/
- ran pilight_8.0.2/setup.sh and unselected all protocols except for cpu_temp, ping and relay (everything not labeled 'protocol_' left selected)

was there something else i needed to do to include the new protocol? pilight appears to run without issues, although i got a segmentation fault on startup with the newest pilight 8.1.5 so i downgraded to a pre-libmbed version which cleared that up.

here is the startup logging in case there's something revealing:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[10:33:06] INFO: GPIO Platform used: raspberrypi4
[10:33:06] WARNING: SENDER Pin is disabled
[10:33:06] INFO: RECEIVER Pin is: 9
[10:33:07] WARNING: Starting pilight daemon in debug Mode
[Jun 22 15:33:07:856274] pilight-daemon: INFO: version
[Jun 22 15:33:07:857594] pilight-daemon: DEBUG: ssdp sent search
[Jun 22 15:33:07:961895] pilight-daemon: INFO: no pilight daemon found, daemonizing
[Jun 22 15:33:07:963238] pilight-daemon: INFO: daemon listening to port: 5000
[Jun 22 15:33:07:965929] pilight-daemon: DEBUG: new thread socket, 1 thread running
[Jun 22 15:33:07:966293] pilight-daemon: DEBUG: new thread ssdp, 2 threads running
[Jun 22 15:33:07:966604] pilight-daemon: DEBUG: new thread sender, 3 threads running
[Jun 22 15:33:07:966921] pilight-daemon: DEBUG: new thread broadcaster, 4 threads running
[Jun 22 15:33:07:967495] pilight-daemon: INFO: new client, ip: 127.0.0.1, port: 38946
[Jun 22 15:33:07:967566] pilight-daemon: DEBUG: client fd: 8
[Jun 22 15:33:07:967614] pilight-daemon: DEBUG: client id: 1
[Jun 22 15:33:07:991928] pilight-daemon: DEBUG: new thread 433gpio, 5 threads running
[Jun 22 15:33:07:992297] pilight-daemon: DEBUG: new thread receive parser, 6 threads running
[Jun 22 15:33:07:993731] pilight-daemon: DEBUG: new thread events client, 7 threads running
[Jun 22 15:33:07:994151] pilight-daemon: DEBUG: new thread events loop, 8 threads running
[Jun 22 15:33:07:994510] pilight-daemon: DEBUG: webserver listening to port 5001
[Jun 22 15:33:07:995606] pilight-daemon: DEBUG: new thread webserver worker #0, 9 threads running
[Jun 22 15:33:07:995974] pilight-daemon: DEBUG: ssdp sent notify
[Jun 22 15:33:07:996562] pilight-daemon: DEBUG: new thread webserver client, 10 threads running
[Jun 22 15:33:07:997058] pilight-daemon: DEBUG: new thread webserver broadcast, 11 threads running
[Jun 22 15:33:07:998000] pilight-daemon: DEBUG: cpu: 0.000000%, ram: 0.146211%
[Jun 22 15:33:07:998666] pilight-daemon: DEBUG: ssdp sent search
[   Jun 22 15:33:08:125] pilight-daemon: DEBUG: ssdp sent notify
[  Jun 22 15:33:08:1153] pilight-daemon: DEBUG: ssdp sent search
[Jun 22 15:33:08:102581] pilight-daemon: INFO: new client, ip: 172.30.33.1, port: 37064
[Jun 22 15:33:08:102886] pilight-daemon: DEBUG: client fd: 14
[Jun 22 15:33:08:103071] pilight-daemon: DEBUG: client id: 2
[Jun 22 15:33:08:102744] pilight-daemon: DEBUG: socket write succeeded: {"action":"identify","options":{"config":1,"core":1},"media":"web"}
[Jun 22 15:33:08:102744] pilight-daemon: DEBUG: socket write succeeded: {"action":"identify","options":{"config":1,"receiver":1},"media":"all"}
[Jun 22 15:33:08:104234] pilight-daemon: INFO: new client, ip: 172.30.33.1, port: 37066
[Jun 22 15:33:08:296937] pilight-daemon: DEBUG: client fd: 16
[Jun 22 15:33:08:297288] pilight-daemon: DEBUG: client id: 3
[Jun 22 15:33:08:297569] pilight-daemon: DEBUG: socket recv: {"action":"identify","options":{"config":1,"core":1},"media":"web"}
[Jun 22 15:33:08:298203] pilight-daemon: DEBUG: socket write succeeded: {"status":"success"}
[Jun 22 15:33:08:298396] pilight-daemon: DEBUG: socket recv: {"action":"identify","options":{"config":1,"receiver":1},"media":"all"}
[Jun 22 15:33:08:298644] pilight-daemon: DEBUG: socket write succeeded: {"status":"success"}
[  Jun 22 15:33:11:1391] pilight-daemon: DEBUG: cpu: 0.090947%, ram: 0.146211%
[  Jun 22 15:33:11:2069] pilight-daemon: DEBUG: socket write succeeded: {"values":{"cpu":0.0909468159968284,"ram":0.1462108774976811},"origin":"core","type":-1,"uuid":"0000-02-42-ac-1e2101"}
[  Jun 22 15:33:11:2131] pilight-daemon: DEBUG: broadcasted: {"values":{"cpu":0.0909468159968284,"ram":0.1462108774976811},"origin":"core","type":-1,"uuid":"0000-02-42-ac-1e2101"}
 
Reply
#2
I would open an issue on their github repository to ask for an installation howto. It's difficult to support other's code when there is no pull request made for merging into the pilight core.
 
Reply
#3
(06-22-2021, 06:18 PM)curlymo Wrote: I would open an issue on their github repository to ask for an installation howto. It's difficult to support other's code when there is no pull request made for merging into the pilight core.

I tried contacting the developer with no success.  regardless of whether this untested code works or not, is it sufficient to copy the *.h and *.c files into the libs/pilight/protocols/433.92/ directory for the protocol to be successfully compiled? does the setup.sh script automatically pick up everything present or do I need to modify it manually? I see the files I added being processed in the cmake output, but are they being included in the final pilight libraries? do I need to edit something?

compiling is something I can control. if I'm doing it wrong I can fix it. if the code is broken; it's broken and i'm inclined to just move on at that point. thanks.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  pilight on raspbian bullseye ChristianK 0 83 11-19-2021, 01:10 PM
Last Post: ChristianK
Question pilight stopped working sl4m01 5 1,282 09-16-2021, 01:34 PM
Last Post: orlo11
  Staging does not compile with new backtrace? akloeckner 1 254 05-16-2021, 07:48 AM
Last Post: akloeckner
  hardware info lost after pilight restart Rschnauzer 3 433 03-17-2021, 11:44 AM
Last Post: Rschnauzer
  pilight-raw changes output format from 7 to 8 Rschnauzer 1 758 11-26-2020, 01:52 PM
Last Post: curlymo
Question pilight nightly webgui offline after some hours fleisch 4 829 10-26-2020, 05:19 PM
Last Post: fleisch
  rpi3 Buster Compile Error Nikau 9 2,876 03-26-2020, 08:47 AM
Last Post: tvdgeer
  pilight bugs Ascenion 1 752 03-23-2020, 06:29 PM
Last Post: curlymo
  [Solved] pilight service crashing on first webserver access after reboot VrahoK 20 4,976 12-21-2019, 09:46 AM
Last Post: curlymo
  pilight-control modify values coolinx 16 4,011 11-13-2019, 08:02 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)