Can this Mqtt esp32 project be done on Hubitat instead of h.a?

Can this Mqtt esp32 project be done on Hubitat instead of h.a? SwitchBot bot/curtain/meter MQTT ESP32 bridge - Local control - #168 by TeaMan - Share your Projects! - Home Assistant Community

Not easily; Hubitat doesn't have an MQTT broker. However, if your goal is to control SwitchBot curtains using Hubitat, @tomw has written an excellent integration based on SwitchBot's open API. Available here with instructions:

1 Like

That owes clod correct:? I’m trying to avoid cloud

Yes, my driver which @aaiyar linked to uses the cloud based SwitchBot API.

FWIW, I spent some time working on a local only implementation based on the (semi?)-official BLE API from the SwitchBot repo and an http API wrapper that I created to talk to from Hubitat. But with the RPi I was using it was pretty unreliable though- failed at least a third of the time it seemed. So I abandoned that effort.

Maybe the HA implementation figured out how to avoid the reliability issues, so YMMV.

3 Likes

Thx for your work. Imo not including zigbee was a HUGE flaw on their end

1 Like

Just expanding on my previous comments: the bigger gap is that Hubitat does not have a BLE (Bluetooth) interface. So even if you could port the rest of this code to Hubitat you still wouldn't be able to communicate directly to the SwitchBot hardware.

If the mqtt parts of that HA integration could be run without HA, someone could make an integration based on the mqtt client support in Hubitat. But you'll need something with a Bluetooth interface (RPi, ESP board, etc) regardless.

1 Like

Look into the zemismart curtains device. It might be suitable for your needs.

1 Like

I like this one. Thx

To be clear, even with your integration, the hub must be in Bluetooth range of the device?

The SwitchBot devices need to be within BLE range of the SwitchBot hub. And the SwitchBot hub and Hubitat both have to have internet access.

If you had a local option, like another Bluetooth capable host communicating directly to the SwitchBot devices, then those would have to be in BLE range of each other and then Hubitat would just need a routable local network path to the other host.

1 Like

Isn’t that a really bad flaw? Or am I thinking wrong? You can’t control two curtains on 2 sides of the house

The range is actually pretty good. I have a sensor on the opposite side of my house and one outside in a shed. The range is what it is, I guess- it's just what SwitchBot chose to use. I suppose you could have a second SwitchBot hub if the range was a problem. They're pretty cheap.

1 Like

Oh ok, thx

Here's an article the describes the typical range and performance of Bluetooth in various conditions, which is probably an upper bound of sorts on what you could expect from any product that is built on it (like switchbot).

They recommend a setup with multiple hubs if the coverage area is very large: How to improve Bluetooth range with networking

Thx, 2 and the hub for $160 seems best. I’m going to do one per window to pen left to right instead of in the middle. Do you think they can make this bend? Or is it not “deep” enough. Your personal opinion

I don't have much personal experience with the curtain devices. I primarily have the bot and HT sensor devices, which is what my comments were based on.

There are a few people in the other thread where I posted my driver that have used the curtain devices in various configurations. Maybe you could ask them there: SwitchBot gets an open API! - #17 by tomw

Thank you

1 Like