Closed ric-101 closed 3 weeks ago
I don't really understand Python syntax,
but does the payload include parameter=default
and commandType=command
?
I am testing with the Lock, not the Lock Pro, and both payloads worked fine.
{"commandType":"command","command":"lock","parameter":"default"}
{"command":"lock"}
It seems that something else is causing the issue.
Thank you! Yeas I tried both, and the results are the exact same, I guess "commandType"and "command" get ignored... let's see if anyone at SwitchBot can help!
Just tested this on a Lock Pro on the Homebridge-SwitchBot plugin and works just fine.
Just tested this on a Lock Pro on the Homebridge-SwitchBot plugin and works just fine.
Hi Donavan, thank you for trying. I agree it should work 😅 but unfortunately it doesn't for me, I keep getting the same error... I tried updating firmware on both the Hub and the Lock Pro but still nothing changed.... I see you're marked as "collaborator", any chance you could look up what could cause that specific error? (I couldn't find anything online nor on the documentation), anything else I could try?
Cheers :)
I don't work for SwitchBot just maintain the Homebridge plugin. It is clearly something that you are not doing correctly. I have no problems with the plugin control the Lock Pro
I don't work for SwitchBot just maintain the Homebridge plugin. It is clearly something that you are not doing correctly. I have no problems with the plugin control the Lock Pro
Thank you!
Yeah, I'm definitely doing something wrong, but haven;t been able to figure out what it is. It should be a simple API call, shouldn't it? Once I don't get an authentication error and the payload is correct, what else could go wrong? (and the payload here should be super simple). The error message isn't helping at all, either..
I'm using the "Hub Mini2", in case it makes any difference.
By the way, I noticed that I can access it from a remote network too, does the Hub connect to a SwitchBot's public server? Is there a way to make it only accessible locally, without internet access?
Thank you :)
Keep getting the same error ("One or more parameter values are not valid. The AttributeValue for a key attribute cannot contain an empty string value. Key: sn"), anyone else might help? @SwitchBot-Wonderlabs , @SwitchBot?
Thank you :)
omebridge-SwitchBot plugin
Do I need to install the plug-in in order to use the API? If so, could you explain a little more, or link a guide which explains how this works?
Thanks for your help!!
no you don't need to install the plugin, but you are missing something, but I am not sure what.
Solved with firmware update
Lock Pro API 400 Error for no apparent reason
Hi there!
So I'm trying to control my SwitchBot Lock Pro via API (through the hub, of course).
I can correctly connect to the hub, and query the Lock Pro via API (get status of the LockPro), but as I try to Lock/Unlock it I keep getting an error.
But when I try and run it, I get the following error: "One or more parameter values are not valid. The AttributeValue for a key attribute cannot contain an empty string value. Key: sn" - but I have no clue what "sn" is nor where it should be (I tried added it in the payload and the header, with no success).
Attached is a screenshot of my (python) code, and the result when trying to run it:
Anyone can help?
Thank you!!
Logs
Configuration
Environment
Additional Context
No response