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

Bug: Bug: latest update has broken Custom IR devices #981

Closed
thatpaulallen opened this issue Jun 7, 2024 · 10 comments
Closed

Bug: Bug: latest update has broken Custom IR devices #981

thatpaulallen opened this issue Jun 7, 2024 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@thatpaulallen
Copy link

thatpaulallen commented Jun 7, 2024

Describe the Bug

Anytime I try to use a Custom IR device I get this error…

106/06/2024, 20:49:1411@switchbot/homebridge-switchbot] This plugin threw an error from the characteristic 'On':
Unhandled error thrown inside write handler for characteristic: Cannot set properties of undefined (setting 'On').
See https://homebridge.io/w/JtMGR for more info.

To Reproduce

This is an example of how I have my custom IR device set up. Just FYI: these worked perfectly before the latest update.

IMG_1497
IMG_1499

Expected Behavior

I expected it to work and not throw an error.

Relevant Log Output

[06/06/2024, 20:54:20] [@switchbot/homebridge-switchbot] This plugin threw an error from the characteristic 'On': Unhandled error thrown inside write handler for characteristic: Cannot set properties of undefined (setting 'On'). See https://homebridge.io/w/JtMGR for more info.

Config for homebridge-switchbot

{
            "name": "SwitchBot",
            "credentials": {
                "token": "REDACTED",
                "secret": "REDACTED",
                "notice": "Keep your Token & Secret a secret!"
            },
            "options": {
                "irdevices": [
                    {
                        "deviceId": "02-202308301151-29602846",
                        "configDeviceName": "AUX",
                        "hide_device": false,
                        "configRemoteType": "Others",
                        "connectionType": "OpenAPI",
                        "customize": true,
                        "customOn": "On",
                        "customOff": "Off",
                        "disablePushOff": false,
                        "other": {
                            "deviceType": "switch"
                        }
                    },
                    {
                        "deviceId": "02-202308301149-50310440",
                        "configDeviceName": "EQ",
                        "configRemoteType": "Others",
                        "connectionType": "OpenAPI",
                        "customize": true,
                        "customOn": "On",
                        "customOff": "Off",
                        "disablePushOn": false,
                        "disablePushOff": false,
                        "other": {
                            "deviceType": "switch"
                        }
                    },
                    {
                        "deviceId": "02-202309250925-22506214",
                        "configDeviceName": "HDMI-ARC",
                        "configRemoteType": "Others",
                        "connectionType": "OpenAPI",
                        "customize": true,
                        "customOn": "On",
                        "customOff": "Off",
                        "disablePushOff": true,
                        "other": {
                            "deviceType": "switch"
                        }
                    },
                    {
                        "deviceId": "02-202308301147-41281781",
                        "configDeviceName": "Power",
                        "configRemoteType": "Others",
                        "connectionType": "OpenAPI",
                        "customize": true,
                        "customOn": "On",
                        "customOff": "Off",
                        "other": {
                            "deviceType": "switch"
                        }
                    },
                    {
                        "deviceId": "02-202401231437-10926103",
                        "configDeviceName": "HDMI In",
                        "hide_device": true,
                        "configRemoteType": "Others",
                        "connectionType": "OpenAPI",
                        "customize": true,
                        "customOn": "On",
                        "customOff": "Off",
                        "disablePushOn": false,
                        "disablePushOff": false,
                        "other": {
                            "deviceType": "switch"
                        }
                    },
                    {
                        "deviceId": "02-202401281632-59518813",
                        "configDeviceName": "Options",
                        "hide_device": true,
                        "configRemoteType": "Others",
                        "connectionType": "OpenAPI",
                        "customize": true,
                        "customOn": "On",
                        "customOff": "Off",
                        "other": {
                            "deviceType": "switch"
                        }
                    },
                    {
                        "deviceId": "02-202401281633-61969554",
                        "configDeviceName": "Up",
                        "hide_device": true,
                        "configRemoteType": "Others",
                        "connectionType": "OpenAPI",
                        "customize": true,
                        "customOn": "On",
                        "customOff": "Off"
                    }
                ]
            },
            "platform": "SwitchBot"

Screenshots

No response

Device and Model

Raspberry Pi 3b+

Node.js Version

20.12.1

NPM Version

No clue

Homebridge Version

1.8.2

Homebridge Switchbot Plugin Version

3.5.0

Homebridge Config UI X Plugin Version

No response

Operating System

Raspbian

@failbit
Copy link

failbit commented Jun 22, 2024

I have this issue aswell. Trying to downgrade.

@donavanbecker
Copy link
Collaborator

Can you try the latest beta?

@thatpaulallen
Copy link
Author

Can you try the latest beta?

Just installed it. It nearly fixes my issue, but now all my devices appear as switches AND plugs in the Home app. The plugs work while the switches still throw an error in the Homebridge log.

In the meantime I'm downgrading to 3.4, which woks flawlessly.

IMG_1523

@failbit
Copy link

failbit commented Jun 22, 2024

Can confirm. 3.4 works flawless after downgrade.

@donavanbecker
Copy link
Collaborator

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

@thatpaulallen
Copy link
Author

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

It didn’t work. I still have a plug and a switch for each device for some reason (I only want a switch).

I get errors when I use the switch. The plug appears to work for the most part. I’m not sure what I’m looking at, but here’s my log…

in the meantime I’m going back to 3.4

IMG_1552

@thatpaulallen
Copy link
Author

thatpaulallen commented Jun 28, 2024

Not sure if this is helpful information or not, but both times I’ve rolled back my firmware I had to go back to 3.3 and then forward to 3.4 to get the plugs on each device to disappear.

The plugs remained if I merely rolled back to 3.4.

@donavanbecker
Copy link
Collaborator

donavanbecker commented Jul 5, 2024

Can you try the latest beta:

npm version

Click here to find out how to install Beta

@donavanbecker
Copy link
Collaborator

v3.6.0 has been released. If this issue isn't resolved please open a new issue.

@failbit
Copy link

failbit commented Jul 7, 2024

Did test it, did not work:

[7/7/2024, 6:19:19 PM] [SwitchBot] Others: AbzugshaubePower Set On: false [7/7/2024, 6:19:19 PM] [SwitchBot] Others: AbzugshaubePower Sending request to SwitchBot API, body: {"command":"AbzugshaubePower","parameter":"default","commandType":"customize"}, [7/7/2024, 6:19:21 PM] [SwitchBot] Others: AbzugshaubePower request to SwitchBot API, body: {"command":"AbzugshaubePower","parameter":"default","commandType":"customize"} sent successfully [7/7/2024, 6:19:21 PM] [@switchbot/homebridge-switchbot] This plugin threw an error from the characteristic 'On': Unhandled error thrown inside write handler for characteristic: Cannot read properties of undefined (reading 'updateCharacteristic'). See https://homebridge.io/w/JtMGR for more info.

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

No branches or pull requests

7 participants