openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.7k forks source link

Temperature float value display issue. #2146

Closed archsek closed 9 years ago

archsek commented 9 years ago

Hi, I'm newbie in Openhab, and I have got strange problem with temperature value display from DHT22 temperature and humidity sensor,which I can not cope with . I'm using OpenHab 1.6.1 on Raspberry PI and DHT22 sensor connected to Arduino Uno and sending float value by mqtt protocol (mosquitto). I don't see any errors in logs, but sometimes temperature value simply just disappear and shows " - ". Humidity value which is come from the same sensor, displays always right. Even if I see "-" in Openhab, I've got proper temperature value in event.log and when I subscribe temperature topic on Raspberry terminal i see temperature value which is exactly the same as event.log. After a longer follow-up I see temperature value disappears only in the range of 0.0 C to 9.9 C. It looks like problem occurs only when the temperature value has only one digit before comma, because when the value rises above 10.0 or fall down below 0.0( then is e.g. -0.1, so 2 digit again) everything works correctly. I have no idea how to solve this issue. I'll be grateful for the any help.

archsek commented 9 years ago

Today I connected to the Arduino next new-one DHT22 sensor and a different type of sensor BMP180 which is digital barometric pressure and temperature sensor of Bosch Sensortec. Unfortunately nothing changes, the problem still persists on each of this three sensors , and temperature value disappears in the range of 0.0 C to 9.9 C. In any other range, sensors shows the correct data.

archsek commented 9 years ago

Sorry I closed the thread by mistake.

archsek commented 9 years ago

Ok, I've found error in my Arduino code, which has no common with Openhab. Everything works great. I close the thread.