smarthomej / addons

SmartHome/J addons for openHAB
Eclipse Public License 2.0
59 stars 24 forks source link

Temperature and Humidity Device Temperature problem #446

Closed BigGeorgeTx closed 1 year ago

BigGeorgeTx commented 1 year ago

I recently acquired a "Wi-Fi Temperature & Humidity Sensor with Screen" model TH06. It connected quickly to the Tuya Smart Life app, and appeared in the openHAB Things Inbox. I noticed when I added it using Add Equipment to Model in the UI that the temperature was a Number and not a Number:Temperature. Currently, the device screen shows 64°F. The Tuya app shows the same. The item linked to the temperature channel in openhab has a value of 177.0. I have tried changing the Item Type from Number to Number:Temperature, but it didn't change the value. It did change way it displayed, but just it just adds °F or °C without changing the number (which is probably to be expected for a Number Item).

I looked in the tuyaiot.com Cloud / Device Debugging / Device Logs and it shows: `

Time | Device Event | DP ID | Event Details | Source | Source Details -- | -- | -- | -- | -- | -- 2023-01-12 08:29:55 | Report | Current Humidity | 51% | device itself |  `UID: tuya:tuyaDevice:ebd1bb2ebcd92256cfokaq Here is the code for the Thing label: T & H Sensor thingTypeUID: tuya:tuyaDevice configuration: protocol: "3.3" productId: 7akwzwfwhukkdsib deviceId: ebd1bb2ebcd92256cfokaq localKey: xxxxxxxxxxxxxxx channels: - id: temp_current channelTypeUID: tuya:number label: temp_current description: null configuration: dp: 1 max: 600 min: -200 - id: humidity_value channelTypeUID: tuya:number label: humidity_value description: null configuration: dp: 2 max: 100 min: 0 - id: temp_unit_convert channelTypeUID: tuya:string label: temp_unit_convert description: null configuration: dp: 9 range: c,f ` 2023-01-12 08:29:55 | Report | Temperature | 17.70℃ | device itself

`

So it appears that somehow the 17.70 is being changed to 177.0. (17.7 C = 64°F).

Here is my system info: `runtimeInfo: version: 3.4.0.M5 buildString: Milestone Build locale: en-US systemInfo: configFolder: /etc/openhab userdataFolder: /var/lib/openhab logFolder: /var/log/openhab javaVersion: 11.0.16 javaVendor: Raspbian osName: Linux osVersion: 5.15.76-v7l+ osArchitecture: arm availableProcessors: 4 freeMemory: 75289120 totalMemory: 352321536 startLevel: 70 bindings:

I suppose I could try to figure out how to make a profile to handle the channel, but before trying that, since it is not behaving as expected, I thought I would see if it is something that can be addressed in the binding.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.