tuya / tuya-homebridge

Homebridge custom plugin for controlling Powered by Tuya (PBT) devices in HomeKit. This plugin is officially maintained by the Tuya Developer Team.
MIT License
351 stars 180 forks source link

Thermostat temperature wrong by factor of 10 #268

Closed vbartels closed 1 year ago

vbartels commented 2 years ago

I have a heated mirror (DMS SIH-600, shows up as "heater device (wifi)") wich shows up and works but the values are wrong by a factor of 10. On/Off switch works as expected. The Input in Homekit App allows values between 0°C and 370°C. wich seems to reflect the max temp of the device of 37°C. Dialing in 168°C results in a setting of 16°C. The current temperature shown seems to be always 122,0°C. The Logs show: [27/07/2022, 10:12:05] [homebridge-tuya-platform] This plugin generated a warning from the characteristic 'Current Temperature': characteristic was supplied illegal value: number 190 exceeded maximum of 122. See https://homebridge.io/w/JtMGR for more info. Where 190 seems to reflect the 19°C shown in the Tuya app.

Expected behavior I would expect a temp range from 0°C to 37°C as in the Tuya app. And the current Temperature reflecting the actual value instead of showing 122°C all the time, even when the heater is off.

IMG_1111 IMG_1112 IMG_1113 IMG_1114

TuyaOpenAPI response: {"result":[{"category":"qn","devices":["063603439c9c1f44ed2c"],"functions":[{"code":"switch","desc":"switch","name":"switch","type":"Boolean","values":"{}"},{"code":"temp_set","desc":"temp set","name":"temp set","type":"Integer","values":"{\"unit\":\"℃\",\"min\":0,\"max\":370,\"scale\":1,\"step\":10}"},{"code":"c_f","desc":"c f","name":"c f","type":"Enum","values":"{\"range\":[\"C\",\"F\"]}"}],"product_id":"4aVbNfxEYUbylvvW"}],"success":true,"t":1658913513102,"tid":"1617ca160d8d11eda506322e56e3d437"} path = /v1.0/devices/functions

github-actions[bot] commented 2 years ago

Thank you for your feedback, we will solve this issue soon

vbartels commented 2 years ago

This pull request: https://github.com/xlinur/tuya-homebridge/pull/1/files claims to have this fixed.... I've no way to check?!

github-actions[bot] commented 2 years ago

Stale issue. we will close the issue soon. If this issue has not been resolved, please update the issue and contact us in time.

vbartels commented 2 years ago

Nothing changed, how can I help? Are more informations needed?

0x5e commented 1 year ago

@vbartels please try @0x5e/homebridge-tuya-platform, it has been fixed.

recoi1er commented 1 year ago

@vbartels please try @0x5e/homebridge-tuya-platform, it has been fixed.

I just installed a heater today and the issue is still there

2969A8F8-4678-4BDD-9A22-2E722D3F66BA

plugin is v1.5.0 (released over a year ago?) and no available updates to apply - what do you mean by “please try @0x5e/homebridge-tuya-platform“?

0x5e commented 1 year ago

@recoi1er It's fixed in https://github.com/0x5e/homebridge-tuya-platform/pull/20, please install @0x5e/homebridge-tuya-platform instead of homebridge-tuya-platform

recoi1er commented 1 year ago

@recoi1er It's fixed in 0x5e#20, please install @0x5e/homebridge-tuya-platform instead of homebridge-tuya-platform

I don’t understand, what is 0x5e?

Sch011 commented 1 year ago

@0x5e does the fix only apply on Fahrenheit degrees? Cuz I’m currently using the plugin you suggested to, I’ve tried both 1.6 and 1.7 (beta) versions and I do have some trouble with my thermostat that are using Celsius degrees; basically the setting temperature (in tuya and on the thermostat) is always the half of the one requested from HomeKit, the temperature detector in the room (by HomeKit) is always five time less than the real one (showed in tuya and on the thermostat).

0x5e commented 1 year ago

@0x5e does the fix only apply on Fahrenheit degrees? Cuz I’m currently using the plugin you suggested to, I’ve tried both 1.6 and 1.7 (beta) versions and I do have some trouble with my thermostat that are using Celsius degrees; basically the setting temperature (in tuya and on the thermostat) is always the half of the one requested from HomeKit, the temperature detector in the room (by HomeKit) is always five time less than the real one (showed in tuya and on the thermostat).

Not only Fahrenheit degrees, it can transform any schema you want.

Sch011 commented 1 year ago

@0x5e does the fix only apply on Fahrenheit degrees? Cuz I’m currently using the plugin you suggested to, I’ve tried both 1.6 and 1.7 (beta) versions and I do have some trouble with my thermostat that are using Celsius degrees; basically the setting temperature (in tuya and on the thermostat) is always the half of the one requested from HomeKit, the temperature detector in the room (by HomeKit) is always five time less than the real one (showed in tuya and on the thermostat).

Not only Fahrenheit degrees, it can transform any schema you want.

May you tell me how can I do that, I would really appreciate, thanks

0x5e commented 1 year ago

@Sch011 The example is below, please try if it solves your problem: https://github.com/0x5e/homebridge-tuya-platform/blob/develop_1.7.0/ADVANCED_OPTIONS.md#adjust-integer-schema-ranges

Sch011 commented 1 year ago

@Sch011 The example is below, please try if it solves your problem: https://github.com/0x5e/homebridge-tuya-platform/blob/develop_1.7.0/ADVANCED_OPTIONS.md#adjust-integer-schema-ranges

Thanks I fixed the setting temperature, how do I adjust the temperature perceived by the thermostat?

0x5e commented 1 year ago

@Sch011 Using onGet and onSet to adjust the values, like this:

        "onGet": "(value * 5);",
        "onSet": "(value / 5);",
Sch011 commented 1 year ago

@Sch011 Using onGet and onSet to adjust the values, like this:

        "onGet": "(value * 5);",
        "onSet": "(value / 5);",

Thanks again

Sch011 commented 1 year ago

@0x5e Hi, as you may see the temperature below is 21 as it should be, thanks to the suggestion you gave me, but the one above ( the detected one) is only 3,5, I’ve bene trying adding different lines of code or modify the existing ones but I never figured how to fix the actual room’s temperature value, is there a way to? 160A6078-0C74-4F2F-AB61-408AAA1181FD

0x5e commented 1 year ago

@0x5e Hi, as you may see the temperature below is 21 as it should be, thanks to the suggestion you gave me, but the one above ( the detected one) is only 3,5, I’ve bene trying adding different lines of code or modify the existing ones but I never figured how to fix the actual room’s temperature value, is there a way to? 160A6078-0C74-4F2F-AB61-408AAA1181FD

Please upload the original schema of the target temperature and current temperature, let me have a look.

Sch011 commented 1 year ago

@0x5e That’s the code I’ve ended up with 25E88C1C-FF5D-4C06-8F47-26CE932F6A44

0x5e commented 1 year ago

@Sch011 I need the original schema from the device info json, which can be found(the filepath) from the log.

Sch011 commented 1 year ago

@0x5e Thanks to you I’ve found the original schema and I managed to modify the schema by myself cuz I didn’t want to bother you more than I did; I do really appreciate every tip you gave me thanks again and have a nice one ^^

vbartels commented 1 year ago

I switched to @0x5e s fork and it works for me, too. Thanks!

TheClyk commented 1 year ago

To confirm, having the same issue, https://snipboard.io/n0mesI.jpg

Is it only working in the beta then?

github-actions[bot] commented 1 year ago

Stale issue. we will close the issue soon. If this issue has not been resolved, please update the issue and contact us in time.