Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error setting CharacteristicsProps for 'Target Temperature': 'minValue' cannot be greater or equal the 'maxValue'! #72

Closed
0x5e opened this issue Nov 13, 2022 · 15 comments · Fixed by #74
Labels
bug Something isn't working
Milestone

Comments

@0x5e
Copy link
Owner

0x5e commented Nov 13, 2022

Error: Error setting CharacteristicsProps for 'Target Temperature': 'minValue' cannot be greater or equal the 'maxValue'!
at TargetTemperature.Characteristic.setProps (/volume1/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1221:15)
at ThermostatAccessory.configureTargetTemp (/volume1/homebridge/node_modules/@0x5e/homebridge-tuya-platform/src/accessory/ThermostatAccessory.ts:223:8)
at new ThermostatAccessory (/volume1/homebridge/node_modules/@0x5e/homebridge-tuya-platform/src/accessory/ThermostatAccessory.ts:13:10)
at Function.createAccessory (/volume1/homebridge/node_modules/@0x5e/homebridge-tuya-platform/src/accessory/AccessoryFactory.ts:78:19)
at TuyaPlatform.addAccessory (/volume1/homebridge/node_modules/@0x5e/homebridge-tuya-platform/src/platform.ts:305:40)
at TuyaPlatform.initDevices (/volume1/homebridge/node_modules/@0x5e/homebridge-tuya-platform/src/platform.ts:116:12)
at HomebridgeAPI. (/volume1/homebridge/node_modules/@0x5e/homebridge-tuya-platform/src/platform.ts:71:7)

TuyaDeviceList.eu1609092985368A5RKI.json.txt

@DominoLeChat

@0x5e 0x5e added the bug Something isn't working label Nov 13, 2022
@0x5e 0x5e added this to the 1.6.0 milestone Nov 13, 2022
@0x5e
Copy link
Owner Author

0x5e commented Nov 13, 2022

{
"code": "temp_set",
"mode": "rw",
"type": "Integer",
"property": {
  "unit": "",
  "min": 10,
  "max": 70,
  "scale": 1,
  "step": 5
}

I think your device may have a wrong target temperature property. scale=1 means your device's temperature range should be divided by 10^1, then is 1℃~7℃. Actually is it 10℃~70℃?

@DominoLeChat
Copy link

Yes exactly, the temperature range is 10°C ~ 70°C

@0x5e
Copy link
Owner Author

0x5e commented Nov 13, 2022

Well seems I have to add a workaround for these wrong configured device: if the max value is lowered than 10 which is abnormal, I will override the scale to 0. I will fixed in the next version, please try later.

@DominoLeChat
Copy link

Ok, thank you for your help !

@0x5e
Copy link
Owner Author

0x5e commented Nov 13, 2022

I have another question, what's the accuracy of your device's actually target temperature, 5°C or 0.5°C?

@DominoLeChat
Copy link

I think the accuracy of the target temperature is 0.5°C

@0x5e
Copy link
Owner Author

0x5e commented Nov 13, 2022

This is really annoying of the wrong schema made by the manufactor. It devided max and min by 1, but devided step by 10...
I can't fixed the wrong data to the correct value then, because the code will never know 5 or 0.5 which is correct. I will reset the props to the default value 10°C~38°C, step=1.

@0x5e 0x5e linked a pull request Nov 13, 2022 that will close this issue
@0x5e
Copy link
Owner Author

0x5e commented Nov 13, 2022

Please try beta.30. I will consider add device schema overriding in 1.7.0.

@0x5e 0x5e closed this as completed Nov 13, 2022
@DominoLeChat
Copy link

Ok, it's not crashing anymore, but the temperature is incorrect. The set temperature is half of what it's supposed to be and the actual room temperature is completely wrong.
For exemple, when I set the temperature to 30°C in HomeBridge, the thermostat is set to 15°C instead.
And the room temperature sensor is showing the set temperature divided by 5 instead of the actual room temperature.
Thank you for your time.

@0x5e
Copy link
Owner Author

0x5e commented Nov 13, 2022

Can you upload the homebridge log in debug mode when setting temperature and when room temperature changed? And tell me the actual temperature. If it can be solved by schema overriding, I will do in 1.7.0.

I'm a little busy in 2022.11-12, and overriding still needs a lot of work to be done, maybe 2023 we can solve this.

@0x5e 0x5e modified the milestones: 1.6.0, 1.7.0 Nov 13, 2022
@djsomi
Copy link

djsomi commented Nov 13, 2022

Guys, sorry if off, but I've faced similar issue, a wall heater gets max 25c of heating temp. Is it something what I can change somewhere? On iOT platform I can see range is 10-49 Celsius.

Thx!

@DominoLeChat
Copy link

When I change the temperature to 30°C coming from 38°C, here's the log :

[11/13/2022, 7:07:27 PM] [TuyaPlatform] Update value 6 => 3 for devId = '366034752cf4325ed723' service = '0000004A-0000-1000-8000-0026BB765291', subtype = undefined, characteristic = '00000011-0000-1000-8000-0026BB765291'

11/13/2022, 7:07:27 PM] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/729a69d2cc1d30137785a3681aefeaa5
protocol = 4
message = {
"dataId": "48ab16b8-da9a-4895-a8f5-0873d53af9ea",
"devId": "366034752cf4325ed723",
"productKey": "IAYz2WK1th0cMLmL",
"status": [
{
"2": 30,
"code": "temp_set",
"t": "1668362842",
"value": 30
}
]
}

The actual temperature has not changed yet, but I'll update this issue when I'll get a log of the change.

@DominoLeChat
Copy link

Here's the log when the temperature goes to 27°C :

[11/13/2022, 7:23:37 PM] [TuyaPlatform] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/729a69d2cc1d30137785a3681aefeaa5
protocol = 4
message = {
"dataId": "9f179a4c-cbc2-4603-8265-888043116a16",
"devId": "366034752cf4325ed723",
"productKey": "IAYz2WK1th0cMLmL",
"status": [
{
"3": 54,
"code": "upper_temp",
"t": "1668363812",
"value": 54
}
]
}
[11/13/2022, 7:23:37 PM] [TuyaPlatform] Update value 4 => 3.8 for devId = '366034752cf4325ed723' service = '0000004A-0000-1000-8000-0026BB765291', subtype = undefined, characteristic = '00000011-0000-1000-8000-0026BB765291'

@0x5e
Copy link
Owner Author

0x5e commented Nov 14, 2022

Guys, sorry if off, but I've faced similar issue, a wall heater gets max 25c of heating temp. Is it something what I can change somewhere? On iOT platform I can see range is 10-49 Celsius.

Thx!

It can only be changed by your device manufactor. And can only be changed before product release.

@0x5e
Copy link
Owner Author

0x5e commented Nov 14, 2022

@DominoLeChat Why 38°C => 30, and 27°C => 54, can you have more data?
If you can figure it out, I plan to add two features to let 'wrong device' work:

  1. Overriding schema
  2. Transform value, like this: https://github.com/arachnetech/homebridge-mqttthing/blob/master/docs/Configuration.md#apply-functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants