HA_enoceanmqtt icon indicating copy to clipboard operation
HA_enoceanmqtt copied to clipboard

Setpoint of A5-10-03 is sent unscaled

Open jansorg opened this issue 2 years ago • 6 comments

The problem

I have several devices of the same manufacturer and type A5-10-03 (temperature and set point control). The temperature is shown correctly, but the set point it shown in a range of 0..255, afaik. For example, In Homeassistant it‘s shown as ~100°C when I‘ve set the set point on the device to about 20°C.

Afaik the interpretation of the 0..255 range is manufacturer specific. http://tools.enocean-alliance.org/EEPViewer/profiles/A5/10/03/A5-10-03_ip.pdf

Is there perhaps a way to tell the software what it should do with the value to let me see the correct values in HA?

Unscaled value: https://github.com/mak-gitdev/HA_enoceanmqtt/blob/0d0a4cdb3d74b191feb0cc9169e11f10243d1ec9/enocean/protocol/EEP.xml#L951

What type of installation are you running?

Standalone

What version of HA_enoceanmqtt has the issue?

Latest

What was the last working version of HA_enoceanmqtt?

No response

What type of Home Assitant installation are you running?

Home Assistant Core

Anything in the logs that might be useful to solve the issue? (Strongly recommended if applicable)

No response

Additional information

No response

jansorg avatar Oct 24 '23 07:10 jansorg

Hi @jansorg,

As you correctly guessed, the setpoint is sent unscaled because the interpretation is manufacturer-dependent.

For now, you have two possibilities to scale the value:

  • Use a template sensor on top of the setpoint sensor to do the scaling. This is what I recommend.
  • Use a custom mapping file to integrate the scaling in the setpoint sensor definition.
    This is only ok if all your A5-10-03 devices have the same scaling factor.
    And this can be cumbersome because you will have to merge your modifications into the default mapping.yaml file with each new release.

In the future, I may add a device configuration option to handle such cases on a per-device basis.

I let you close the issue if everything is clear, otherwise, do not hesitate to ask any further questions.

mak-gitdev avatar Oct 24 '23 08:10 mak-gitdev

Hi @jansorg,

Is everything ok with my previous message. If so, could you close the issue ?

mak-gitdev avatar Nov 06 '23 00:11 mak-gitdev

Yes, everything is alright. I didn't know that you're not using this issue to track the config option.

jansorg avatar Nov 06 '23 11:11 jansorg

Hi @jansorg,

What is your device and what is the scaling factor ?

I will solve this by adding the possibility to also add device by model for such specific cases. For example, in your case, currently you have to do:

[my_A51003]
address = 0x12345678 # Address of your device
rorg = 0xA5
func = 0x10
type = 0x03

Considering your device is a sensortech RFE06P, you will now have the possibility to define the above device as:

[my_RFE06P]
address = 0x12345678 # Address of your device
model = sensortech/rfe06p # Format is manufacturer/model

Then you will have the value scaled accordingly in HA.

mak-gitdev avatar Dec 15 '23 16:12 mak-gitdev

It's the "FT" model made by Afriso: https://afrisohome.de/en/portfolio/room-temperature-sensor-ft-ftf/ I'm not sure about the scaling factor. The setpoint is in the range 8/30 °C, so I'm using $value / 255 * 22 + 8, which seems to be accurate.

jansorg avatar Dec 15 '23 17:12 jansorg

@jansorg,

Ok so it will be:

[my_FT]
address = 0x12345678 # Address of your device
model = afriso/ft # Format is manufacturer/model

I plan to introduce that in 0.2.1.

mak-gitdev avatar Dec 15 '23 18:12 mak-gitdev