Comments (14)
Check the setting,
My device is SwitchBot Curtain.
from switchbotapi.
I am having issues as well but I am using curl over CLI. These commands works:
https://api.switch-bot.com/v1.0/devices
https://api.switch-bot.com/v1.0/statues
What isn't working for me is POST:
https://api.switch-bot.com/v1.0/devices/{mac}/turnOn
{"message":"Authorization header requires 'Credential' parameter. Authorization header requires 'Signature' parameter. Authorization header requires 'SignedHeaders' parameter. Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header. Authorization=TOKEN"}
How are you setting the Authorization part in Postman? I am getting unauthorized error. I think I am not adding the token key correctly.
Edit: I figured out how to properly add the token. I get this error using this url.
https://api.switch-bot.com/v1.0/devices/{MAC}/commands
What is the proper url to have the curtain fully open/close?
"statusCode": 190,
"body": {},
"message": "param is invalid"
from switchbotapi.
I am having issues as well but I am using curl over CLI. These commands works:
https://api.switch-bot.com/v1.0/devices
https://api.switch-bot.com/v1.0/statuesWhat isn't working for me is POST:
https://api.switch-bot.com/v1.0/devices/{mac}/turnOn{"message":"Authorization header requires 'Credential' parameter. Authorization header requires 'Signature' parameter. Authorization header requires 'SignedHeaders' parameter. Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header. Authorization=TOKEN"}
How are you setting the Authorization part in Postman? I am getting unauthorized error. I think I am not adding the token key correctly.
Edit: I figured out how to properly add the token. I get this error using this url.
https://api.switch-bot.com/v1.0/devices/{MAC}/commandsWhat is the proper url to have the curtain fully open/close?
"statusCode": 190, "body": {}, "message": "param is invalid"
You can add the following context to the body then select the raw with json format
{
"command": "turnOn",
"parameter": "default",
"commandType": "command"
}
from switchbotapi.
Getting this error now.
"statusCode": 190,
"body": {},
"message": "ExpressionAttributeValues must not be empty"
from switchbotapi.
Getting this error now.
"statusCode": 190, "body": {}, "message": "ExpressionAttributeValues must not be empty"
Post Url is :
https://api.switch-bot.com/v1.0/devices/C2F1406*****/commands
Try uncheck the Content-Type in Headers tab.
from switchbotapi.
This is my post URL
https://api.switch-bot.com/v1.0/devices/C5C6DFDH83EJ/commands
I have tried unchecking Content-Type. Still same error.
from switchbotapi.
So weird. I am also using the curtain bot and matched your settings. Still error occurs.
Error code 190 is:
190 | System error | Device internal error due to device states not synchronized with server
from switchbotapi.
Check out: homebridge-switchbot-openapi, I haven't implemented curtains yet, but connection to API is solid.
from switchbotapi.
So weird. I am also using the curtain bot and matched your settings. Still error occurs.
Error code 190 is:190 | System error | Device internal error due to device states not synchronized with server
emmmm...
Try use SwitchBot App move your curtain first?
Then post the api?
I have no idea...
from switchbotapi.
Check out: homebridge-switchbot-openapi, I haven't implemented curtains yet, but connection to API is solid.
When i rebooted the Hub mini, the command API worked again,may be this is a bug for Hub mini
from switchbotapi.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from switchbotapi.
This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.
from switchbotapi.
I just wanted to point out that anyone that is getting the ExpressionAttributeValues must not be empty make sure to enable cloud service on your switchbot device. I was getting this error and then when I enabled cloud services (via the app) the error went away.
from switchbotapi.
Some extra info about the 'ExpressionAttributeValues' error as you'll probably end up here. It also occurs if you try to move a curtain in a group (2 curtains grouped together, for middle opening) and you're not moving the master curtain. Using the master's ID solves the issue.
from switchbotapi.
Related Issues (20)
- Open single curtain (of 2 curtains grouped together) via API HOT 3
- Light Remote color and timer HOT 1
- [Keypad Touch] Send lock codes in response to Get Device Status
- [Keypad Touch] Delete Key command does not work HOT 1
- API Daily Limit HOT 4
- Support for s10 vacuum HOT 3
- Add support for K10+ vacuum HOT 2
- example java script to initiate a bot press
- Expand Switchbot API for Lock Pro HOT 1
- API 190 Error HOT 53
- Expose last update timestamp for device
- More Keypad Touch Webhook Events Required HOT 3
- SwitchBot Lock's webhook often fails to POST to servers
- Keypad Touch: Invalid API calls cause stability issues
- Knowing when a press at a bot was successful
- Parameter Error for the S10 selfClean Command
- batteries status always 100% HOT 1
- Not able to install the adapter HOT 1
- Multiple commands per Request
- ``/v1.0/devices/`` endpoint - device list functionality errored HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from switchbotapi.