MQTT - charge / not charging information

3 comments started 2023-03-18 last 2023-03-18
APIsHome Automation
M
#1 mwoodage

Hello, out of the 286 topics received via MQTT, does anyone know if there is one that will provide details of when the battery is charging or discharging?
I have a home automation system that i'd like the text to change to show when the battery is charging from the grid or solar. Currently it just shows Discharging which is text i've added in there, but i can make that text change if i receive the right info.
I've searched though the MQTT data / topics but there doesn't seam to be anything that would indicate when the battery is charging. Any ideas?

T
#2 Tim

mwoodage The Power topic has Battery Power, Charge Power and Discharge Power. You could use the Battery Power (-ve for Charge and + for discharge) for your purpose?

GivEnergy/INVSERIALNUMBER/Power/Power/Battery_Power

M
#3 mwoodage

Tim That should do it! Thanks Tim, i'd not spotted that it goes between + & -, i've now set it up with my home automation system 🙂

Thanks again
Martin