Skip to content
This repository has been archived by the owner on Jul 9, 2022. It is now read-only.

Documentation very unclear: which MAC to add? How to add multiple? #15

Open
bliekp opened this issue May 31, 2021 · 6 comments
Open

Documentation very unclear: which MAC to add? How to add multiple? #15

bliekp opened this issue May 31, 2021 · 6 comments

Comments

@bliekp
Copy link

bliekp commented May 31, 2021

Just got 4 switchbot curtains and a hub mini. How do I add this properly? The MAC-addresses of the curtains themselves are BLE (Bluetooth) devices and my HA-setup doesn't have BLE. The hub however has a WiFi MAC-address.

How to properly set this up? The documentation is very very sparse and unclear about this.

@DCSBL
Copy link

DCSBL commented May 31, 2021

I had the same issues. But I've discovered that the integration communicates directly to the curtains without the hub over BLE. I've sold my hub because I didn't need it after all...

A bluetooth dongle fixed that I didn't have BLE for my setup (I am using a Odroid N2+). With this integrations and the following configuration I was able to get everything to work (I have 3 curtains):

# configuration.yaml
cover:
  - platform: switchbot-curtain
    mac: "AA:BB:CC:DD:EE:FF" # For example
    name: "Curtain 1"
  - platform: switchbot-curtain
    mac: "AA:BB:CC:DD:EE:FF"
    name: "Curtain 2"
  - platform: switchbot-curtain
    mac: "AA:BB:CC:DD:EE:FF"
    name: "Curtain 3"

You need the BLE MAC address from curtain, found in SB app > Device > Settings > '...' > BLE MAC.

@bliekp
Copy link
Author

bliekp commented May 31, 2021

I see. That's a pity really, I would rather use the hub than add an extra USB-device to my Raspberry Pi setup. It's already using a powered USB-hub but that's reaching it's limit since I have a SSD, Z-Wave-stick and Zigbee-stick attached to it.

It would be great, IMHO, if the integration could use the hub instead and query that for the connected curtains and add those automatically to HA....

@LouiS22
Copy link

LouiS22 commented Jun 2, 2021

I see. That's a pity really, I would rather use the hub than add an extra USB-device to my Raspberry Pi setup. It's already using a powered USB-hub but that's reaching it's limit since I have a SSD, Z-Wave-stick and Zigbee-stick attached to it.

It would be great, IMHO, if the integration could use the hub instead and query that for the connected curtains and add those automatically to HA....

HA's philosophy is to control the device locally (where it's possible) and use cloud if there's no other option. The reason is simple: being controlled locally, you have the power and you aren't depend on a cloud based solution (for instance: no internet, no control :) ).

@bliekp
Copy link
Author

bliekp commented Jun 8, 2021

Ok, I got a simple BLE dongle and managed to scan for devices using this in my configuration.yaml since hcitool is not available through Hass.io setup on a Raspberry pi:

device_tracker:

  - platform: bluetooth_le_tracker
    track_new_devices: true

The the new devices pop up in /config/known_devices.yaml, or you can look the MAC-address up in the SwitchBot App on your phone, which I did. Then add them like stated above to the configuration.yaml like this:

cover:
  - platform: switchbot-curtain
    mac: EA:0E:56:C9:A5:2B
    name: "Gordijn Woonkamer Zijkant"
  - platform: switchbot-curtain
    mac: FD:D4:98:02:53:4A
    name: "Gordijn Woonkamer Voor"

It works now, sweet!

@rw377
Copy link

rw377 commented Jul 6, 2021

I'm running HA in a virtual machine inside a server far away from the curtains. I do have the Switchbot Hub Mini though. I am able to control the curtains through the app via the hub mini without being on WiFi/Bluetooth. Is there any way to get the Hub working with this integration?

@alextud
Copy link
Owner

alextud commented Jul 7, 2021

Integration with hub is not possible ...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants