iRayanKhan / homebridge-tuya

A Homebridge plugin to control Tuya devices locally.
MIT License
400 stars 165 forks source link

New Device: Arlec GridConnect ATF4601HA and APDC160WHA #348

Open miljw002 opened 2 years ago

miljw002 commented 2 years ago

Hi,

This is the first time I'm doing this, so please let me know what I need to do if I've missed anything.

The Devices Arlec 45cm Grid Connect Smart Remote Controlled DC Pedestal Fan Arlec 117cm Grid Connect Smart Aurora Digital Tower Fan

Model Numbers: ATF4601HA APDC160WHA

https://www.bunnings.com.au/arlec-117cm-grid-connect-smart-aurora-digital-tower-fan_p0274798 https://www.bunnings.com.au/arlec-45cm-grid-connect-smart-remote-controlled-dc-pedestal-fan_p0274519

These are both pedestal fans branded as Arlec here in Australia.

Partial Support? The fans are detected and register in the plug in. It's possible to start and stop the fans, but the speeds don't work. If you try and change the speed then they either don't change or the plugin becomes unresponsive and doesn't change the speed.

Device Schema I think this is the schema info you are after?

(Fan:3.3) with signature {"1":true,"2":"nature","3":1,"5":true,"9":false,"21":26,"22":"cancel","23":0,"24":0,"101":"cancel"} (Fan:3.3) with signature {"1":true,"2":"nature","3":2,"5":true,"9":false,"21":26,"22":"cancel","23":0,"24":0,"101":"cancel"}

Additional context Here is the current config:

                "name": "Bedroom Fan",
                "type": "Fan",
                "manufacturer": "Arlec",
                "model": "Arlec 117cm Grid Connect Smart Aurora Digital Tower Fan",
                "id": "XXXXXXX",
                "key": "XXXXXXXXX",
                "dpActive": "1",
                "dpRotationSpeed": "2"
            },
            {
                "name": "Living Room Fan",
                "type": "Fan",
                "manufacturer": "Arlec",
                "model": "Arlec 45cm Grid Connect Smart Remote Controlled DC Pedestal Fan",
                "id": "XXXXXXXXX",
                "key": "XXXXXXXX",
                "dpActive": "1",
                "dpRotationSpeed": "2"

I can see the following errors in the log. [homebridge-tuya] This plugin generated a warning from the characteristic 'Rotation Speed': characteristic was supplied illegal value: number 5 exceeded maximum of 3. See https://git.io/JtMGR for more info.

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

miljw002 commented 2 years ago

I'm doing a little more digging.

If I do a 'Get Device Specification' API call from the Tuya cloud API for the Living Room Fan I get the following:

{ "result": { "category": "fs", "functions": [ { "code": "switch", "lang_config": { "false": "off", "true": "on" }, "name": "switch", "type": "Boolean", "values": "{}" }, { "code": "fan_speed_percent", "lang_config": { "unit": "" }, "name": "Wind Speed Level", "type": "Integer", "values": "{\"min\":1,\"max\":15,\"scale\":0,\"step\":1}" } ], "status": [ { "code": "switch", "lang_config": { "false": "off", "true": "on" }, "name": "switch", "type": "Boolean", "values": "{}" }, { "code": "fan_speed_percent", "lang_config": { "unit": "" }, "name": "Wind Speed Level", "type": "Integer", "values": "{\"min\":1,\"max\":15,\"scale\":0,\"step\":1}" } ] }, "success": true }