Sonoff, Tasmota, HE, Hue Bridge emulation. Use Case

Hi, dear community.
I've managed to connect 2 Sonoff 4ch to Habitat by leveraging Hue Bridge built-in app and Tasmota's Hue Bridge Emulation

Given
C5 HE US Bridge
2 Sonoff 4CH Wifi switches
7 floor heating actuators ( 220V )
1 3phase 63A 220V contactor ( for 3/6/9kW water heater )
Wifi 2.4GHz network

All sonoffs were flashed to Tasmota 6.6.0 firmware
Settings in Tasmota

I've added 2 Hue Bridge Integration apps into HE, one per bridge.
Important notice - I had to rename all Device Names to become unique to get everything working without glitches. ( I don't know why Hue App named all them like hueBridgeBulbRGBW )

Also I've chosen hueBridgeBulb as a Type

In Dashboard - to get these devices controlled with switch/relay behavior I had to setup a Switch template for every device

And very last and important step which did the magic - I had to go to every Device and send commands on/off/refresh to get them recognized within Dashboard as a switches

Test point if everything was set fine in terms of device configuration is when the Last Activity column is not empty. I found if it is empty - device won't response to any Dashboard commands.

Another glitch is when I toggle switch from MQTT or from Web interface of Tasmota - Dashboard doesn't change the switch state.

Takeaway - I don't know which part of the system has glitches, but looks like Hue App has no good installed() routines and probably Dashboard switch(and bulb) templates. So looks like there is no status polling routine in Hue App or/and Dashboard switch(and bulb) template.

Other than that - system is functional and I'll keep integrating it with node-red and rest of my automation.

1 Like

I think you're going to run into problems with that because the HueBridgeBulb is a dimmer device and the sonoff you have is only a switch device. I don't know if it's ever going to work correctly. You might want to look at this post. It has custom Tasmota Firmware that works directly with HE. I don't know if there is a driver built yet for the 4 channel but that would definitely be an easier task than writing a hue driver.

Nice write up.
I've often dreamed of Tasmota focusing more on the Hue Emulation.
I'm sure it's a constantly moving target, so that's why it was abandoned.
I think you need the old app to even integrate it still, I could be wrong, it's been a wile.

1 Like

Andrii , is this working OK via the MQTT alpha app ?

Would auto discovery of Sonoff (Tasmota) devices be feasible using MQTT ? I am looking at supporting both Shelly and Sonoff in the future and have some initial Shelly code working but I didn't see an obvious Sonoff mechansim for discovery.

K

Hey @kevin
I had no chance to write any MQTT related stuff
Are there any examples how to write MQTT App or Driver and expose it as a Device into Hubitat namespace?
I decided to go Hue emulation because it turned out plug and play.
But I'm more opened to MQTT, because it'll allow me to get buttons in Dashboard reflect actual state of the end device.

@Ryan780
No problems with dimmer device, because I'm using simple Switch template in Dashboard. Even When I'm setting it as a bulb in Dashboard - ir works, just has that annoying dimmer functionality, which works as well - 0 - off, 1-100 - on

hue Driver has no just a switch type, unless I missed something

Is there any code available for hueBridgeBulb ?
I'll add needed one for just a Switch )

Nope. HE native drivers are not publicly available.

You are a member of the alpha test group for my mqtt app so have access to the current app and the topic where it is being discussed. This app allows import of adhoc MQTT devices into HE so you should be able to include your Sonoff - albeit they are not auto discovered.

K

1 Like

Now I see. Thank you for the explanation.
Long story short.
I tested it. Only client is working, but not usable in Dashboard.
I'll try to participate in development soon

Dashboard should work fine, it needs no specific support as it just updates from device events, and that's pretty much realtime from MQTT.

If you have an issue do please post in the alpha topic and I will investigate and fix if needed. But no-one has mentioned any Dashboard problems. I'd like to make the next version as robust as possible so your feedback is important.

The imminent alpha4 I hope addresses just about all bugs and feature requests and will be the last, then it will become beta and released here for public testing.

1 Like

Hue Bridge does support switch. I have 2 Osram plugs. Not sure about your emulator maybe there is a way to change the driver in your setup.
Other than those untied wiring. That's a nice and neat setup.:+1:

What driver is being used in HE to control the two osram plugs you have connected to your Hue Bridge? When you say "emulator", what do you mean? I didn't see any mention of an emulator of anything.

1 Like

I believe emulator leads to my mention of Tasmota emulated bridge.

@Navat604 I'm wondering which Type of the hue driver in HE you are using?

But you are connecting them to an actual Hue Bridge, correct? Not an emulated hue bridge?

The hue Integration will set that up for you. The only time you'd have to modify it is if it falsely identifies a RGBW bulb as RGB. But since they are all connected to the Hue Hub, using the hue integration app, you can't create them manually.

I never created them manually. HE Hue app created them automatically. Even autodetected type worked

So, you were able to control them? I'm confused now. They are connected to a Hue Hub or not?

Sorry for confuse, unintentionally

I'm able to control them, see Andrii Podanenko on Instagram: “#hubitat This is very simple and super handy. Switching all lights in da house - just one click on mobile from any place #homeautomation…”

Recipe how to get there - in first message