SwitchBot gets an open API!

I have been pushing the On and Off buttons.
What is status code:160, No this command?:thinking:

Partial success, I can turn my TV on and off using HE, my receiver doesn't respond to HE on/off commands, yet both work flawlessly using the Switchbot app. The receiver remote has separate buttons for on and off while the TV button is an on/off toggle.

Looking at the Switchbot app logs for the receiver, it shows
Turned On API
Failed to execute, try again.

For the TV, it shows
Power API
Ran successfully

I think I know the problem, the receiver is device type "other" and that isn't supported by third party apps or the API.

Sorry to trouble you with this TomW, I learned something today!

1 Like

@tomw
Curious on these log entries. I have been getting them the last few days on my tilts.
Is this a Switchbot end problem?

dev:21182024-01-24 00:30:27.416errorgroovyx.net.http.HttpResponseException: status code: 500, reason phrase: Internal Server Error on line 523 (method readDeviceStatus)

dev:21182024-01-23 17:30:08.150errorgroovyx.net.http.HttpResponseException: status code: 500, reason phrase: Internal Server Error on line 523 (method readDeviceStatus)

dev:21182024-01-21 10:33:12.207errorgroovyx.net.http.HttpResponseException: status code: 500, reason phrase: Internal Server Error on line 523 (method readDeviceStatus)

I've got the child device for curtains installed but it's not creating a child device for my curtain device.

Currently using the latest hub2 and curtain3

Relevant part of Json response:
deviceList=[{deviceType=Curtain3, hubDeviceId=, calibrate=true, openDirection=left, deviceId=DD3217E36DD8, deviceName=Curtain, enableCloudService=false, master=true}

Logs don't show anything relevant. Meter child device (from the hub itself) gets created though.

Any ideas?

According to that GitHub issue report, it is now fixed:

All 3 of my curtains show up in the state variable json, but only the curtain2 "deck curtain" shows up as a child device.

I do have my two Curtain 3s "grouped" and both Mac address are listed (as curtainDeviceIds]".

{deviceType=Curtain, hubDeviceId=C0169E74A662, calibrate=true, openDirection=left, curtainDevicesIds=[C28FD8521BCC], deviceId=C28FD8521BCC, deviceName=Deck curtain, enableCloudService=true, group=false, master=true}, {hubDeviceId=000000000000, calibrate=true, openDirection=right, curtainDevicesIds=[EC5D6ACF8D28, D82A50085937], deviceId=D82A50085937, deviceName=Left curtain, group=true, master=false},

Not sure why they (or it as a group?) is not showing up as a child device.

@tomw same issue here

I added a change to my SwitchBot System driver to incorporate their fix. Curtain3 devices should work properly now.

I didn't bump the version for this bugfix, so just use the HPM "Repair" feature to pick up the change.

2 Likes

Fixed! Thanks!

I may have spoken too soon. Control are not going through.

Worked for me!

After doing the app repair and hitting the reinitialize button and create children button in the parent device, my two Curtain 3's showed up as children devices.

For some reason, it took a few tries hitting a combo of open/close/refresh buttons in the Curtain 3 device controls in Hubitat, followed by commanding them by the native Switchbot app, then again through Hubitat a couple times before it finally worked. I don't know if it's the combo of commands between Hubitat and Switchbot app that made it eventually work in Hubitat, or if it was just that some time had to pass before it worked.

Thanks @tomw!

I enabled cloud services in switchbot and it’s working now.

1 Like

@tomw
I get a lot of errors and I assume they are from the sometimes spotty responses I get from the BLE connection (logs) to the Tilt blinds. I moved the hub closer and it seemed to fix it for a bit but now they're back. Can you catch these errors and move to a debug level reporting status so they don't clog up the logs?
Obviously an if you can, when you can, or never. :slight_smile:

dev:21182024-02-12 02:16:27.658errorgroovyx.net.http.HttpResponseException: status code: 500, reason phrase: Internal Server Error on line 516 (method readDeviceStatus)

dev:21182024-02-11 14:00:02.047errorgroovyx.net.http.HttpResponseException: status code: 500, reason phrase: Internal Server Error on line 544 (method writeDeviceCommand)

[dev:2118]2024-01-24 00:30:27.416[errorgroovyx.net.http.HttpResponseException: status code: 500, reason phrase: Internal Server Error on line 523 (method readDeviceStatus)