emonHub Homeassistant addon

I have searched and couldn’t find anything, so..

Before I re-invent the wheel, has anybody already created an emonHub addon for homeassistant? I currently run emonHub on a separate Pi3 (along with zigbee2mqtt) but would quite like to move the emonHub functionality to the Pi running homeassistant.

The same applies to emonCMS; which currently runs as a proxmox LXC.

There is an emoncms add-on - @alexandrecuer has created one. (discussion - Emoncms self contained docker container and HomeAssistant Addon - Emoncms - OpenEnergyMonitor Community)

Open-Building-Management/emoncms: emoncms home-assistant addon

It doesn’t have emonhub in it.

Are you using emonhub to pull in data from an emonTX?

Hello,

there is an emonhub container, but not an HA addon.

the emonhub image is here : https://hub.docker.com/r/alexjunk/emonhub

the dockerfile is here : containers/emonhub at main · Open-Building-Management/containers · GitHub

see here for how to use emoncms and emonhub containers through docker compose

The emonhub container is a good start for an HA addon. Note there is an emonTX sniffer addon : GitHub - Open-Building-Management/emontx_sniffer: home-assistant addon sniffer for devices like openergymonitor emontx

Things learned through the emonTX sniffer addon could be transposed to the emonhub addon

:slight_smile:

2 Likes

An emonTx and a bunch of emonTHs.

Good news about the emonCMS addon. I’ll take a look.

Excellent. I’ve done other add ons, so I’ll take a look.

Ok, so you are using RF to communicate. That makes not using a Pi in some form more complex. Presumably, you are using the RF board for a Pi currently?

I’ve been running emonHub/emonCMS (as an almost emonPI) and a separate HA pi for a few years now, and I’d honestly recommend keeping them separate. I’ve found emon ‘just works’ and updates very infrequently and rarely needs a restart, where-as HA has a lot of updates, and may need restarting more often. Esp, if you want to keep your emon feeds as consistent and reliable as possible. Also, feeding emon data into HA isn’t really worth it, unless you want to setup automations to react to your feeds, emonCMS give a much richer insight into your energy than HA does. I faffed for a while setting this up, and don’t really use it now. Instead I just embed a view of emonCMS into my HA dashboard.

3 Likes

Yes, that’s right. I currently run HA as a Proxmox VM and emonCMS as a Proxmox container. However, the Proxmox server is in a poor location for RF coverage, so I have a Pi 3B running emonHub - plus Z-wave and Zigbee - sitting on a windowsill in one of the bedrooms. It’s fine, but I’m looking to improve matters. Z-Wave and Zigbee both run as Docker containers, so one solution is to run emonHub in a container. That way I can manage them all with Portainer - whereas I currently have to ssh into the Pi to manage/supervise emonHub (not that I do very much).

The idea for converting emonHub into an HA Addon (which is actually a Docker container) would allow me to get rid of the Pi3B; but only if I moved the entire HA installation back on to a Pi4. Since the original post, I’ve now abandoned that idea as proxmox is far more resilient that a Pi.

I do use the data in a couple of automations. One example is alerting me if power demand peaks high at a time when I would not expect it to: e.g. if we are away and the house is empty. It’s been useful on a couple of occasions where we have forgotten to shutdown computers when we go on holiday. Another is that the emonTH units are an integral part of the climate control.

TBH, a Pi with the RF board running emonhub is what I do for my one emonTH. Negligable power and I can’t remember the last time I had to do anything to it. It is rock solid. You could use a PiZeroW to get the consumption down further.

1 Like

That’s a good idea. Zigbee and Z-Wave are each a mesh, so the controllers can be anywhere, within reason. Reducing the emonHub to being just the RF board on an piZero is an attractive proposition.

1 Like