Closed 1liminal1 closed 2 years ago
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.
Anyone?
Im facing the same issue using homebridge.
It is not possible to get the status of remote devices as they are send only devices. The API document says this:
Get the status of a physical device that has been added to the current user's account.
Physical devices refer to the following SwitchBot products,
Bot
Plug
Curtain
Meter
Motion Sensor
Contact Sensor
Color Bulb
Humidifier
Smart Fan
Ok that does make sense. I did manage to get in working. Custom button commands are whatever you name them. ie On and not TurnOn
@1liminal1 You could always use IFTTT, that's what I ended up using.
I can get a list of devices doing:
curl -H "Authorization:xxxxxxxxxxxxxxxxxxxx" https://api.switch-bot.com/v1.0/devices
I see the device in the list of devices
"infraredRemoteList":[{"deviceId":"xxxxxxxxxxxxxxxxxxxxxx","deviceName":"Bedroom Fan","remoteType":"Others","hubDeviceId":"xxxxxxxxxxxxxxxx"}]}
But If I try to get the status:
curl -H "Authorization:xxxxxxxxxxxxxxxxxxxxxxxx" https://api.switch-bot.com/v1.0/devices/xxxxxxxxxxxxxxxxxxx/status
I get the following error:
{"statusCode":190,"body":{},"message":"wrong deviceId"}
Also I have added this as a switch into Home Assistant. I have three switchbot and two curtains. all works fine.
But cant get the fan to do anything
my code
Thanks so much :)
I can get a list of devices doing:
curl -H "Authorization:xxxxxxxxxxxxxxxxxxxx" https://api.switch-bot.com/v1.0/devices
I see the device in the list of devices
"infraredRemoteList":[{"deviceId":"xxxxxxxxxxxxxxxxxxxxxx","deviceName":"Bedroom Fan","remoteType":"Others","hubDeviceId":"xxxxxxxxxxxxxxxx"}]}
But If I try to get the status:
curl -H "Authorization:xxxxxxxxxxxxxxxxxxxxxxxx" https://api.switch-bot.com/v1.0/devices/xxxxxxxxxxxxxxxxxxx/status
I get the following error:
{"statusCode":190,"body":{},"message":"wrong deviceId"}
Should turn on the fan
Im not posting for security
Device Model:
Custom IR device (fan) added to hub
SwitchBotAPI
Using HA to turn on and off bedroom fan