OpenWonderLabs / python-host

The python code running on Raspberry Pi or other Linux based boards to control SwitchBot.
Apache License 2.0
379 stars 84 forks source link

Scan fails for Switchbots Meters "No Switchbots found" - Firmware 2.5 #16

Closed ronschaeffer closed 4 years ago

ronschaeffer commented 4 years ago

I have two Meters with firmware 2.5. Although the Switchbot app works well, the API and Linux tools fail to see the Meters.

sudo python3 switchbot_py3.py --scan

results in

No Switchbots found

Also I cannot see info from the Meters BLE advertisements using, for example, hcitool lescan. The meters show up in the hcitoolscanned devices list with just the MAC but no name like so:

F4:CC:5A:AF:7E:B5 (unknown)

Similarly only the MAC is known when scanning with nRF from an Android phone.

I suspect that it may have something to do with a firmware change from 2.4 to 2.5. My meters were 2.5 out of the box. I've spoken to others online using 2.4 for whom the API, Linux tools, nRF, etc. work with no problem.

On its face, the issue looks similar to this https://github.com/OpenWonderLabs/python-host/issues/13, which was closed but not really resolved.

Is anyone else experiencing the same? Any tips?

Thanks.

ronschaeffer commented 4 years ago

Does anyone have this working with firmware 2.5 on a Meter?

ronschaeffer commented 4 years ago

Thank you, @SwitchBot, for addressing the issue with Switchbot Meters. I can confirm that the new switchbot_meter_py3.py works for me with Python 3. I have not tested with Python 2.

In addition to the existing documentation, an addition module pexpect needs to be installed as a prerequisite using:

sudo pip3 install pexpect