SwitchBotAPI icon indicating copy to clipboard operation
SwitchBotAPI copied to clipboard

Keypad Vision - {"statusCode":190,"message":"Cannot read properties of undefined (reading 'convertToStatus')"}

Open soenkefischer opened this issue 10 months ago • 30 comments

Analysis

Hi,

I use a Homeassistant Add-On that uses this API to communicate with the switch bot API.

https://github.com/hsakoh/switchbot-mqtt

My Keypad is correctly installed and can be configured without any problems in the APP.

It is setup in that way, that it communicates via HUB mini (matter enabled).

When sendings the GET /v1.1/devices, I receive my hub and the kevisison, including all keys.

When requesting the status of the device (Keypad Vision).

GET,devices/BXXXXFE74B2F3/status

I get the following error message:

GET,https://api.switch-bot.com/v1.1/devices/BXXXXFE74B2F3/status,{"statusCode":190,"body":{},"message":"Cannot read properties of undefined (reading 'convertToStatus')"}

Same for sending a command

Send POST,devices/BXXXXFE74B2F3/commands,{"commandType":"command","command":"createKey","parameter":{"name":"123456","type":"permanent","password":"234567"}}

Response

POST,https://api.switch-bot.com/v1.1/devices/B0E9FE74B2F3/commands,{"statusCode":190,"message":"Cannot read properties of undefined (reading 'convertToThingCmd')"}

Expected Behavior

Receiving status of the device and setting up new keys or delete keys with sucess over the API

Steps To Reproduce

Sending the GET status command or POST command

Happens always

Logs

GET,devices/BXXXXFE74B2F3/status


I get the following error message:

GET,https://api.switch-bot.com/v1.1/devices/BXXXXFE74B2F3/status,{"statusCode":190,"body":{},"message":"Cannot read properties of undefined (reading 'convertToStatus')"}

Same for sending a command 

Send POST,devices/BXXXXFE74B2F3/commands,{"commandType":"command","command":"createKey","parameter":{"name":"123456","type":"permanent","password":"234567"}}


Response

POST,https://api.switch-bot.com/v1.1/devices/B0E9FE74B2F3/commands,{"statusCode":190,"message":"Cannot read properties of undefined (reading 'convertToThingCmd')"}

Configuration

Home assistant

https://github.com/hsakoh/switchbot-mqtt (the addon), believe that this is not needed to reproduce

Keypad Vision, Mini Hub matter enabled

Mini Hub cloud connected

Environment

Home assistant add on

Additional Context

No response

soenkefischer avatar Jun 08 '25 10:06 soenkefischer