# \[APP\]\[Cloud & Pro\] SwitchBot (Release 2.0.87, Test 2.0.96)

**URL:** <https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296>\
**Category:** Apps\
**Tags:** app\
**Created:** [February 2, 2021, 7:31pm UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296 "2021-02-02T19:31:36Z")\
**Posts on this page:** 20\
**Page:** 77

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [December 12, 2024, 10:51pm UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1526 "2024-12-12T22:51:33Z")

</div>

> [@Sander\_Jacobsen](#):
>
> Could I control those too?

In theory you could, but that wouldn’t be very neighbourly 🙂 That is one of the downsides of the BLE method used by SwitchBot.  
With the Bots, you can set a password to prevent that, but not with the other devices (except the door locks which are not connectable via the BLE of the app).

---

<div class="post-metadata">

**Author:** ![Bernd\_Gaykema](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bernd_gaykema/32/112153_2.png) [@Bernd\_Gaykema](https://community.homey.app/u/Bernd_Gaykema)\
**Post date:** [December 13, 2024, 4:55pm UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1527 "2024-12-13T16:55:02Z")

</div>

Mmm, I have version 2.5 in my ESP32 and it looks like that an old problem returned …  
Today I had the curtains closed all day. No communication between Homey Pro and the Curtains.  
I pulled the power from the ESP32 and reconnected it: communication returns, full control over the SwitchBot curtain devices.

I will wait and see when it happens again.

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [December 15, 2024, 4:10pm UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1528 "2024-12-15T16:10:03Z")

</div>

I checked the Serial Monitor output in the Arduino IDE of the ESP32 board when opening and closing the curtains.

While it is closing/opening I can see the board is sending updates on position, battery and rssi, to my Homey. Each time the POST response code is reported as 200 / OK. But, as indicated, the SwitchBot app on my Homey reports an invalid response code 500 and does not process the updates.

```auto
Connecting to http://10.0.0.225:80/api/app/com.switchbot/newData/ to send [{"hubMAC":"18:ac:1f:76:ef:d0","address":"C5:BD:1D:AB:C0:E1","rssi":-56,"serviceData":{"model":"{","modelName":"WoCurtain3","calibration":true,"battery":61,"position":26,"lightLevel":1}}]
[HTTP] POST response code: 200
Connecting to http://10.0.0.225:80/api/app/com.switchbot/newData/ to send [{"hubMAC":"18:ac:1f:76:ef:d0","address":"C5:BD:1D:AB:C0:E1","rssi":-50,"serviceData":{"model":"{","modelName":"WoCurtain3","calibration":true,"battery":61,"position":37,"lightLevel":1}}]
[HTTP] POST response code: 200
Connecting to http://10.0.0.225:80/api/app/com.switchbot/newData/ to send [{"hubMAC":"18:ac:1f:76:ef:d0","address":"C5:BD:1D:AB:C0:E1","rssi":-49,"serviceData":{"model":"{","modelName":"WoCurtain3","calibration":true,"battery":61,"position":47,"lightLevel":1}}]

```

Might this be an issue in the SwitchBot app for Homey; not an issue with the ESP32 BLE hub code?

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [December 16, 2024, 12:12am UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1529 "2024-12-16T00:12:29Z")

</div>

The ESP32 broadcast it’s presence once a minute and when Homey detects that it sends a message to the ESP32 with a call back URL that is used to publish data changes, and that is the bit that gets the response code 500 (internal server error).  
I can’t see why that happens and I can’t reproduce it.  
Maybe try reprograming the ESP32 as I am not sure what else to suggest.

---

<div class="post-metadata">

**Author:** ![Vnet](https://avatars.discourse-cdn.com/v4/letter/v/d78d45/32.png) [@Vnet](https://community.homey.app/u/Vnet)\
**Post date:** [December 16, 2024, 8:30am UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1530 "2024-12-16T08:30:19Z")

</div>

Hi Adrian. This morning, all the SB sensor devices showed ‘190: requests reached the daily limit (5013) API calls’ and one of them, a door sensor, showed ‘forbidden’. there is no difference when i restartt the app on th epro, or if i want to include the device again, it remains forbidden. Somehow during the early morning many API calls happened. could that be retries ?. Actually, it would be fine if i can switch off polling, and only rely on the Webhook triggers coming from the device(es).Somehow i have the feeling that this all is caused by the door sensor, before i had these, i never had this issue

---

<div class="post-metadata">

**Author:** ![Peter\_Prendal](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_prendal/32/74994_2.png) [@Peter\_Prendal](https://community.homey.app/u/Peter_Prendal)\
**Post date:** [December 16, 2024, 9:08am UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1531 "2024-12-16T09:08:26Z")

</div>

I have a similar problem, my curtain controllers say forbidden, and in the log it says 1682 API calls. Is there a problem somewhere?

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [December 16, 2024, 9:18am UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1532 "2024-12-16T09:18:09Z")

</div>

It seems there is an issue on the SwitchBot server and everyone is getting Forbidden errors.  
I have reported it to my contact at SwitchBot

---

<div class="post-metadata">

**Author:** ![Vnet](https://avatars.discourse-cdn.com/v4/letter/v/d78d45/32.png) [@Vnet](https://community.homey.app/u/Vnet)\
**Post date:** [December 16, 2024, 11:11am UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1533 "2024-12-16T11:11:53Z")

</div>

Ah ok! I also opened a ticket with them. Again, its not your beautiful designed app 👍

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [December 16, 2024, 3:01pm UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1534 "2024-12-16T15:01:36Z")

</div>

Thanks for checking @Adrian_Rockall. I understand that the issue is difficult to pinpoint if you cannot reproduce it.

Unfortunately re-flashing the ESP32 board dit not solve the issue. I also deleted the device and SwitchBot app from Homey, restarted Homey and installed the app/paired the curtain motor again, but that did not help.

I am just wondering whether the following in the SwitchBot app might cause the issue. I have very little knowledge of JavaScript, so bear with me…

If I am correct:

- The device’s `syncBLEEvents` function plays a role in processing status-updates from the curtain motor.
- The device code used for my Curtain 3 is in curtains\_ble \> device.js
- The `syncBLEEvents` function in this device.js checks for ‘WoCurtain’ as model name before processing the received data.
- My Curtain 3 motor has a different model name: ‘WoCurtain3’.
- Since the model name does not match, the function is not executed further/data is not processed.

 ![SyncBLEEvents](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/a/8a99f9c7b2c4f25f2315d367463eb08db4e250ff.png)

---

<div class="post-metadata">

**Author:** ![Vnet](https://avatars.discourse-cdn.com/v4/letter/v/d78d45/32.png) [@Vnet](https://community.homey.app/u/Vnet)\
**Post date:** [December 16, 2024, 6:59pm UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1535 "2024-12-16T18:59:41Z")

</div>

There seems to be a general sb api problem. Homeassistant sb-cloud integration also stopped

“  
There seems to be a general issue with SwitchBot API: [OpenWonderLabs/SwitchBotAPI#374](https://github.com/OpenWonderLabs/SwitchBotAPI/issues/374). Changing the hostname to [api.switchbot.net](http://api.switchbot.net) seems to workaround the issue (confirmed by manually hitting the API). As the integration completely stopped working (seemingly for all users) and SwitchBot support does not seem to react on this issue so far, would that be a good idea to add a fallback to the second hostname?

Update: maybe it is not a good idea, as it could theoretically be an attack to gather the access tokens. I personally could not get a confirmation, that this domain is owned by SwitchBot.  
“

---

<div class="post-metadata">

**Author:** ![Ranney](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@Ranney](https://community.homey.app/u/Ranney)\
**Post date:** [December 16, 2024, 7:54pm UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1536 "2024-12-16T19:54:34Z")

</div>

Here also ‘forbidden’ errors. Even after ‘repairing’ a device and logging in again. Interesting part is that all hub devices are still updating there ‘curtain position’.

---

<div class="post-metadata">

**Author:** ![Vnet](https://avatars.discourse-cdn.com/v4/letter/v/d78d45/32.png) [@Vnet](https://community.homey.app/u/Vnet)\
**Post date:** [December 17, 2024, 5:29am UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1537 "2024-12-17T05:29:52Z")

</div>

Hello everyone, seems that the API service is recovered by now. homeassistant integration seems to work again. On homey i still get ‘forbidden’

Edit: it now works again. No message from sb about this outage.

I moved most of the sensors and curtains to ble now. Sb api is not always available i know by know). Only thing is that i have several hub mini used as ir blaster, they can only be controlled via the sb cloud api.

---

<div class="post-metadata">

**Author:** ![Jurek\_Chlebowski](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jurek_chlebowski/32/111461_2.png) [@Jurek\_Chlebowski](https://community.homey.app/u/Jurek_Chlebowski)\
**Post date:** [December 17, 2024, 5:40am UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1538 "2024-12-17T05:40:36Z")

</div>

I needed to remove and add my bots, they seem to work now. Somehow my subjective feeling is that the response is much faster than b4 the „incident” yesterday…

---

<div class="post-metadata">

**Author:** ![Glenn\_Dijkstra](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/glenn_dijkstra/32/17251_2.png) [@Glenn\_Dijkstra](https://community.homey.app/u/Glenn_Dijkstra)\
**Post date:** [December 17, 2024, 6:20am UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1539 "2024-12-17T06:20:37Z")

</div>

A repair made it work for me again!

---

<div class="post-metadata">

**Author:** ![Mollari](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mollari/32/79511_2.png) [@Mollari](https://community.homey.app/u/Mollari)\
**Post date:** [December 17, 2024, 6:59am UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1540 "2024-12-17T06:59:50Z")

</div>

It just all worked again this morning. Didn’t do anything.

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [December 17, 2024, 7:03am UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1541 "2024-12-17T07:03:38Z")

</div>

It was the same for me.

Apparently, SwitchBot applied an update to the backend that didn’t quite go as planned.

---

<div class="post-metadata">

**Author:** ![Kogel](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kogel/32/4610_2.png) [@Kogel](https://community.homey.app/u/Kogel)\
**Post date:** [December 17, 2024, 11:50am UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1542 "2024-12-17T11:50:51Z")

</div>

hi @Adrian_Rockall This is the reply I got from Swicthbot:

Hi, there

Thank you for reaching out to SwitchBot.  
This is Aurora from the SwitchBot Customer Service Team.

Currently, our SwitchBot Pan/Tilt 2K Plus cameras are only supported for API integration with **Alexa** and **Google Home**. Unfortunately, we do not support API calls for third-party devices, such as Homey, at this time.

We appreciate your understanding, and if you have any further questions or need assistance with Alexa or Google Home integration, feel free to let us know.

---

<div class="post-metadata">

**Author:** ![SunBeech](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sunbeech/32/111391_2.png) [@SunBeech](https://community.homey.app/u/SunBeech)\
**Post date:** [December 17, 2024, 6:49pm UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1543 "2024-12-17T18:49:59Z")

</div>

Hello @Adrian_Rockall,

Sorry for bothering you again on this matter. Hopefully the last time.

I managed to get rid of the ‘Invalid response code: 500’. I used your binaries, which I initially couldn’t flash. But after changing the SPI mode to DIO instead of QIO, my ESP32 was able to boot. Somehow the 500 errors do not pop up in your compiled binary, but do show up when I compile the code myself.

I also learned that the 500 error was a result of the ‘callback/add’ and ‘device/write’ requests by the SwitchBot app. Though the error popped up, the ESP32 actually was transmitting updates to the SwitchBot app. When I compared the logs based on their timeline, I could see the ESP32 sending updates when the curtains moved. And I also saw the same info being received by the SwithBot app (syncEvents messages).

What (still) does not work is the actual processing of received updates by the SwitchBot app on Homey. I believe this is caused by the `syncBLEEvents` function in drivers / curtains\_ble / device.js.

This function checks for ‘WoCurtain’ as model name before processing the received data:

`if (event.address && (event.address.localeCompare(dd.address, 'en', { sensitivity: 'base' }) === 0) && (event.serviceData.modelName === 'WoCurtain'))`

My Curtain 3 motor has a different model name: ‘WoCurtain3’. I assume that since the model name does not match, the received data is not processed.

Could you please verify this?

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [December 17, 2024, 7:49pm UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1544 "2024-12-17T19:49:20Z")

</div>

That would make sense. I will look into it and publish an update.

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [December 17, 2024, 8:06pm UTC](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296/1545 "2024-12-17T20:06:29Z")

</div>

I have publishes a new test version that accepts WoCurtain3 as well.

P.S. Well done for tracking down the issue.

[Previous page](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296.md?page=76)

[Next page](https://community.homey.app/t/app-cloud-pro-switchbot-release-2-0-87-test-2-0-96/42296.md?page=78)
