Oke, thanks! I will expand the time.
That will be a nice future!
Oke, thanks! I will expand the time.
I’m trying to connect my switchbot bot directly through Bluetooth, but the homey says it cannot find any devices. It tried trough my phone and the switchbot app, that works. Should I set anything more it switch on discovery somewhere?
Bluetooth has a very short range. Please try to bring the devices close to Homey and start the search again.
I have also had an issue where Homey cached a corrupted version of the advertisement and the only way to solve it was to reboot Homey.
Homey’s BLE implementation ignores devices if it thinks it has already seen it. The identity of a device is passed in a service block, so if that wasn’t received, the app doesn’t recognise it. However the unique id is one of the first things sent and that is what Homey uses to determine if it’s been seen before.
I don’t know how long the cache it kept but I waited well over 24 hours and the bad information was still there.
If anyone is interested I have written an app that can be loaded onto an ESP32 Arduino board. The app implements BLE to communicate with the Switchbot devices and a REST API that talks to Homey. So far it’s working well and is transparent to the user.
The Arduino board I have was £16 from Amazon but I have ordered some cheaper ones to see how well they work.
If you think it could be useful I can publish the code on GitHub but you will need to know how to load it on to the board.
I can make some instructions if there is enough interest.
But also Switchbot have said they might have local access to the Hub by the middle of the year.
Restarted my homey and it found it directly!
Bedankt voor het ontwikkelen van de App. Werkt super!
Thanks to @Ethaniael for providing a ‘fix’ for the BLE caching issue, the app is now much more responsive to updates. I’m just annoyed at myself for not finding his solution earlier.
So a new test version is in the store, which I highly recommend if you are connecting via BLE.
I confirm that since this update the curtains really do work great on BLE.
I did have to move my homey to a more central location within my home to get a better BLE reception to all my curtains.
Since the last update all curtains respond much quicker but more important the position update also work within a few seconds. I am still not sure if it is the real actual position or just the set value which is used as final position…
Sadly for me this fix came 1 day to late, i just ordered (and paid) several aqara door sensors which i wanted to use for checking the position of the curtain motor (if they are in fully open or fully closed position on the rail), i did this trick already with 1 motor and this trick really works great, so i decided to use them on all curtain motors because the actual position tags where incorrect…
But then came suddenly this great update and now the positioning tags works also fine, hahaha
Thanks for the feedback, it’s good to know it’s working better.
Sorry about the timing, I can appreciate the frustration. I spent days making the Arduino app and had just finished it when I found the workaround for Homey. Although for me it wasn’t completely wasted as they still provide the extended range and an even faster response with less load on Homey.
The reported position should be from the Switchbot motor. When you move the slider it sends the move command but then the slider position is updated by feedback from the motor. Hence, if you move the curtains position via an external method (Switchbot app or tugging on the curtains) you should see the slider position also updates.
I am considering the Arduino app, but i have no experience whatsoever with these boards, also no idea how to program them etc…
Programming Is done from the Arduino IDE, which is free from https://www.arduino.cc/en/software. You install the IDE and connect the board to the computer via a USB cable. Then grab my code from Github and put it in a folder on the computer. I have it in C:\Users\Adrian\Documents\Arduino\SwitchBotBLEHub but obviously it can be anywhere you want. Then open the project in the Arduino IDE.
The remaining instruction about boards and libraries to install are on Github but let me know if you get stuck.
Thank you very much for this app!
I’m using the curtains on BLE only.
I had a minimal working version of the app myself, but was having a lot of trouble with the BLE connectivity. Looking at the changelog, clearly so did you.
Have you looked into a way to calibrate the curtains from Homey? I don’t like being dependent on the SwitchBot app for the calibration of the curtains. I captured a bluetooth trace on my Android phone during a calibration, but am having some trouble deciphering the protocol.
I haven’t looked at calibration. I was just concentrating on the ‘every day’ usage.
I’m not sure what your trace looks like so can’t suggest where to look, but I must admit I used codes that were published on SwitchBots GitHub. I haven’t seen any mention of other codes.
If you want to send me the trace I will see if it makes any sense to me.