AMoo-Miki / homebridge-tuya-lan

Homebridge plugin for IoT devices that use Tuya Smart's platform
MIT License
196 stars 50 forks source link

AC functions not working #251

Open conradb08 opened 2 years ago

conradb08 commented 2 years ago

I've installed the plugin on homebridge that is running on my Raspberry Pi3. I've successfully added the AC that is registered in my Tuya app and it also shows in my Apple Home App. The functions however are not working correctly. The AC will be on but it will show it is off in the Apple Home App. And when I try to change the temp when it shows on in the Apple Home App, it will jump to the highest setting (32degrees celsius).

[homebridge-tuya] This plugin generated a warning from the characteristic 'Current Temperature': characteristic was supplied illegal value: number 220 exceeded maximum of 100. See https://git.io/JtMGR for more info.

Could you please help, I'm not a developer and don't understand coding. I only got so far by Googling and watching tutorials.

Regards.

Conrad

peterder72 commented 2 years ago

I am getting the same issue. Tuya developer documentation clearly states the order and types for all available datapoints and in theory matches plugin's expectations. However, for reasons unknown to me some ACs have different order and even data format for some datapoints.

By trial and error I was able to fix some data mappings and get most of the functions working properly with the exception of fan speed (might require changes to Homebridge similar to the ones in #148). Apple Home, however, is still unstable and can sometimes have issues with getting current state of the device (on/off), though basic functions like turning on/off and changing temperature are working.

To fix the issue completely, first the nature of those differences between signatures must be determined; only after that a solid solution can replace a quickfix that I have set up on my system.

As for your issue, when booting up Homebridge, the plugin dumps all available data to logs. Could you post those here? The line should look like this:

[TuyaLan] Ready to handle AC (AirConditioner:3.3) with signature {"1":true,"2":"auto","3":"low","4":0,"5":18,"6":false,"7":false,"8":22,"9":0,"12":true,"13":false,"14":false,"15":0}

conradb08 commented 2 years ago

@peterder72

Here are the data logs regarding my AirCon.

[25/08/2021, 20:03:49] [homebridge-tuya] Marked Air Conditioner unreachable by faulting Service.Air Conditioner.Active [25/08/2021, 20:03:54] [homebridge-tuya] Discovered Air Conditioner (bf17b7dcdeda9a0da0ahcv) identified as AirConditioner (3.2) [Tuya] Changing ping gap for Air Conditioner to 9s [Tuya DEBUG] reconnect called for Air Conditioner [Tuya] Discovery ended. [25/08/2021, 20:03:54] [homebridge-tuya] Connected to Air Conditioner [Tuya] Sending first query to Air Conditioner (3.2) [Tuya] Odd message from Air Conditioner with command 10: data format error [Tuya] Raw message from Air Conditioner (3.2) with command 10: 000055aa000000010000000a0000001d000000016461746120666f726d6174206572726f7271bf61a40000aa55