[APP][Cloud & Pro] SwitchBot (Release 1.1.51, Test 1.1.56)

So, basically that’s just saying you / I would need to add the line: #include "esp_private/esp_int_wdt.h" to the code. You might find just putting that before the include line for the #include "AsyncElegantOTA" might fix the issue.

for sad - does not work.

It throws the following error:

/Users/dominic/Documents/Arduino/libraries/AsyncElegantOTA/src/AsyncElegantOTA.h:18:14: fatal error: esp_int_wdt.h: No such file or directory
   18 |     #include "esp_int_wdt.h"

OK, so you will need to include the full "esp_private/esp_int_wdt.h" in that #include. so locate the file and modify the line.

Edit: I am going out now, so I will try to take a look later.

Thank you! To be honest for the moment i just do not really know where to change…

I have updated the repo and the instructions to replace the obsolete library.

Hello
related to switchbot lock pro i would like to know if there is a possibility only to unlock the door without opening.
In the app i can always choose between the two options → unlock and opening.

In the homey app i can only open the door which is not always wished.

Thanks a lot for feedback

Hey, @Adrian_Rockall.

Tried your new code - but a new error occurs:

/private/var/folders/w7/m3lx_0ns3tz2sg05tl50yhtc0000gn/T/.arduinoIDE-unsaved2024614-5575-s3poa8.u47j8/sketch_jul14a/SwitchBotBLEHub.ino:58:6: error: variable or field 'handleRoot' declared void
   58 | void handleRoot( AsyncWebServerRequest* request )
      |      ^~~~~~~~~~
/private/var/folders/w7/m3lx_0ns3tz2sg05tl50yhtc0000gn/T/.arduinoIDE-unsaved2024614-5575-s3poa8.u47j8/sketch_jul14a/SwitchBotBLEHub.ino:58:18: error: 'AsyncWebServerRequest' was not declared in this scope
   58 | void handleRoot( AsyncWebServerRequest* request )
      |                  ^~~~~~~~~~~~~~~~~~~~~
/private/var/folders/w7/m3lx_0ns3tz2sg05tl50yhtc0000gn/T/.arduinoIDE-unsaved2024614-5575-s3poa8.u47j8/sketch_jul14a/SwitchBotBLEHub.ino:58:41: error: 'request' was not declared in this scope
   58 | void handleRoot( AsyncWebServerRequest* request )
      |                                         ^~~~~~~
/private/var/folders/w7/m3lx_0ns3tz2sg05tl50yhtc0000gn/T/.arduinoIDE-unsaved2024614-5575-s3poa8.u47j8/sketch_jul14a/SwitchBotBLEHub.ino:65:6: error: variable or field 'handleNotFound' declared void
   65 | void handleNotFound( AsyncWebServerRequest* request )
      |      ^~~~~~~~~~~~~~
/private/var/folders/w7/m3lx_0ns3tz2sg05tl50yhtc0000gn/T/.arduinoIDE-unsaved2024614-5575-s3poa8.u47j8/sketch_jul14a/SwitchBotBLEHub.ino:65:22: error: 'AsyncWebServerRequest' was not declared in this scope
   65 | void handleNotFound( AsyncWebServerRequest* request )
      |                      ^~~~~~~~~~~~~~~~~~~~~
/private/var/folders/w7/m3lx_0ns3tz2sg05tl50yhtc0000gn/T/.arduinoIDE-unsaved2024614-5575-s3poa8.u47j8/sketch_jul14a/SwitchBotBLEHub.ino:65:45: error: 'request' was not declared in this scope
   65 | void handleNotFound( AsyncWebServerRequest* request )
      |                                             ^~~~~~~
/private/var/folders/w7/m3lx_0ns3tz2sg05tl50yhtc0000gn/T/.arduinoIDE-unsaved2024614-5575-s3poa8.u47j8/sketch_jul14a/SwitchBotBLEHub.ino:472:6: error: variable or field 'WriteToBLEDevice' declared void
  472 | void WriteToBLEDevice( BLE_COMMAND* BLECommand )
      |      ^~~~~~~~~~~~~~~~
/private/var/folders/w7/m3lx_0ns3tz2sg05tl50yhtc0000gn/T/.arduinoIDE-unsaved2024614-5575-s3poa8.u47j8/sketch_jul14a/SwitchBotBLEHub.ino:472:24: error: 'BLE_COMMAND' was not declared in this scope
  472 | void WriteToBLEDevice( BLE_COMMAND* BLECommand )
      |                        ^~~~~~~~~~~
/private/var/folders/w7/m3lx_0ns3tz2sg05tl50yhtc0000gn/T/.arduinoIDE-unsaved2024614-5575-s3poa8.u47j8/sketch_jul14a/SwitchBotBLEHub.ino:472:37: error: 'BLECommand' was not declared in this scope
  472 | void WriteToBLEDevice( BLE_COMMAND* BLECommand )
      |                                     ^~~~~~~~~~
