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: Device Type not set for "Others" IR device #1107

Closed
Stausssi opened this issue Nov 6, 2024 · 4 comments
Closed

Bug: Device Type not set for "Others" IR device #1107

Stausssi opened this issue Nov 6, 2024 · 4 comments
Assignees
Labels
bug Something isn't working stale

Comments

@Stausssi
Copy link

Stausssi commented Nov 6, 2024

Describe the Bug

Configuring a "Other" IR device results in Device Type not set error regardless of the type configured.

This is probably related to #1091 where the lowercase device types where corrected to uppercase.
Note "switch" being lowercase in the logs.

To Reproduce

Add a custom (other) IR remote and configure it in Homebridge. Regardless of the actual type configured, the error should appear.

Expected Behavior

The type should match case-insensitive

Relevant Log Output

[11/6/2024, 6:42:54 PM] [SwitchBot] [DEBUG] Others: Speaker source Using Device Config Logging: debug
[11/6/2024, 6:42:54 PM] [SwitchBot] [DEBUG] Others: Speaker source version: 4.1.3
[11/6/2024, 6:42:54 PM] [SwitchBot] [DEBUG] Others: Speaker source Use Device Config Device Type: switch
[11/6/2024, 6:42:54 PM] [SwitchBot] Others: Speaker source Device Type not set
[11/6/2024, 6:42:54 PM] [SwitchBot] [DEBUG] Others:Speaker source Config: {"logging":"debug","connectionType":"OpenAPI","customize":true,"customOn":"Quelle","customOff":"Quelle","deviceId":"02-202411061805-54710211","deviceName":"Speaker source","remoteType":"Others","hubDeviceId":"C62A482BE139","configDeviceName":"Speaker source","configRemoteType":"Others","type":"switch","disablePushOn":false,"disableCaching":false}
[11/6/2024, 6:42:54 PM] [SwitchBot] [DEBUG] Others: Speaker source version: 4.1.3

Config for homebridge-switchbot

{
    "name": "SwitchBot",
    "credentials": {
        "token": "",
        "secret": "",
        "notice": "Keep your Token & Secret a secret!"
    },
    "options": {
        "devices": [
            {
                "deviceId": "FBE6891D1950",
                "hide_device": false,
                "configDeviceType": "Bot",
                "connectionType": "OpenAPI",
                "type": "switch",
                "mode": "press",
                "allowPush": false,
                "external": false
            }
        ],
        "irdevices": [
            {
                "configDeviceName": "Speaker",
                "deviceId": "02-202411052029-70299258",
                "configRemoteType": "Speaker",
                "connectionType": "OpenAPI",
                "customize": false,
                "disableCaching": false,
                "history": false
            },
            {
                "configDeviceName": "Speaker light",
                "deviceId": "02-202411061804-82892149",
                "configRemoteType": "Light",
                "connectionType": "OpenAPI"
            },
            {
                "configDeviceName": "Speaker source",
                "deviceId": "02-202411061805-54710211",
                "configRemoteType": "Others",
                "connectionType": "OpenAPI",
                "type": "switch",
                "customize": true,
                "customOn": "source",
                "customOff": "source",
                "disablePushOn": false,
                "disableCaching": false,
                "logging": "debug"
            }
        ],
        "BLE": false,
        "discoverBLE": false,
        "refreshRate": 60
    }
}

Screenshots

No response

Device and Model

Raspberry Pi 5

Node.js Version

v20.18.0

NPM Version

v10.8.2

Homebridge Version

v1.8.5

Homebridge Switchbot Plugin Version

v4.1.3

Homebridge Config UI X Plugin Version

v4.62.0

Operating System

Docker image

@Stausssi
Copy link
Author

Stausssi commented Nov 6, 2024

Manually editing the config.json to contain "type": "Switch" instead of "type": "switch" fixes the error and also allows using the device in the Home app. However, the UI then does not show a selected type anymore:
image

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Copy link
Contributor

This issue has been closed as no further activity has occurred.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2024
@Stausssi
Copy link
Author

Stausssi commented Nov 28, 2024

Please reopen, I might have the time to look into it myself and potentially fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

6 participants