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 1 year ago • 34 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

@SwitchBot @SwitchBot-Wonderlabs Can you give a short Feedback of someone will work in this issue? Thanks in advance.

alien80 avatar Jun 25 '25 04:06 alien80

Same here. Can't get any data.

sphings79 avatar Jul 06 '25 06:07 sphings79

I wrote an email to SwitchBot support and got this answer:

„We’ve already forwarded the issue you mentioned to the relevant team, and the person in charge will follow up directly on GitHub under the thread you shared.“

So, it seems we should be a little bit patient.

alien80 avatar Jul 06 '25 07:07 alien80

Same issue here

paolofaz avatar Jul 10 '25 21:07 paolofaz

I also tried with Python getting the same error. I hope someone is working on it! It would be fantastic to integrate the keypad on home Assistant

paolofaz avatar Jul 13 '25 07:07 paolofaz

Same here, using node red! But if I look at the api documentation for the keypads, the status information provided is very minor. It does not even provide the battery status. Which from my point of view is probably the most important information we should get from a keypad which we rely on to enter our homes ;-)

sotima avatar Jul 17 '25 07:07 sotima

would love to see an update on this

battle566 avatar Aug 02 '25 13:08 battle566

I have similar Problems with my Keypad Touch. I get the basic device Data like Name/DeviceID but thats it. "Command ID", "event Name" and "result" allways stay at "unknown".

Hope that anybody can fix this.

RedTiger8484 avatar Aug 17 '25 15:08 RedTiger8484

@alien80 did you receive further feedback from SwitchBot support . did you follow up?

battle566 avatar Aug 23 '25 19:08 battle566

Same here, trying to get status using the api. Getting good response for Lock Ultra but error for the Keypad Vision:

Device Status: { "statusCode": 190, "body": {}, "message": "Cannot read properties of undefined (reading 'convertToStatus')" }

Tried to contact the support and received this "response":

Hi there, Good day!

Thank you for your continued support. My name is Kristin, and I am the SwitchBot support representative.

Thank you for your inquiry regarding our API.

We are very sorry, but due to lack of knowledge we are unable to provide any guidance regarding APIs. For more information about Open API, please check out GitHub. https://github.com/OpenWonderLabs/SwitchBotAPI/issues

If you have any other questions, please let us know, and we'll try to accommodate your request as soon as possible. Hope you have a nice day!

Best Regards, Kristin SwitchBot Customer Happiness www.switch-bot.com

romanost avatar Aug 25 '25 08:08 romanost

Have similar issue with my Keypad Vision

Image

pbo23 avatar Sep 08 '25 06:09 pbo23

I have the same issue.

gregalam avatar Sep 28 '25 07:09 gregalam

I have the same exact problem with Keypad Vision and response with status code 190 from home assistant switchbot-mqtt addon

EdwardR21 avatar Oct 21 '25 20:10 EdwardR21

Also the exact problem ....

svendominik avatar Oct 23 '25 18:10 svendominik

same here

ddtmax avatar Oct 26 '25 21:10 ddtmax

Hi Everyone,

This problem has been around for a long time now... Can anyone confirm that it is being worked on?

Sword-tm85 avatar Oct 29 '25 17:10 Sword-tm85

Hi Everyone,

This problem has been around for a long time now... Can anyone confirm that it is being worked on?

no, it does not work!

paolofaz avatar Oct 29 '25 17:10 paolofaz

And I have the feeling they're not even interested in making it possible. An event overview, showing who opened the door using the keypad and with what, would be sufficient for me.

svendominik avatar Oct 31 '25 08:10 svendominik

And I have the feeling they're not even interested in making it possible. An event overview, showing who opened the door using the keypad and with what, would be sufficient for me.

Such kind of "person recognition" feature was never even announced for keypad Vision. Why you expecting this ? You need to use switch bot doorbell with camera to recognize the persons

pbo23 avatar Oct 31 '25 08:10 pbo23

That's not what I want at all. I just want to know if the door was opened with someone else's fingerprint, or if "ABC's" PIN was used. I understand what you mean, that I need the video doorbell for that. But I'll solve it another way.

svendominik avatar Oct 31 '25 08:10 svendominik