Closed fate8383 closed 1 year ago
Can you upload the device info via readme troubleshooting section? The first line log should be fixed, others please see #32
Thanks, I think I will wait for this plugin until you have options to disable some devices, I am afraid these errors also related to some of my offline devices.
my other alternative plugin only can be used as a scene, device itself is not recognized, so I don't think I have a choice but use your plugin, thanks for the plugin, I will figure out my offline devices issue, would love to have disable option like the other plugin offers :) here is the air purifier device full details, sanitized but if you see something please let me know I can remove that as well. Could you please tell me if it is possible to use all the functions? I am using smart life if it makes any difference. [ { "active_time": 1670089592, "biz_type": 18, "category": "kj", "create_time": 1670089592, "icon": "smart/icon/ay1522295390312i1c7g/224b82832b98a1f47bb332b38604b66c.jpg", "id": "xxx", "ip": "xxx", "lat": "", "local_key": "xxx", "lon": "", "model": "KF-P31", "name": "Air Purifier", "online": true, "owner_id": "xxx", "product_id": "xx", "product_name": "Air Purifier", "status": [ { "code": "air_quality", "value": "great" }, { "code": "anion", "value": true }, { "code": "countdown_left", "value": 0 }, { "code": "countdown_set", "value": "cancel" }, { "code": "fan_speed_enum", "value": "1" }, { "code": "fault", "value": 0 }, { "code": "light", "value": true }, { "code": "pm25", "value": 6 }, { "code": "switch", "value": true }, { "code": "uv", "value": true } ], "sub": false, "time_zone": "+01:00", "uid": "xxx", "update_time": 1670089592, "uuid": "xxx", "schema": [ { "code": "air_quality", "mode": "ro", "type": "Enum", "property": { "range": [ "great", "mild", "good", "medium", "severe" ] } }, { "code": "anion", "mode": "rw", "type": "Boolean", "property": {} }, { "code": "countdown_left", "mode": "ro", "type": "Integer", "property": { "unit": "min", "min": 0, "max": 720, "scale": 0, "step": 1 } }, { "code": "countdown_set", "mode": "rw", "type": "Enum", "property": { "range": [ "cancel", "1h", "2h", "3h", "4h", "5h" ] } }, { "code": "fan_speed_enum", "mode": "rw", "type": "Enum", "property": { "range": [ "auto", "sleep" ] } }, { "code": "fault", "mode": "ro", "type": "Bitmap", "property": { "label": [ "e1", "e2" ] } }, { "code": "light", "mode": "rw", "type": "Boolean", "property": {} }, { "code": "pm25", "mode": "ro", "type": "Integer", "property": { "unit": "ug/m3", "min": 0, "max": 500, "scale": 0, "step": 1 } }, { "code": "switch", "mode": "rw", "type": "Boolean", "property": {} }, { "code": "uv", "mode": "rw", "type": "Boolean", "property": {} } ] },
Your air purifier's fan_speed_enum
seems illegal. the value is string 1
but the range is enum auto
, sleep
... I think that's the root cause. This issue need to wait the "schema transform" feature later, I'm not sure if 100% works.
The other functions will be added but may not in a high priority, I will add the air quality sensor, pm2.5, and other switches in the long-term plan.
Thanks, appreciate the details. I shall wait then the long term planned features come to reality. For now adding scenes to smart life and using that in homebridge works.
Just one thing, will you be able to add disable/hide devices soon? Your plugin will be best to use for the rest and for the scenes but since my device creating these errors, I have no way of using the plugin as is.
Hide device will be part of the "device config override" feature, which still have a lot work to do, I'm preparing the exam this month, may not guarantee the development process.
Temporarily is there a way to stop these logs? I don't mind editing the code if you can point me to the right direction. I mean device is functioning all right but I really need the logs from other plugins. I don't need these error logs I know I won't use fan speed just status and turn on off all I need.
the log is output at ./dist/core/TuyaOpenMQ.js
_onMessage()
functions, you can comment or remove these four lines:
this.log.warn('Message received with wrong order.');
this.log.warn('LastMessage: dataId = %s, t = %s', this.lastPayload.message['dataId'], this.lastPayload.t);
this.log.warn('CurrentMessage: dataId = %s, t = %s', message['dataId'], t);
this.log.warn('Fallback to use API fetching the latest device status.');
Sorry for the inconvenience, but I think users should be told about this warnning, otherwise when plugin behaviors wrong, there's no any message to findout why.
deviceOverrides
feature released, please see the latest readme.
And the log level is changed to debug. #157
12/3/2022, 11:16:33 PM] [@0x5e/homebridge-tuya-platform] This plugin generated a warning from the characteristic 'Rotation Speed': characteristic was supplied illegal value: number -100 exceeded minimum of 0. See https://homebridge.io/w/JtMGR for more info. [12/3/2022, 11:17:02 PM] [TuyaPlatform] [TuyaOpenMQ] Message received with wrong order. [12/3/2022, 11:17:02 PM] [TuyaPlatform] [TuyaOpenMQ] LastMessage: dataId = d9a940ac-4c7e-49d7-b200-e28388dabfdd, t = 1670105821 [12/3/2022, 11:17:02 PM] [TuyaPlatform] [TuyaOpenMQ] CurrentMessage: dataId = 6e0dade5-32a9-40c5-844f-24386a678bcf, t = 1670105816 [12/3/2022, 11:17:02 PM] [TuyaPlatform] [TuyaOpenMQ] Fallback to use API fetching the latest device status.
I am getting tons of these, device works fine but logs are making hb very unstable. Any comment or suggestion to stop this?