emonTX to Home Assistant

I have an emonTX that has been logging it’s data on emonCMS for several years now.

I’ve only recently started looking at Home Assistant and noticed that it has an Energy Dashboard too.

My emonTX gives me power readings every 10seconds for Solar Power, Consumed Power and Diverted Power.

I can’t get my head around how Home Assistant deals with energy data. Especially the fact that emonTx will generate negative power readings during Export.

Also in emonCMS Grid power is basically the difference between the Consumed Power and the Solar Power. But it appears to be difference in Home Assistant.

Anyone else use Home Assistant’s energy dashboard?

I have a thread going about the capabilities of the emonTX because my end objective (I hope it’s permitted to post the link to my thread below) is very similar to yours.

So I am guessing, which is always dangerous!) that you have somehow wifi enabled your emonTX - is that right and if so how did you do it? Did you go down the ESP route, the PIZero route or something else?

Many thanks

https://community.openenergymonitor.org/t/emon-tx-v3-capabilities/19464/3

I have an emonTX that just publishes it’s readings on the Serial Port every 10 seconds in csv format.

Those readings are read by an OpenWRT device and pushed to emonCMS via the HTTP interface using a small shell script.
I had planned to replace the OpenWRT device with an ESP, but don’t fix what ain’t broken…

I found that OpenWRT had a MQTT client, so loaded that first.
Then I just updated my shell script to publish the emonTX data to both my local emonCMS as well as my MQTT broker.

This has allowed me to directly import the emonTX data into HA via MQTT. I was previously using the “Publish via MQTT” in emonCMS. But that is now unnecessary.

In HA it was a little complicated to get the Power readings to work with its Energy Dashboard but I think I have it working now. Getting HA to recognise -ve Power as an Export needing some tweaks.

But found another post that helped me.

Trouble is that in HA, the kWh feed needs to have data in it until the Energy Dashboard will allow you to add it. And who knows when I might have an Export scenario to test if my HA sensors are all working correctly. My Grid and Solar readings all seem to be working fine.

thumbs_up thumbsup

1 Like