homebridge-switchbot: Bug: 403 forbidden messaged started today

Describe the Bug

Getting the following in the homebridge logs, everything was working fine yesterday

[16/12/2024, 09:50:42] [SwitchBot] Forbidden, The request has been authenticated but does not have appropriate permissions, or a requested resource is not found, 
            statusCode: 403

Have reset my token in the switch bot app and updated it in hoebridge but the issue continues

To Reproduce

Restarted homebridge and errors are appearing, actually just went wrong.

Expected Behavior

Devices connect and operate in hombridge

Relevant Log Output

[16/12/2024, 10:42:11] [SwitchBot] Initializing SwitchBot platform...
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] Using Platform Config Logging: debug
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] Using Platform Config refreshRate: 360
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] Platform Config: {"platform":"Resideo","logging":"debug","refreshRate":360}
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] Plugin Version: 4.1.5
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] Finished initializing platform: SwitchBot
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] Verifying Config
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] Config OK
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] Platform BLE is not enabled
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] Executed didFinishLaunching callback
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] Retry Count: 0
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] Max Retries: undefined
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] Delay Between Retries: undefined
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] Platform Config updateRate Not Set: undefined
Setup Payload:
X-HM://0024RBODHMEPK
                       
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] Platform Config pushRate Not Set: undefined
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] Platform Config maxRetries Not Set: undefined
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] Platform Config delayBetweenRetries Not Set: undefined
[16/12/2024, 10:42:13] Homebridge v1.8.5 (HAP v0.12.3) (Homebridge) is running on port 51826.
[16/12/2024, 10:42:13] 

NOTICE TO USERS AND PLUGIN DEVELOPERS
> Homebridge 2.0 is on the way and brings some breaking changes to existing plugins.
> Please visit the following link to learn more about the changes and how to prepare:
> https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0

[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] Got devices: {"message":"Forbidden"}
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] statusCode: 403
[16/12/2024, 10:42:13] [SwitchBot] [DEBUG] response: {"message":"Forbidden"}
[16/12/2024, 10:42:13] [SwitchBot] Forbidden, The request has been authenticated but does not have appropriate permissions, or a requested resource is not found, 
            statusCode: 403
[16/12/2024, 10:42:14] [SwitchBot] [DEBUG] Got devices: {"message":"Forbidden"}
[16/12/2024, 10:42:14] [SwitchBot] [DEBUG] statusCode: 403
[16/12/2024, 10:42:14] [SwitchBot] [DEBUG] response: {"message":"Forbidden"}
[16/12/2024, 10:42:14] [SwitchBot] Forbidden, The request has been authenticated but does not have appropriate permissions, or a requested resource is not found, 
            statusCode: 403
[16/12/2024, 10:42:14] [SwitchBot] [DEBUG] Got devices: {"message":"Forbidden"}
[16/12/2024, 10:42:14] [SwitchBot] [DEBUG] statusCode: 403
[16/12/2024, 10:42:14] [SwitchBot] [DEBUG] response: {"message":"Forbidden"}
[16/12/2024, 10:42:14] [SwitchBot] Forbidden, The request has been authenticated but does not have appropriate permissions, or a requested resource is not found, 
            statusCode: 403
[16/12/2024, 10:42:14] [SwitchBot] [DEBUG] Got devices: {"message":"Forbidden"}
[16/12/2024, 10:42:14] [SwitchBot] [DEBUG] statusCode: 403
[16/12/2024, 10:42:14] [SwitchBot] [DEBUG] response: {"message":"Forbidden"}
[16/12/2024, 10:42:14] [SwitchBot] Forbidden, The request has been authenticated but does not have appropriate permissions, or a requested resource is not found, 
            statusCode: 403
[16/12/2024, 10:42:14] [SwitchBot] [DEBUG] Got devices: {"message":"Forbidden"}
[16/12/2024, 10:42:14] [SwitchBot] [DEBUG] statusCode: 403
[16/12/2024, 10:42:14] [SwitchBot] [DEBUG] response: {"message":"Forbidden"}
[16/12/2024, 10:42:14] [SwitchBot] Forbidden, The request has been authenticated but does not have appropriate permissions, or a requested resource is not found, 
            statusCode: 403

Config for homebridge-switchbot

{
    "name": "SwitchBot",
    "credentials": {
        "token": "{blanked for privacy}",
        "secret": "{blanked for privacy}",
        "notice": "Keep your Token & Secret a secret!"
    },
    "options": {
        "refreshRate": 360,
        "logging": "debug"
    },
    "platform": "SwitchBot"
}

Screenshots

No response

Device and Model

Hub Mini v6.1-5.1, Switch bot curtains, K10 plus

Node.js Version

v22.12.0

NPM Version

v10.9.2

Homebridge Version

v1.8.5

Homebridge Switchbot Plugin Version

v4.1.5

Homebridge Config UI X Plugin Version

v4.65.1

Operating System

Raspbian GNU/Linux Bullseye

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 20

Most upvoted comments

It looks like this has been resolved by SwitchBot. Since it has been asked in 4.1.6-beta.9 I have added an option to override the hostname.

Can you try the latest beta:

npm version

Click here to find out how to install Beta