Add-On Fenecon2Mqtt - Connect Fenecon Home (OpenEMS) energy storage systems to Homeassistant

It seems the new backend is not available in FEMS yet.
I’ll wait until the 2024.08 version and decide how to proceed. I really like to implement the new stuff instead of release a dirty quick win version

1 Like

While looking into integrating my future Fenecon Home 20 into HA I stumbled over this add-on and probably a related post (in German):

I assumed, hopefully correctly, that the issue with the add-on comes from that function missing so I left a comment to answer the question why this function would be needed in FEMS, not only OpenEMS.

Hoping for a good solution here!

0.2.17

  • Changed from using FEMS provided sensor data to (dirty) guessing sensor units and sensor classes as Fenecon changed their backend.
  • Fixed a bug wich didn’t clean up Homeassistants MQTT autodiscovery topic
  • fenecon-config.json is still writen. But it contains data of FEMS-components only
1 Like

Does this mean the homeassistant integration is working with FEMS 2024.8.1?

So the integration is just guessing the fems request channels?

Hi,

yes it works.
The difference is: In the older versions I was able to determine the units of the various values ​​from FEMS. This is not longer possible since 2023.06.X (or I don’t know how to do it). In the current version I basically guess them.

If you know the names of the components and channels, you will get your data as in the older versions of this add-on.

To get the names of the components and channels I use the windows or linux command:
curl -s http://x:[email protected]:80/rest/channel/.*/.* -o channel-names.txt
Than have a look to channel-names.txt

At the moment in worked with Version 2024.7.2

2 Likes

Hello Skeletitor,

I am looking for a home management system and do a test of home assistant and openhab since yesterday.
I integrated my fenecon home 10 to HA with REST api with a copy and paste of the config shown in

Can you tell something about the advantages and disadvantages of your solution compared to the implementation with REST Api?

Regards
nam-AH

In my case, I use the values from Fenecon2MQTT for Live/Instant values in the UI (and excluded them from the recorder, as they are pushed every second and would totally overload my database (in my experience at least, but maybe this improved in newer Home Assistant versions, and if Home Assistant is running on a proper SSD))
Because of this, I use the Modbus registers for the values that are available and use REST for the rest, because not all channels are published on Modbus and set them to poll with differnet intervals for each request (for example SoC polling only every minute).

But another advantage of Fenecon2MQTT is that it is probably easier to setup for beginners (at least if you already have an MQTT-Broker).

One small “disadvatage” of Fencon2MQTT is that is technically based on a badly / un- documented API, and it might change as you cloud see in the previous posts, while the Modbus and REST-API are officially documented and also used by commecial customers, so it’s less likely the be changed in my opinon.

Thx. I’ll add this as a workaround.
I used the REST API long time ago and totally forgot about it :wink:

As Benniju already said:

Pros:

  • fast – data changes are displayed immediately. No time based trigger is uses in background like in Modbus or REST.
  • easy to install (especially if MQTT is already in use)
  • flexible – easily add new components/channels and define your overrides if necessary

Cons:

  • DB is more stressed. I’ve been using it since the first version. HA runs as a VM on Proxmox. 4xN100CPU+100GB NVME. The size is more or less static at 3.2 GB. → no problems at all
  • An unofficial WebSocket connection is used. Like the local web frontend. Changes must be reverse engineered.

Everyone has to weigh up the points for themselves. :wink:

Hi. I added a small fix some versions ago. Are you able to test again?

Hi Skeltitor,
today my new home assistant green was delivered.
Could you give me a hint how to download and install your Add-On Fenecon2Mqtt ?
Until now, I have no account at GitHub.
Thank you

Just go in the settings, then Add-Ons, then Add-On Store, then click the three dots, then Repositorys and then add https://github.com/Skeletitor/ha_addon_fenecon2mqtt to the list. Then you can install the addon and set the configuration, for which you will also need an MQTT-Broker.

1 Like

Which MQTT Brocker do you recommend?
I need one that can be installed on the “Home Assistant green”.

Add-on Mosquitto broker

Many thanks to you both.
I will set it up today or tomorrow.

The installation was successful. The values are updated every second. Many thanks for the great add-on.

I then renamed the entities. The names of all but the last one in the list were then changed back after a short time.
Is there any way to set the entity names permanently?

Yes, I also have this issue. I think it’s due to the deletion of the discovery topics each time the addon is restarted. Maybe it’s possible to leave the discovery topics persistently? @Skeletitor

You can just rename them in the sensor overwrites though, if you really need to change the names.

Yes
I want some kind of housekeeping of ‘retained’ MQTT Messages

To overwrite configs you need to use ha_addon_fenecon2mqtt/fenecon2mqtt/DOCS.md at 2f4a109584439059dd21c8d584ed25549383c285 · Skeletitor/ha_addon_fenecon2mqtt · GitHub

E.g.
sensor_overwrite:

  • "fenecon/fems-_meta-Version;;;;;FEMS Version "

Thank you.

It works with two notes from me:

  1. There is a maximum line length. If the name of the channel is already quite long, there is not so much left for the display name.
  2. It does not work for the channel _sum/State. As a workaround, I can manage the name via the UI.