Switch Bot

My problem was the password entered in the app. Now is working.
Any chance to control also the IR Switchbot Hub?

Reading through this discussion, am I right thinking that the SwitchBot can be controlled directly from HA without the need of the SwitchBot Hub?

Also, are there any alternative (cheaper) products to SwitchBot?

Yes, it was working for me for a few days than it just stop responding.

The “Switchbot Bot” is working fine in my case.
I would like to have the “Switchbot Hub Mini” integrated because it can control many appliances by IR signals (TV, speakers…)

1 Like

maybe it can help you: Robomow RX12u home assistant

What did you do with the password. I’m struggling to get the switchbot working at the moment. Thats the reason why I ask.

I just remove the password I setted to the hub in Switchbot app for android.

Thanks for the answer. After I can’t get it running and due to the fact that i am using also other switchbot devices i use IFTTT now. With IFTTT I can control everything as I want with webhook automations. Also switchbot hub integrations work fine. :slight_smile:

Does any Switchbot owners (who don’t use the hub) can tell me if Lovelace UI will show me if the Switchbot is in On or Off status? I simply want it to just control a single light switch in the kitchen. But I want to know from looking at the Home Assistant UI that’s Switchbot status is in On or Off status.
Thanks

@ jellytotz

If you are referring to the switchbot bot, it gives you the states on or off. The issue with this is that if someone manually turn on/off the device. The state HA says will not be accurate. Furthermore, when HA reboots, it reverts to off.

With that said, you can create a switch to retains it’s states when HA reboots using an input_boolean. This is how I did to one of my bots. My bots is controlled via shell command. I believe it will work with a switch as well. You can use it as a guide and tweak to your setup.

input_boolean.yaml

  washroom_fan:
    name: Washroom Fan
    icon: mdi:fan

shell_command.yaml

  24hr_fan_bot: 'curl -k "http://192.168.1.30:5004/?id=fab50h9b504e&cmd=press"'

switch.yaml

  - platform: template
    switches:
     24hr_fan:
       friendly_name: '24hr Fan'
       value_template: "{{ states('input_boolean.washroom_fan') }}"
       turn_on:
         - service: shell_command.24hr_fan_bot
         - service: input_boolean.turn_on
           entity_id: input_boolean.washroom_fan
       turn_off:
         - service: shell_command.24hr_fan_bot
         - service: input_boolean.turn_off
           entity_id: input_boolean.washroom_fan
       icon_template: >-
         {% if is_state('input_boolean.washroom_fan', 'on') %}
           mdi:fan
         {% else %}
            mdi:fan-off
         {% endif %}

1 Like

Hello,

I’ve some switchbot thermometer and a switchbot hub min.
Can anyone explain me how to make the integration of these without IFTTT?

I’m realy lost…

THX

Hey guys,

I have a HA VM with no BT, can I use this though the hub?

I believe you can use switchbot api. Request API token via the feedback within the mobile app.

There is no integration though, someone would need to make it?

This is how I do it. It’s all local without using the cloud API, which didn’t exist at the time. It also doesn’t need the hub, but you can keep it if you still want to be able to see your Meter in the Switchbot app.

Here is a very detailed video covering how to set everything up, starting from 3:04.

1 Like

Thanks for that,

My issue is though I run HA through a VM with no BT.

At the moment, I have have the devices coming through to HA via SmartThings integration. But just makes it hard to get rid of SmartThings (its pretty much dead anyway lol)

Ill have to think about it

A VM without Bluetooth is no problem with this method. You use a separate device like a Pi Zero W to sniff BLE and publish MQTT messages for your HA instance.

Depending on your host set-up, you might be able to run sbm2mqtt on the host system of the VM instead of on a separate machine, assuming it’s Linux. Some people run it under Ubuntu.

Ok, that’s interesting… Maybe finally a use for the 5 or so Pi Zeros I have haha.

So basically install This on the Pi and point the home assistant MQTT broker to it?

checkout my code for esp32. all the work is done by esp32 to convert mqtt to switchbot bluetooth and back to mqtt response. Zero failures over the past week. you can add as many esp32s around the house to get maximum coverage

Yes, that’s right. I’ve tested it with four Meters. You’ll have to do something else for for button presser, though.

2 Likes