The switchbot can run in 2 modes: press (momentary switch) or switch (toggle on/off like a light switch).
In press mode you can set the press duration from 0 to 60 seconds. If you can wake the remote by pressing for 2 seconds, you can simply set the press duration to 2s in the switchbot app, then in HA have a little script to trigger the switchbot twice in succession.
Edit: while I love my little switchbot, if your remote is IR or 433mhz RF it would probably be cheaper, more elegant (and more fun) to build yourself a little esp32 remote transmitter using this component: https://esphome.io/components/remote_transmitter.html
I think you’re going to need the app, if only for the initial configuration. As far as I am aware there is no way to change mode or press duration from within home assistant so you will need to do that in the app. It saves it to the actual switchbot itself though so once you have it configured to your liking, i think you never need to use the app again. I exclusively use home assistant to control mine.
It doesn’t need to talk to the app provided your HA hardware can talk bluetooth. It will then talk directly to the switchbot itself, no hub needed. I have two switchbots working like this. All you need to know the the bluetooth mac address of the switchbot, and you can see this in the app (app home screen, click on gear icon next to the switchbot, then on the … top right and it shows the ble mac).
You then use this mac address in your configuration.yaml:
(edit: I think the mac address has to be lowercase although I can’t remember why i think this )
you can then call switch.myswitchbot in scripts and automations and do the double button press somehow.
Oke i have received the Switchbot. I have intergrated in HA and it is working fine. Now i am trying to create an automation to press a button 2 times. But for some reaons, it doenst work:
Here is de automation. Any idea whats wrong?
- alias: Schakel Pelletkachel aan
initial_state: 'on'
trigger:
platform: state
entity_id: switch.pelletkachel_afstandsbediening
to: 'on
action:
- delay: 00:05:00
- service: switch.toggle
entity_id: switch.pelletkachel_afstandsbediening
Thanks it is working fine now… But i still have a big issue. When the switch bot is inactive for a couple of hours, HA cannot connect anymore. I need to start the official app and ‘‘awake’’ the switchbot from the app. After that, the switchbot is reconized again by HA.
No I don’t. I do have issues with some xiaomi bluetooth temp & humidity sensors with my home assistant where ha is no longer able to get a signal from them. This issue then also affects the switchbot. I’m using a pi 3b+ and suspect there is a bug on this platform somewhere in the stack with regards to bluetooth. I’ve moved those sensors onto esp32s and the issue has now gone away.
I have the same issue, it is proving difficult to wake over Bluetooth from my rpi3. It is about 5m away but works fine once it is initially woken from its slumber
@eterpstra, hi, I was thinking about the switchbot curtain, do you need switchbot hub to connect to device? Or do you connect to HA directly? What’s the communication protocol dose switchbot use, Bluetooth, wifi, zigbee, or z-wave? Thanks
There is a lot of switchbot knowledge here. Is there any wat to control (activate) the switch bot over WiFi (preferably without having to buy the hub)? I have a faulty robomow that only works if i press a button on top of the mower twice. I was thinking about buying a switchbot and manage it through HASS (make a schedule and don’t mow when it’s raining and that kind of stuff). But my HASS is on a RPI4 in the hallway and not in bluetooth range. I do have have wifi in the garden.
Or are there any ESP8266 or ESP32 (or other cheap technologies) examples where you can make your own WIFI button presser.
Were you referring to the switchbot Bot that is working for you? Is it still working. Read from another thread, a few are having trouble with the Bot.
I, too, am interested with the curtain as well. My amazon country says it will be available on Sept 15. However, I will wait until others on HA forum reports if they can get it to work with HA before purchasing.
Edit: while I love my little switchbot, if your remote is IR or 433mhz RF it would probably be cheaper, more elegant (and more fun) to build yourself a little esp32 remote transmitter using this component:
So are you basically creating your own ‘smart’ remote with ir/rf codes using the esp32 and the esp32 needs to be in line of sight with the devices you want to control?
Wouldn’t it be cheaper or cost just a much to get a Broadlink to learn the codes?
No I don’t. I do have issues with some xiaomi bluetooth temp & humidity sensors with my home assistant where ha is no longer able to get a signal from them.
Your Switchbot Bot is still working for you with no disconnect even after the Bot has gone to sleep? I am thinking about picking one up to turn on my tv box. It uses bluetooth to transmit the signals. My main concern is that the tv box is quite far from HA and the Bot may be out of BT range.
I have the Switchbot Thermometer/Hygrometer and followed this guide to setup.