/private/var/folders/w7/m3lx_0ns3tz2sg05tl50yhtc0000gn/T/.arduinoIDE-unsaved2024614-5575-s3poa8.u47j8/sketch_jul14a/SwitchBotBLEHub.ino:163:6: error: redefinition of 'void setup()'
  163 | void setup()
      |      ^~~~~
/private/var/folders/w7/m3lx_0ns3tz2sg05tl50yhtc0000gn/T/.arduinoIDE-unsaved2024614-5575-s3poa8.u47j8/sketch_jul14a/sketch_jul14a.ino:1:6: note: 'void setup()' previously defined here
    1 | void setup() {
      |      ^~~~~
/private/var/folders/w7/m3lx_0ns3tz2sg05tl50yhtc0000gn/T/.arduinoIDE-unsaved2024614-5575-s3poa8.u47j8/sketch_jul14a/SwitchBotBLEHub.ino:376:6: error: redefinition of 'void loop()'
  376 | void loop()
      |      ^~~~
/private/var/folders/w7/m3lx_0ns3tz2sg05tl50yhtc0000gn/T/.arduinoIDE-unsaved2024614-5575-s3poa8.u47j8/sketch_jul14a/sketch_jul14a.ino:6:6: note: 'void loop()' previously defined here
    6 | void loop() {
      |      ^~~~
/private/var/folders/w7/m3lx_0ns3tz2sg05tl50yhtc0000gn/T/.arduinoIDE-unsaved2024614-5575-s3poa8.u47j8/sketch_jul14a/SwitchBotBLEHub.ino: In function 'void loop()':
/private/var/folders/w7/m3lx_0ns3tz2sg05tl50yhtc0000gn/T/.arduinoIDE-unsaved2024614-5575-s3poa8.u47j8/sketch_jul14a/SwitchBotBLEHub.ino:393:13: error: 'WriteToBLEDevice' was not declared in this scope; did you mean 'NimBLEDevice'?
  393 |             WriteToBLEDevice( &BLECommand );
      |             ^~~~~~~~~~~~~~~~
      |             NimBLEDevice

exit status 1

Compilation error: variable or field 'handleRoot' declared void

Did you edit the file to change the #define as shown in the new instructions?

You mean this:

change the line ' #define ELEGANTOTA_USE_ASYNC_WEBSERVER 0' to '#define ELEGANTOTA_USE_ASYNC_WEBSERVER 1'

yes I changed this - result is the error message in previous post.

Edit: added formatting

Did you install the packages in step 7 as it seems there is an issue with the ESPAsyncWebServer?

I have published a new test version that supports the water leak detector, but it only has the alarm and battery status.

The API doesn’t have nay way to silence the alarm, etc.

I´ll have a look this evening!

I have added instruction to program the device with a bin file via the Flash Download Tool.
If you still have issues getting the Arduino IDE to work then you could try that.

1 Like

Hi Adrian,

I tried the ArduinoIDE-way without access.

Now I will give the bin file a try. For now just looking for a flash tool to use with Mac OS :wink:

Hi Adrian,

For a little over a week, I’ve been having some issues with my Switchbot V2 curtains, local BLE setup, without hub, etc. From one moment to the next they didn’t work anymore from the Homey app (or flows), but work perfectly fine from the Switchbot iOS app.

Tonight I dug into it a bit deeper and noticed that the status of the curtains is returned (also in the log file I’ve just sent), but I’m unable to control the curtains. I’m using the ESP32 as well, but with and without the ESP connected I get a Network Request Timeout. Is there anything I’m missing? Any good tips, or ideas of what to try?

  • Restarted the app
  • Updated the 1.5.1 to 1.5.6 (test version) - same result

Just noticed a “response: No OAuth2 Client Found” - Thats from a not connected hub (used to control the TV), curtains are on BLE

Thanks :+1:

Are you using the latest version of the ESP code?
I seem to remember at some point there was an issue with a case sensitive compare so the “fd:56:45:33:83:94” didn’t match “FD:56:45:33:83:94” and Homey changed from using lower case to upper case for the address. The lates code uses a case insensitive compare function to overcome the differences between Homey’s.

1 Like

Thanks, don’t know when the latest version is released, my ESP has been running for over 6 months now, so probably have to update it. Will give that a try tomorrow :+1:

Would it make sense that the status is still being updated, if I’m not running on the latest version?

Yes, the change was so the ESP32 could find the match to send the command.

1 Like

Hey Adrian,

could you please give me a hint what this parameter does:

Set the value of the right hand field to 0x0

(Step 8)

It defines the start address where the code should be loaded