I installed my lock ultra with the new app. When it was installed i got a “Invalid token”. I used “Try to repair” and put in again my account name and password. Now everything worked again. But after a homey restart or app restart it was broken again. After a few new attempts i got it working again. So it is a try and error.
When it works i indeed can lock, unlock or open the door. That is great.
See log: 28410103-c064-4758-bfe1-9e1fff2fa518
P.S. A friend of mine also has the homey pro and on my advise bought the switchbot lock ultra and this also has the “Invalid token” problem.
Very strange, I can’t replicate that and I have restarted the app many times during dev. I also don’t get the diagnostics reports emailed to me for this app and I can’t see that log ID in the developer website.
Have you tried enabling the developer mode in the Switch phone app as I have seen issues with the door locks when that is not enabled?
Apart from that, I’m not sure how to help on that one.
I did. And then i see a way to get a token. I tryed also this token for the home assistant. There it works, but only lock and open. Not unlock. By my friend we didn’t use the developer mode, but by him it is the same problem. I sent you his logging.
I will investigate, but the API command requires both parameters, so it could be a bug in the API. I know there was a issue where the speed couldn’t be changed unless the mode was also changed, so maybe they fixed that and broke the ability to select the mode.
You are right: I checked the API and it mention, that fanGear=x (speed) is only used if mode=1 (normal). So sending setMode with both should work, if mode=3 (sleep).
I checked it with all modes (using the SwitchBot app for getting the mode and run advanced flow from webgui side by side): air purifier will switch on and is using mode=1 every time.
Oke I used now the merged version file and could setup my wifi network.
I just placed the ESP32 somewhere on the first floor, Homey is located in the middle of the ground floor and the ESP32 in the middle of the 1st, this setup should cover now the whole house.. Or should I use also a second ESP32 on the ground floor aswell?!
I already had all my switchbot devices connected via BLE, I used the ESP32 (i had 1 spare) just to improve the BLE range of Homey for my curtains.
How can I check if the ESP32 actually works or not?! Is there somewhere a log to view how BLE trafic is routed?!
You can look in the app settings page and there is a diagnostics log that should show the traffic. You can also point a browser at the ESP32 address and there’s an option to view the devices it has found.
oke found it.
But it seems that all 8 switchbot curtains are found by this ESP32 device, which is placed on the 1st floor.
Does this mean that my Homey (on ground floor) is NOT connected anymore directly to these devices at all?!!
4 curtain motors are on the ground floor, aprox 3 meters from Homey…
4 other motors are located on the first floor, where the ESP32 is placed, all also aprox 3/4 meters from the ESP32.
Is is for me not ‘logical’ that 8 motors are connected to the ESP on first floor, the motors on ground floor should be connected to Homey directly, the motors on the 1st floor to the ESP32
Is it possible to add a second ESP32 (on ground floor) to this setup and is this adviseble?
The ESP32 has a much better range than Homey and also responds much faster, so the app will probably get the notifications from that first. It will send commands via whichever device has the strongest signal, so again probably the ESP32.
You can add more ESP32 modules if required and it will work fine.
I have the same experience with the ESP32 devices. They overclass the BLE “performance” from Homey many, many times.
Without this superb performance I had given up on SwitchBot.
I have 2 ESP32 running (and working) for a few days now, but i cannot say that it is a big improvement.
The switchbot hub response a lot quicker…
When i close a curtain via the hub is has a delay of 1 or 2 seconds before it responds, when I use the BLE connection it take somewhere around 5 seconds before the curtain respond.
The curtain is connected (and detected on both ESP32s) via one or both ESPs…
Maybe the range is better, but sadly I cannot confim that the respond is better then the HUB, I even think that it was quicker directly via BLE of Homey, but not sure about that…