bwoodworth / hassio-addons

11 stars 9 forks source link

Wait option #14

Open Scott8586 opened 4 years ago

Scott8586 commented 4 years ago

Adding a wait time option - effectively the scan interval for MQTT messages in the absence of a command.

Scott8586 commented 4 years ago

First off, sorry about the aborted pull request. I suspected that this add-on was causing some higher than expected CPU utilization on a Raspberry Pi 3B+, so I've created a version which adds a wait option, to control how long mosquitto sits waiting for an MQTT command. I had to create a repository of my own to test it out under hassio+supervisor, so I had to change some other configuration files, but the patch attached below includes only the changes necessary in your add-on repository. See the attached image for the change in CPU utilization. This is the difference between the default 10 seconds, and 60 seconds. For me, it makes a significant difference in responsiveness.

I hope this can be incorporated into your master, but in any event, thanks for your work on this add-on - it's been very useful.

Screen Shot 2020-08-09 at 6 39 31 AM

wait_option.txt