vikt0rm / dbus-shelly-1pm-pvinverter

Integrate Shelly 1PM into Victron Energies Venus OS as a pv inverter
51 stars 57 forks source link

CPU consumption - Feature request: configurable polling time #22

Open ramack opened 1 year ago

ramack commented 1 year ago

May I propose to make the polling time a configuration option?

I recognized a high CPU load (around 15-20%) by the shelly-1pm driver which is really an issue in my beaglebone base VenusOS, taking care of also 4 BMSs with the serial-driver.

It looks like the driver is polling 4 times per second and in my setup the shelly data is really low priority compared to the batteries, which I poll only every 5 seconds to keep the system up, so I'd appreciate if I could reduce the CPU load by increasing the poll interval for the shelly.

As a default value I would even propose to go for 1 second...

emuman049 commented 1 year ago

Makes sense. For now, you could increase the value in line 64 to 1000 or more.