sopelj / hass-ember-mug-component

Ember Mug Integration for Home Assistant
MIT License
111 stars 4 forks source link

Shelly support #56

Open bradkemper opened 2 months ago

bradkemper commented 2 months ago

Description

I belated read this:

Ensure you have at least one Bluetooth Proxy setup with Home Assistant that supports active connections. Currently, that only includes ESPHome proxies with firmware 2022.9.3 or later.

However, my Shelly Blue gateway usb device does support active connections, and that is how I set it up in Home Assistant. Shouldn’t it just work? Does the Ember integration need an update to support that? Seems like it should.

What I Did

I set up the Shelly to be a proxy, following the gen 2 and 3 instructions to Enable Outbound WebSocket. I set the ember to be in pairing mode, but the integration still doesn’t detect it.

sopelj commented 2 months ago

Hi! Sorry, but from what I understand Bluetooth Proxies with Shelly devices do not support active connections. The Home Assistant Bluetooth docs seem to indicate this is still the case:

Single active connection: not supported Multiple active connections: not supported

The doc does mention "Active or passive listening can be enabled in the options flow", but I don't see anything that states that it can actively pair and connect to a device which is what the mug requires.

Do you see any messages in the log from this integration? Probably you will see that it says pairing isnt supported, or you may just see no messages at all.

If there are issues related to the integration I can do my best to fix it, but most of the bluetooth logic is part of Home Assistant Bluetooth Integration and this integration has no control over it, it simply uses what is exposed. I don't know if it's a hardware or software limitation, but I don't think anything can be done from here.

bradkemper commented 2 months ago

You’re right. It was for active listening.

So there isn’t a way for active connection to not be required? Do you think Shelly could ever be updated through firmware to use active connections? Or could the esp32 on the Shelly be flashed with ESPHome to support it?

sopelj commented 2 months ago

That's a good question. I'm not sure what the current limitation is. It could be that Bluetooth is needed for the onboard software.

Regardless, the update would need to be done to the home assistant shelly integration in order to enable it. Sadly nothing can be done on this end.

Good idea, If you can flash it with ESPHome, I don't see why you couldn't set it up as a standard Bluetooth proxy.

Pretty much any old ESP32 can be used as a Bluetooth proxy with esphome. That's what I use now. Just a random ESP32 dev board I had laying around.

It's unfortunate that the mug requires an active connection as it will not broadcast information without being paired with a device, but I don't think there's anything that can be done about that without reprogramming it. 😕