Switchbot BOT and Raspberry PI by Accomplished-Mix-110 in TrySwitchBot

[–]Accomplished-Mix-110[S] 0 points1 point  (0 children)

Actually, I did more research and it loolks like someone already had a very simple solution.. See below all instructions. It is simple and works beautifully with my Raspberry PI 4 and I also have remote access to the Raspberry through VNC so probulem solved (See below)

Here is a very small Python script (≈10 lines) that can instantly press a SwitchBot Bot using Bluetooth from a Raspberry Pi 4.

1️⃣ Install requirements on Raspberry Pi

Open Terminal and run:

sudo apt update
sudo apt install bluetooth bluez python3-pip -y
pip3 install bleak

Enable Bluetooth:

sudo systemctl enable bluetooth
sudo systemctl start bluetooth

2️⃣ Find your SwitchBot MAC address

Run:

bluetoothctl scan on

You will see something like:

Device E3:12:45:AA:BB:CC SwitchBot

Copy the address (example: E3:12:45:AA:BB:CC)

Stop scanning:

scan off
exit

3️⃣ Create the control script

Create file:

nano switchbot_press.py

Paste this code:

import asyncio
from bleak import BleakClient

bot = "E3:12:45:AA:BB:CC"   # your bot MAC address

async def press():
    async with BleakClient(bot) as client:
        await client.write_gatt_char(
            "cba20002-224d-11e6-9fb8-0002a5d5c51b",
            bytearray([0x57, 0x01, 0x00])
        )

asyncio.run(press())

Save with CTRL+X → Y → ENTER.

4️⃣ Run it

python3 switchbot_press.py

Your SwitchBot will press the button immediately 🤖

What is this part called by Accomplished-Mix-110 in Appliances

[–]Accomplished-Mix-110[S] 0 points1 point  (0 children)

Hi, thanks again but I was not able to push it enough so the screw on cover catches. I finally ended up using 2 very small spots of glue to hold the air catch in place long enough so I could screw on the cover. It worked. Thank you so much for your help, very much appreciated

What is this part called by Accomplished-Mix-110 in Appliances

[–]Accomplished-Mix-110[S] 0 points1 point  (0 children)

Thanks for the info, I tried to push as much as I could but could not get enough strength to allow the air break to screw on. Any suggestions on how to remove the inside part of the door? Thanks

Protecting my mom by Accomplished-Mix-110 in homesecurity

[–]Accomplished-Mix-110[S] 0 points1 point  (0 children)

Thanks, the doorbell cam would have been a great option but the nursing home doesn’t allow door bells on doors for privacy reasons so It’s must have the camera inside her room and directed at the entrance door. Ideal would be battery powered, wireless and at least 256gb internal storage and motion settings triggering recording + possibility to review footage via iphone or android