• 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 cpu usage possibly associated with noticeable sluggishness?
#1
Hi,

I use pilight in conjunction with homebridge to be able to control some Etekcity RF outlets via Siri.  I use the pilight-send command with raw codes to send signals to those outlets since there is no Etekcity "plugin".  I don't really use the receiver except in pilight-debug to record the codes of various remotes.  I maintain outlet state outside of pilight using a script that executes the send commands.

My overall problem is that often, I have to issue commands twice because Siri complains that my device isn't responding and I frequently see the "No response" state on all devices in the home app.  With this in mind, I think that my expereince of the following might be a clue as to the cause of these things...

I logged into my pi yesterday to edit a config file and noticed significant slowness when just trying to move the cursor around in vi.  I exited and checked `top` and I noted that `pilight-daemon` took up to 50% cpu.  It hovered anywhere between 25-50%, but never went lower than that.  The second item in `top` was `top`, using at most, 11%.  I checked the cpu temp and it was fine - no warnings.

I also noted during that slowness that I had to issue commands to Siri twice and the "No response" message in the home app was showing up and going away intermittently.

I don't know if the cpu usage of pilight was the reason for the noticeable slowness, but I did some reading and inferred that this usage may be due to the processing of signals being received.  Whether or not that's the case, I wondered whether there was something I could do to reduce the cpu load of pilight.

I found a mention of using a filter, but I couldn't find anything in the documentation on how to implement filtering.  I saw something else suggesting it might be a physical filter?  I also very briefly looked into the possibility of disabling the receiver in pilight before getting distracted with other items in my to-do list.

1. Is my understanding of the cause of the cpu usage correct?
2. If so, can I or how do I disable the receiver - and will that reduce the cpu load?
 
Reply
#2
Check the manual regarding your question regarding the disabling of pins:
https://manual.pilight.org/configuration....html#gpio
 
Reply
#3
(01-27-2020, 09:07 PM)curlymo Wrote: Check the manual regarding your question regarding the disabling of pins:
https://manual.pilight.org/configuration....html#gpio

I see that I can disable the receive pin by setting it to -1 according to the doc you indicated (thanks!), but does that disable it for pilight-debug as well?  Or will I still be able to operate as I described (only using receive to determine codes by stopping the daemon and running pilight-debug).

If disabling the pin as you suggested disables it for the daemon and for pilight-debug, is there a setting somewhere that would disable it only for the daemon and still have it work when I run pilight-debug?

If not, I suppose I could wrap pilight-debug in a script that changes that setting after stopping pilight...  Otherwise, I know I'll forget and when I get a new device, I'll spin my wheels trying to figure out why I can't detect the remote...  My memory is not that great for that sort of infrequent need.
 
Reply
#4
It disables it for both, but you can use another config for pilight-debug
 
Reply
#5
(01-28-2020, 06:20 AM)curlymo Wrote: It disables it for both, but you can use another config for pilight-debug

Ah-ha!  Yes.  Good idea.  I could create an alias for pilight-debug that adds the --config option.  Thanks!
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  CPU Usage TomiB 8 2,203 01-04-2021, 07:29 PM
Last Post: ayeyebrazov
  pilight-debug format Rschnauzer 2 193 12-17-2020, 07:09 PM
Last Post: Rschnauzer
  pilight-flash not working danny 14 2,371 12-12-2020, 10:00 AM
Last Post: tox
  pilight does not start, Deamon is not found. Dekkertje 6 282 12-08-2020, 06:55 PM
Last Post: Dekkertje
  Failed pilight-send that say they succeeded hepcat72 2 192 12-05-2020, 05:30 PM
Last Post: hepcat72
  apt.pilight.org/dists/stable/main/binary 301 Moved Permanently Rschnauzer 6 440 11-23-2020, 01:49 PM
Last Post: Rschnauzer
  bridging pilight and mosquitto hansrijn2 5 679 10-26-2020, 06:31 PM
Last Post: hansrijn2
  problem publish to pilight MQTT server Emiks5 4 889 08-31-2020, 07:45 PM
Last Post: Emiks5
  pilight for Raspbian Buster (raspberry pi 4) ? starob 32 11,967 08-10-2020, 09:12 AM
Last Post: simanuel
  pilight switch node in node-red framp 0 745 06-24-2020, 10:01 PM
Last Post: framp

Forum Jump:


Browsing: 1 Guest(s)