homebridge-switchbot
homebridge-switchbot copied to clipboard
Bug: Bug: latest update has broken Custom IR devices
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.
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