mak-gitdev / HA_enoceanmqtt

Home Assistant wrapper for enocean-mqtt (https://github.com/embyt/enocean-mqtt)
GNU General Public License v3.0
54 stars 14 forks source link

Setpoint of A5-10-03 is sent unscaled #88

Open jansorg opened 9 months ago

jansorg commented 9 months ago

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

mak-gitdev commented 9 months ago

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:

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 commented 9 months ago

Hi @jansorg,

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

jansorg commented 9 months ago

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

mak-gitdev commented 7 months ago

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.

jansorg commented 7 months ago

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.

mak-gitdev commented 7 months ago

@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.