fruggy83 / openocean

27 stars 11 forks source link

STM 330 temperature sensor formatting error #21

Closed danielegobbetti closed 5 years ago

danielegobbetti commented 5 years ago

Premise: I am new to openhab2 and to enocean protocol, but I was able to get the EnoceanPi gateway recognized and working following your instructions (using the 2.4.0-snapshot release on openhabian). It might be that the issue is not related to this addon, but it's the first sensor I am adding to openhab.

I managed to get an STM 330 temperature sensor automatically recognized with the "teach in" message. It has been added as A5-02-05, with a temperature range of 0-40 degrees C, which matches the datasheet.

Everything looks fine, except I am getting the following warnings in openhab.log:

2018-10-05 16:28:53.299 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - Exception while formatting value '22.431372549019606' of item openocean_temperatureSensor_IDIDXX_IDIDYY_temperature with format '%.1f %unit%': Conversion = 'u'

And in paper UI the values are displayed as follows: image

I am unsure whether this issue is in the addon or if there is something wrong with my openhab setup, so please apologize if this issue is creating unnecessary noise.

fruggy83 commented 5 years ago

Hello Daniele (@danielegobbetti),

I think the temperature value of 22.4 °C seems to be read correctly. However there seems to be a problem displaying it. Could you check the item settings please. They have to look like this

grafik

It is important that your temperature item is defined as a number item with the dimension temperature. In most cases this happens if you have activated the simple item linking mode.

Best regards and welcome Daniel

fruggy83 commented 5 years ago

Hi Daniele (@danielegobbetti),

could you solve your problem with your STM300? If so could you please close this issue?

Best regards Daniel

danielegobbetti commented 5 years ago

Oh thanks for the heads up. I forgot to update that I was able to make it work. I had to toggle twice (it was enabled, and I disabled then re-enabled it) the simple item linking mode and then re-discover the sensor.

Thanks a lot!