jlama / powertagd

15 stars 7 forks source link

[Question] Is there a way to throttle this to only poll every 10 seconds or so? #15

Closed ghogberg closed 4 months ago

ghogberg commented 5 months ago

It seems right now that it just rotates through all the sensors and ships the data to the MQTT broker as fast as it can, and sometimes this granularity is super awesome of course, but in regular situations having it rotate through once every 10 seconds is probably enough to have some overview of the situation. I guess I could try to omit committing all this data to the InfluxDB as the data rapidly fills up the storage space otherwise. Happy to take any input to make this change, maybe an easy "sleep" or "delay" somewhere in the code (my GO knowledge is sadly lacking, but I was able to tweak it to work in the first place). Other than that I want to give a huge thanks for getting this setup as it was the one missing piece to get the sensors into Home Assistant for better tracking than I ever had in the Schneider Controller setup.

jlama commented 5 months ago

PowerTags send reports every 5s by default. It's possible to change it but it's not implemented at the moment. Otherwise you can try compacting old data in InfluxDB.

ghogberg commented 4 months ago

Cool, will start with compacting the data for now. Thanks for setting this implementation up as it so far has worked pretty good and I'm just seeing some minor issues which is mainly related to placement of the power tags themselves etc. Nice to be able to track the various loads on the breaker panel.