Support for SwitchBot Curtain 3

I’m no expert and could be wrong.

I have a similar setup to you - HA box all the way over the other end of the house and a BT proxy in the bedroom and one downstairs in my Kitchen. Initially the bedroom was also doing Other things and the signal kept jumping from -70 to -40. In the end I put a dedicated BLE proxy in the bedroom on the other side to the other one, turned off the other BLE proxies for 10 mins and now the signal is a steady -48 in both.

They respond after about a second to voice or my zigbee button i use.

Hope this helps.

1 Like

It does, thank you for confirming! Now I just have to kick myself for spending hours converting my existing 8266 board and entities over to ESP32s in an attempt to consolidate. Oh well, 1.5 BLE proxies wont be a bad thing.

1 Like

Hey @the-ress! Don’t want to pressure you, but I was wondering if the plan to implement quiet mode still stands?

I’m finding myself opening all my curtains in the mornings via the app despite having everything in Home Assistant. Most of the family is asleep and I can’t have them opening with the loud mode and wake everyone :sweat_smile:

I’m wondering if there’s a workaround? Somehow trigger switchbot API directly from home assistant? Any hints would be appreciated.

1 Like

Hi, yes. I’ve been a bit busy with other stuff, but it’s pretty much at the top of my hobby-priority-list now. Actually today I finally managed to find the right commands to move either one or both curtains at specified speed.

I can’t think of any good workaround now.

2 Likes

Much appreciated! :pray:

If you have something, perhaps you can open a WIP pull / branch and some of us can try to crowdsource a good approach?

3 Likes

Thanks for your efforts! Are there any updates on this topic? Just got the curtain drivers and silent mode in homeassistant would be very helpful.

2 Likes

For those who only need slow speed (or prefer it like me), you can modify this in your Home Assistant instance. Thanks to @the-ress’ fork/posts I figured what to change in the file /homeassistant/deps/lib/python3.11/site-packages/switchbot/devices/curtain.py (path may differ between versions; find with find / -name 'curtain.py') to have a little workaround (replace ff with 01):

OPEN_KEYS = [
    f"{REQ_HEADER}{CURTAIN_COMMAND}010100",
    f"{REQ_HEADER}{CURTAIN_COMMAND}050100",
]
CLOSE_KEYS = [
    f"{REQ_HEADER}{CURTAIN_COMMAND}010164",
    f"{REQ_HEADER}{CURTAIN_COMMAND}050164",
]
POSITION_KEYS = [
    f"{REQ_HEADER}{CURTAIN_COMMAND}0101",
    f"{REQ_HEADER}{CURTAIN_COMMAND}0501",
]  # +actual_position

Any command to the bots by home assistant will use slow mode, pulling the curtain by hand or using switchbot app will still be in fast speed.

@the-ress Regarding the workaround for having slow and fast speed I think your suggested solution to have two curtain entities, one for each speed, will be the most cleanest one. So you dont have to fiddle around with setting the speed mode each time

4 Likes

Does anyone have any problems with their Curtain 3? Was using them directly to HA with bluetooth but sometimes the curtain motor will not do anything with the buttons in HA, works in the Switchbot App. Now I have it connected to HA via switchbot hub and Matter and appeared to be consistent until now, I have this error

How far away from the Curtain 3 is / was you bluetooth adapter and / or switchbot hub? Low signal strength or quality is usually the culprit.

Is it possible to install this core integration as seperate integration as well with modified curtain.py? Ie. “double integration” for single device? Purpose would be having both speeds available in Home Assistant.

I think this would be possible. However, I am not into the development of integration so I have no idea how exactly this would be done.

Because I wanted a solution for my curtains I modified the original files and built a dirty way to control the speed mode right from my automations. This is not the way how it should be done, but it works for me. If you want to try it, you may have a look here. Be aware that this requires modification of the core integration and should only be used temporarily.

If I can assist to get a clean solution I’m happy to help. But as said earlier I have little to no experience with this.

1 Like

Thanks for the info; have to check!

Hello, how do I change these files, please?
When I accessed the deeps folder through SMB, it was empty.
Will the changes remain after updating HA, or will I have to do them again?

Thank you.

You can use the SSH & Web Terminal addon to modify the files.
And you dont need to modify the files after an update of Home Assistant, only after an update of the integration

Thank you.
I tried that… but the ui through the terminal acts like the deps folder has no subfolders.

You should be able to locate the file with the command find / -name 'curtain.py'

Also, to prevent unrelated discussions in this thread, feel free to open an issue in my github project so we can continue to resolve this problem there.

The slow mode is now merged as I see at pyswitchbot:

6 Likes

Will that be available with the next update of HA core?
Thank you.

1 Like

Hi there! So Christmas brought me 2 switchbot curtain 3 u rails devices. Work well in the app.

I have 2 esp32 esphome devices set with active scan for bluetooth and picked up both devices.

Although I can fully control them via the app it’s not working so well via HA.

I have 3 issues:
1. Status is not correct
2. I can control the curtains via HA, open, close and set to a value but the status is never fed back correctly.
3. not sure but I think 1 out of 2 “entities” opens both curtains (left & right) and the other entity opens left only…

For 2, the “previous” status is kept. Untill I select a new value, then the old one is shown…

Weird…

I saw some posts of BLE taking time to update status, but even waiting an hour does not update it…

Any suggestion?

Also, seeing some progress on the “quiet mode” that’s 3 days ago, will that mean it can be in 2024.1 version of HA…???

EDIT:
So I added another ESP32 bluetooth proxy (active) more closer to the curtains (built in shelly i4 flashed with esphome. Now I can see both curtains “realtime” moving (percentage updates in HA). Deleting the “groups” in switchbot app and grouped in HA as “curtain”.

Now wait for the quiet mode support :slight_smile:

Same here… any tips?