OpenWonderLabs / homebridge-switchbot

The Homebridge SwitchBot plugin allows you to access your SwitchBot Device(s) from HomeKit. Homebridge.
https://www.switch-bot.com/
ISC License
229 stars 47 forks source link

Bug: IR Device A/C shows on #988

Open AlbertoAIG opened 2 weeks ago

AlbertoAIG commented 2 weeks ago

Describe the Bug

An IR device (A/C device) configured through hub 2 when deactivating it appears as on in HomeKit and even if you try to turn it off, it is turned on again as on automatically, however, it does not send the on signal by IR but the status in HomeKit is not correct.

To Reproduce

Randomly, the device an appears in HomeKit as active (it is an air conditioner). I select the option to deactivate it, a power off signal is correctly sent by IR but the status is put back on in HomeKit despite the fact that it does not send the on IR signal.

Expected Behavior

It should be kept off when the option to turn off from the HomeKit app is selected.

Relevant Log Output

[6/18/2024, 11:41:39 AM] [SwitchBot] Air Conditioner: Aire Acondicionado Sending request to SwitchBot API, body: {"command":"turnOff","parameter":"default","commandType":"Test"},
[6/18/2024, 11:41:41 AM] [SwitchBot] Air Conditioner: Aire Acondicionado request to SwitchBot API, body: {"command":"turnOff","parameter":"default","commandType":"Test"} sent successfully

Config for homebridge-switchbot

"name": "SwitchBot",
    "credentials": {
        "token": 
        "secret": 
        "notice": "Keep your Token & Secret a secret!"
    },
    "options": {
        "irdevices": [
            {
                "deviceId": "02-xxxxxxxxx-xxxxx",
                "configDeviceName": "Aire Acondicionado",
                "configRemoteType": "Air Conditioner",
                "connectionType": "OpenAPI",
                "customize": true,
                "commandType": "Test",
                "disablePushDetail": true,
                "irair": {
                    "hide_automode": true,
                    "set_max_heat": 26,
                    "set_min_heat": 20,
                    "set_max_cool": 24,
                    "set_min_cool": 20,
                    "meterType": "Hub 2",
                    "meterId": "C130xxxxxxxA62B"
                },
                "external": false
            }
        ],
        "refreshRate": 120,
        "logging": "debug"
    },
    "_bridge": {
        "username": "xx:xx:xx:xx:xx:xx",
        "port": xxxx
    },
    "platform": "SwitchBot"
}

Screenshots

Captura 2024-06-18 a las 11 43 43

Device and Model

Switchbot Hub 2

Node.js Version

v20.12.2

NPM Version

v10.5.22

Homebridge Version

v1.8.2

Homebridge Switchbot Plugin Version

v3.5.0

Homebridge Config UI X Plugin Version

v4.56.2

Operating System

macOS

donavanbecker commented 4 days ago

v3.5.1 has been released, please install and let me know if this has been resolved.