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: undefined with Device Type: undefined, is currently not supported. #1120

Open
zsiraph opened this issue Nov 22, 2024 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@zsiraph
Copy link

zsiraph commented Nov 22, 2024

Describe the Bug

All of a sudden a perfectly good config which was bulletproof for more than a year now suddenly gets this message and the bot does not work from homebridge.

The device type is clearly set, yet the plugin does not acknowledges it.

Tried to uninstall and reinstall it, did not help.

To Reproduce

Just try to set up a standard switchbot bot.

Expected Behavior

The device type is set to Bot. The expected behaviour would be that the plugin acknowledges this.

Relevant Log Output

[SwitchBot] Device: undefined with Device Type: undefined, is currently not supported. Submit Feature Requests Here: https://tinyurl.com/SwitchBotFeatureRequest, device: {"configDeviceName":"Switchbot GDoor","deviceId":"xxxxxx","configDeviceType":"Bot","connectionType":"OpenAPI","type":"switch","mode":"press","allowPush":true,"maxRetries":5}

Config for homebridge-switchbot

{
            "name": "SwitchBot",
            "credentials": {
                "token": "yyyy",
                "secret": "zzzzz",
            },
            "options": {
                "devices": [
                    {
                        "configDeviceName": "Switchbot GDoor",
                        "deviceId": "xxxxxxxx",
                        "configDeviceType": "Bot",
                        "connectionType": "OpenAPI",
                        "type": "switch",
                        "mode": "press",
                        "allowPush": true,
                        "maxRetries": 5
                    }
                ]
            },
            "platform": "SwitchBot"
        }

Screenshots

homebridge-switchbot-device-type

Device and Model

SwitchBot Hub Mini V5.7-4.0 & Switchbot V6.6

Node.js Version

v.22.11.0

NPM Version

v10.9.0

Homebridge Version

v1.8.5.

Homebridge Switchbot Plugin Version

v4.1.4.

Homebridge Config UI X Plugin Version

v.4.63.0

Operating System

Raspbian

@domre77
Copy link

domre77 commented Nov 23, 2024

I’m seeing the exact same issue, with the exact same config.

I did completely remove the bot and reinstall the plugin fresh. Worked for a day then back to the above issue.

I’ve found it to be incredibly unreliable for a number of plug in version.

@Niklas31
Copy link

I have the same issue!

@weim-mkt
Copy link

same issue here with switchbot bot. There has been issues with the API server recently? Every now and then, I can no longer control my switchbot bot based on API.

@domre77
Copy link

domre77 commented Nov 24, 2024

API has been very unreliable for months. This issue is different though, in that the plug thinks it’s an unsupported device and never works.

@Stausssi
Copy link

Sounds like a duplicate of #1107. I've added a workaround there (#1107 (comment))

@Niklas31
Copy link

Sounds like a duplicate of #1107. I've added a workaround there (#1107 (comment))

I tried the "fix" but same error. Now even in my curtain:

image

Here is my config:

devices: [
            {
                "configDeviceName": "Cortina 2",
                "deviceId": "C8F115DC060C",
                "configDeviceType": "Curtain",
                "connectionType": "OpenAPI",
                "hide_lightsensor": true,
                "set_min": 5,
                "set_max": 95
            },
            {
                "configDeviceName": "Bot",
                "deviceId": "CE5138DFD63E",
                "configDeviceType": "Bot",
                "connectionType": "OpenAPI",
                "type": "Switch",
                "mode": "press"
            }
        ],

@zsiraph
Copy link
Author

zsiraph commented Nov 26, 2024

Well, the solution for me was to ditch the whole plugin and go for a matter supported Hub2 with my bot.

@bwt615
Copy link

bwt615 commented Nov 28, 2024

I can confirm the Switch worked for me. Had to restart the home hub though.

@dampney
Copy link

dampney commented Dec 3, 2024

Resetting plugin, hubs and devices didn't work. Bots are still not recognised.

This plug-in has become very buggy since 2023. Is there proper dev support going forward? The switchbot matter integration is half baked and missing so many features

@neegool
Copy link

neegool commented Dec 5, 2024

I'm having the same issue. Turning on debug logging reveals what might be the cause in my case:

[06/12/2024, 02:19:10] [SwitchBot] [DEBUG] Got devices: {"statusCode":190,"body":{},"message":"Requests reached the daily limit"}
[06/12/2024, 02:19:10] [SwitchBot] [DEBUG] statusCode: 200
[06/12/2024, 02:19:10] [SwitchBot] [DEBUG] response: {"statusCode":190,"body":{},"message":"Requests reached the daily limit"}

It looks like the plugin is unable to retrieve devices due to hitting API limits. (#1108)

@seanwalter
Copy link

seanwalter commented Dec 15, 2024

I only have a Curtain and just started seeing this issue today, though it may have existed for the last week or so.

I noticed that the log is reporting this error with array values that include configDeviceType, whereas the SwitchBot API documentation only references deviceType. Not sure if that matters, but I thought I’d call it out.

Also, I downgraded to 3.8.3 and immediately started getting the error 190 about too many API calls (#1108) even though my device settings are the 4.1.5 defaults. When I upgrade to 4.1.0 or later, the 190 error goes away, but I get the undefined device type error instead.

Finally, everything happening in that last paragraph is from a clean install of the plugin (though I retained my older API key and Secret…might try to replace those and test again if I have time later tonight…)

Hopefully all of this helps. Thank you!

*** update…either SwitchBot changed something, or resetting my API keys resolved this for me. I just did the API key reset this morning and the error is gone — though unfortunately I didn’t check anything before the reset so I can’t say which one it is ***

@FranciRoosters
Copy link

Same issue here, even after resetting the Secret Key. Can't reset the actual Token itself though. Curtains work fine. Issue must be exclusive to the Bot. @donavanbecker Will this be fixed anytime soon?

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