[APP][Cloud & Pro] SwitchBot (Release 1.1.43, Test 1.1.48)

OK, so your problem is likely to be completely different as it is using a different technology. Could you PM the Diagnostics log. That is the one in the Configure App section. You will need to enable it first and then try to operate the curtains from the app. Give it a minute and then go back to the log page, copy it and send it to me. Hopefully I can see why it is not working.

1 Like

Let me do it tomorrow, when i’m home. Now i only see this, but Swichbot is not moving:

And lot of polling interval…

The log is showing that the commands have been sent to SwitchBot and been accepted. So after that it is out of my control.
Are all of your devices broken or just one?
Have to tried restarting the SwitchBot hub?

Let me try to restart the Switchbot hub. All of my device is broken.

Update: the hub restart is fixed the problem, now working! :slight_smile: Thx.

1 Like

today it happened again, but now NONE of the 6 curtains are moving when using BLE.

Restart of the APP itself has no effect, i did not yet restart Homey again… I do hope this is not getting a daily routine

So like @Adrian_Rockall said: the problem most likely isn’t with the app, but with Homey. BLE on Homey has always had issues and I don’t think it has had a lot of work done on it for a while now.

I just report it, but there are no changes done at homey firmware the last few days.
So how can homey/athom be doing something what is causing this suddenly, it worked fine for weeks and now suddenly in a few days times it started to fail…
Adrian mentioned indeed that athom was maybe working on BLE issue, but how? I run no beta version of homey and had no updates recently of any firmware update, it seems more a local problem, i believe BLE is not using the athom cloud at all but run 100% local, so what is changed that is causing these problems?

I now have to add the HUB version also Homey and create flows to check if curtains are opened/closed, if not that do it again using the HUB device.
Sadly the HUB device does not report any battery or position state back, otherwise i used 100% the hub option…

edit: just rebooted Homey and all motors are responding again using BLE connection…

I think the issue is with the way Homey caches BLE data. I have a ‘fix’ in the code that tries to clear the cached data for the devices in the SwitchBot app but I think there is something else occuring with the BLE stack in Homey. Once the BLE stack is broken, it requires a restart of Homey to reset it.

I’m currently tidying up the logging feature so it will hopefully show at what stage the problem is occuring.

1 Like

OK, hope you find something and hopefully athom start fixing this BLE issue.

But is there no work around to get the hub send position (most important) and battery info as well?
The main reason i use the BLE is for the position reporting and battery status, sadly both those issues are not available when using the HUB device, the hub device still works when BLE fails.
Strange enough it seems that the BLE device still displays the correct battery and position usage but the motor does not respond anymore, it gives a network timeout.

The hub does get the position but due to the rate limit imposed by SwitchBot it can take several minutes to get the data. The default polling interval is set to 87 seconds. This is the minimum interval for one included hub device. If you include more then you have to multiply 87 by the number of devices to work out the minimum time. The app does do this automatically to ensure the rate limit is not exceeded.

The battery information is not available in the hub API so nothing I can do about that.

Hopefully, SwitchBot will publish their local API sometime this year which should improve things.

I have published a new test version with muti-level logging.
Could you install that SwitchBot | Homey

If it goes wrong again, can you copy the log and send it to me in a PM.

@Adrian_Rockall in the meantime Homey already automatically updated itself to this new (beta/test) version, so it is installed :slight_smile:

When it happens i will contact you, but i hope it is not necessary :slight_smile:

1 Like

@Adrian_Rockall
Dunno if it is important, but when i now open the switchbot settings ik get an error popup with: Cannot read property ‘toString’ of null message.
When i press OK the log is full with:
timestamp !!! parsed Curtain BLE: No service data lines.

Not sure if this is normal…

If you change the log level it should fix the error popup. I can see why that us happening and is not related to the message in the log.

Those messages in the log are not unexpected as that is one of the issues with the BLE, especially if the device is close to the limit of the range. It basically means that the BLE data is incomplete.

If you set the log level to Basic then you should see if the data is receiving at some point.

Today it happened again now with more then 1 motor.

I did not reset anything yet, what should i do i exactly now to send you a log?

If you can copy the contents of the log and paste into a PM to me (assuming it is switched on).
If it’s not on can you turn it on or set it to Detailed Information, then try to control a device, then come back to the log window and copy / paste into a PM.

I’m not sure if you have seen that Athom have released Homey v6 as a release candidate which has had a big update of the BLE stack. The latest test version of my app has support for that while still working with v5.

i send you a PM.

I do also have a feature request.
Is it possible to show the position value in the app, now it shows rsi and battery, i would like the position value also direct visible at device as well, the slider is not always clearly to understand.

That shouldn’t be a problem. I asked Athom a long time ago for the actual value to be shown with the slider but it fell on deaf ears.

Hi @Adrian_Rockall,
First of all, thank you very much for all your help. Athom/homey is nowhere without developers like you :pray:.

I have read quite a bit, but I’m not technical at all so I still have a couple of questions (eager to learn more every day though).

  • the polling interval is the reaction time between the signal and the actual movement right? With a maximum of 1000 checks per day.
  • I use currently use the switchbot mini, but connecting them directly to homey is no problem as well. Will it affect the polling interval when I connect it directly to homey?
  • I read V6 has some BLE fixes. Will that fix the polling interval thingy/response time or are we still waiting on switchbot?

If V6 doesn’t fix it and we rely on switchbot, I ll send them a message as well, the more we push, the more priority we might get.

I ll also try out the 16€ Amazon device then.

Thank you very much once again.

2 Likes

It defines the maximum time it takes to detect a change. You might be lucky and check just after a change.
For control it should be immediate as the command is sent straight away. So if you just use Homey then everything will be in sync.
If you use the phone app or a remote to control the device then it could take Homey a while to catch up and show the correct state.

Connecting directly won’t effect the polling but you end up with two devices in Homey for each physical device.

The BLE fixes should improve the reliability and speed. The BLE polling is fixed at 30 seconds as the only limits are with Homey. But again, this is for reading the status. Sending commands is done straight away but it takes time to connect and send so that could be anything from a few milliseconds to a few minutes.

I use these as Homey doesn’t have the range to reach my devices. The app doesn’t need to poll these as they send changes to Homey immediately and are very fast. Controlling devices still takes a few seconds as that is the nature of Bluetooth.

I hope that hasn’t been too confusing.