Configuring Modbus to read a register of type 'ENUM8'

I’m trying to read several values from my Remeha Elga Ace heatpump over modbus. I’ve got the basics working well, but there are a few parameters that are a bit more tricky. These parameters describe state by setting different bits in a single register. These parameters are described as having the type ‘ENUM8’ and UNSIGNED16 (not that this is not referred to as an unsigned 16-bit int).

Here are the relevant bits from the manual:


I’m struggling how to get this working in Home Assistant as both ENUM8 and UNSIGNED16 are not listed amongst the supported data types. I have seen from other posts on the forum that the way to handle these registers containing multiple states is to essentially fetch the raw value to a sensor and then create a binary sensors for each individual value that is represented in the bitmasks of the raw sensor data.

But I am stuck defining the base data type of the sensor reading from modbus, and so far unable to get it to work. I have tried int8 for ENUM8 and uint16 for UNSIGNED16, in combination with a template sensor like {{ states('sensor.elga_heating_mode')|int|bitwise_and(1) > 0 }} (this example was intended to read the first value from an ENUM8 represented as an int8). I’m not getting sensible results back though.

Has any one any clue how to do this? Or a similar config to share?

Thanks!

Here’s the specific config I have now for the modbus parameters:

      - name: "Elga Appliance Status 1"
        unique_id: elga101
        slave: 100
        address: 279
        input_type: holding
        data_type: uint16 # UNSIGNED16
      - name: "Elga Appliance Status 2"
        unique_id: elga102
        slave: 100
        address: 280
        input_type: holding
        data_type: uint16 # UNSIGNED16
      - name: "Elga Heating Mode" #varZoneCurrentHeatingMode
        unique_id: elga103
        slave: 100
        address: 1109
        input_type: holding
        data_type: uint8 #ENUM8

Using this config, the last sensor becomes unavailable. The above two work and get integer values (I’ve seen 2 and 0) that (understandably) don’t correspond with the actual state. I just can’t seem to get the state out.

I’ve gotten the UNSIGNED16 to work! The approach I had was working, I just had a typo in my template sensor. Yay!

Hi mate
do you had any luck with this regisrer value? I got always or 0 or invalid value. Just tried all device_class (int16, uint16, float16, etc…). or maybe do you found this information (DHW tank temperature) from other register…

1 Like

Same challenge here, very curious if anyone solved this… Cant get the enum8 to work.

solved reading the equivalent register in Zone 2 so 1631 and 1632.

thanks the same :wink:

Could you elaborate more on the specific hardware you are using to read the Elga modbus?

Sure Koen, you need the GTW-08 module installed (you can do this yourself or have an installer do it for you). That then connects to a simple Modbus → Wifi / Ethernet module which you can get off Aliexpress.

Cool. My Elga ace 6kw is being placed next month.
Just need to find an affordable gtw-08 module.

I remember buying it in Germany for a lot less (around 130 euro - still a lot of money).

And in all honesty… its pretty useless :pensive:

OTGW can do the same with less effort to set up.

Still no luck here in writing settings to the Elga with the modbus set up.

And would recommend tweakers website, there is a detailed thread on the OTGW and modbus setup.