Emon and Home assistant integration

Hi, I have just installed a ecompi and a ecom TX I use Home assistant on a separate Ras Pi and have MQTT running on that device to intergrate with other devices, I would like to feed my Power usage from the Ecompi and TX into Home assistant, has nyone done this and if so can they give me a few pointers and maybe some example configs.
Thanks in advance
Simon

Hi, Welcome.

Under the Input processes, there is the ability to publish to MQTT. choose a suitable publish topic (not emon) and then configure HA to pick up that MQTT topic.

Thanks Brian, little confused, my MQTT broker is in HA has a separate Username and password,
Do zi replace the one in Emonpi config with the HA broker details.
Also you mention to create a separate topic not Emon, where is that done

Emoncms will only publish/subscribe to one MQTT broker, by default the one installed on the EmonPi. You could get Emoncms to talk to just the HA MQTT broker instead. Change the settings in the settings.ini file in the /var/www/emoncms/ folder. You will also need to edit emonhub (from the menu in Emoncms) to also use the HA MQTT Broker.

On the Inputs page, click on the spanner next to the input you want to export. Under the processes available you will find

image

You specify the published topic in the text box.

Thanks again, I have added the publish to MQTT in the input of one of the feeds.
I understand where to change the settings in the config emonhub.
I have a MAC is there a way to install SAMBA or simular so I can use the Finder window rather than through a terminal,
also if I make these changes do the feeds and inputs still appear in emoncms local and online cloud?

SAMBA is a PITA IMHO! much easier to just SSH.

Have you tried a Google (or your preferred search engine) search?

Home assistant already have emoncms integration.

I’m using this integration with my new Emonpi setup, works great.

Every day a learning day.

I didn’t know that!

Cheers

[edit]
OK my memory is definitely on the blink

I had another look at the component. The main limitation is you need to create a new sensor for each measurement type. This component was created by @joyrider3774 a while back before the API was changed (I suspect).

I’ve submitted an Issue for an enhancement. It is quite straight forward to do I suspect.

1 Like

Thanks didn’t realise this have added and works well, easier than using MQTT.
are you using any particular lovelace card, ie guage or graphs, also have you done anything else with the data

This enhancement will be greatly appreciated. I currently have to set up one sensor for W and another for daily kWh.

On top of default graph card, I’m using Power wheel card to display instantons data:

I’m also using solar generation as condition to hallway and stairs light automations. It’s a very nice sensor for ambient light levels :smile:
Eg. trigger: motion; condition: solar generation <20W; action: turn on lights.

1 Like