Plugwise-2-py icon indicating copy to clipboard operation
Plugwise-2-py copied to clipboard

Request: show cum_energy in monitor message

Open tvwerkhoven opened this issue 3 years ago • 0 comments

I'd like to show both the real-time power and power consumption in Home Assistant which is difficult in current setup. Any chance to include consumption in the ten_seconds() monitor loop?

Situation: Currently there are different loops with different output:

  • monitor loop ('pwpower'): runs every ten seconds, shows only power, is not stored to disk but broadcast over MQTT
  • log loop ('pwenergy): runs every N minutes, shows power, energy, cum_energy, is stored to disk, and is broadcast over MQTT.

It'd be nice to have two loops: one for broadcasting/reporting and one for storage, which show all data (power and consumption), but have different frequency, e.g. once per hour for storage, every ten seconds for broadcasting.

Proposal I looked at the code (ten_seconds() and log_recordings()) but it seems the logic of data collection and reporting is combined. Any chance to split this logic and show consumption also when monitoring?

tvwerkhoven avatar Jul 11 '21 11:07 tvwerkhoven