Closed hwangjr closed 4 years ago
Same thing happened to me, scan always timed out. But when I specified BLE MAC and a command it worked, like so:
sudo python python-host/switchbot.py C6:F2:0E:A1:86:70 Turn On sudo python python-host/switchbot.py C6:F2:0E:A1:86:70 Turn Off sudo python python-host/switchbot.py C6:F2:0E:A1:86:70 Up sudo python python-host/switchbot.py C6:F2:0E:A1:86:70 Down sudo python python-host/switchbot.py C6:F2:0E:A1:86:70 Press
@thepiam yep, but I can't get the address without scanning the device. (except connect to the phone to get the address first)
I believe this is due to a firmware update on the switchbot. Someone should see if they can update it to work with the new firmware. I might if I end up buying one
seems no one care about this. I already buy 10+ SwitchBots...
@SwitchBot any progress for this issue?
@hwangjr What firmware version do your bots have? (you can find the information with the official app)
You can try my api which relies on another python ble library: https://github.com/nicolas-kuechler/switchbot
After setting up the python environment as described in the readme, the code below (must be run with sudo) should find the switchbots:
from switchbot import Scanner
scanner = Scanner()
mac_addresses = scanner.scan(known_dict={})
My code is tested with firmware version 4.5 and a raspberry pi 3.
@nicolas-kuechler ok, I will have a try. thx
I run the script:
Raspberry Pi 4 with Bluetooth 5.5. SwitchBot S1, FCC ID:2AKXBS1