sopelj / hass-ember-mug-component

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

picking up random bluetooth devices, not ember mug #12

Closed austin202220 closed 2 years ago

austin202220 commented 2 years ago

I have an ember 2 bug and can't get it connected. It is not showing up automatically. When I click + Add Integration the wizard runs and it tries to connect to misc bluetooth devices I have that I know are not the ember mug. (One is my bhyve sprinkler, and it also tries to add my Xiaomi miija plant 'flower care' sensors.

I have followed all the steps, removing the mug from the ember app, then forgetting bluetooth entry from iPhone, then full reset to flashing red.

The mug stays in pairing mode flashing blue and nothing coming in from home assistant.

running 0.4.0 beta 2 version

austin202220 commented 2 years ago

hmmm, restarted the whole system and now when I click add integration->ember mug I get

Error: "Config flow could not be loaded: Unknown error"

sopelj commented 2 years ago

Hey, you shouldn't need to use the "Add integration" wizard. It should be automatically detected. However, I fixed the discovery of random devices in beta 3. I had forgotten to filter that way, because I hadn't used it. Have you previously used the mug with Home Assistant before? You might need to manually remove it via `bluetoothctl remove macaddress" in order for it to be detected as a "new" device.

austin202220 commented 2 years ago

I have not ever gotten the mug setup correctly. I tried yesterday and at one point it did find the mug, but it happened right as I was holding the reset button and I think I messed up the workflow. And it was at the same time that I noticed the directions indicating to use v0.4.0 and I had the prior version installed. So probably my fault I messed it up trying to click too many buttons too fast.

I bet you are right with needing to manually remove it since it did find it at one point. I'm not sure where to go to run that command. If you can point me where to go I bet that will fix it. While im waiting for your response I'll do some googling and try to figure it out on my own.

Thanks for your work on this!!!

sopelj commented 2 years ago

Oh ok! Yeah, I'm sorry I can't make it more intuitive. It's a bit finicky, but once it's connected for the first time, it works pretty well. No worries. I know it's not super straightforward. It should be easier with the new version, I just didn't want to release the latest version until it had been tested a bit.

If you use Home Assistant OS, you can install the "Terminal + SSH" Addon and if not you can just run bluetoothctl on the computer you are using. I know it's annoying, but if you don't remove it this way, Home Assistant won't discover it.

screenshot-2022-10-10-13-20-11

Then you can go into the terminal and type bluetoothctl devices to list known devices. If you see your Mug in the list, then type bluetoothctl remove mugmacaddress Obviously with the MAC address of your mug. As soon as you remove it, home assistant should discover it as long as this integration is installed along with the Home Assistant Bluetooth Integration.

screenshot-2022-10-10-13-19-49

Thank you! I'm just happen when other people can make use of it as well.

austin202220 commented 2 years ago

I loaded beta 3. I didn't know the Mac address for the mug so haven't run the command yet. I clicked add integration and it found the mug this time - and now because of this I am able to know the Mac address. I added the mug and its now giving this error (first it says initializing):

"Retrying setup: An error occurred updating mug: e=BleakAbortedError(' (F7:66:57:75:5B:EC) - /org/bluez/hci0/dev_F7_66_57_75_5B_EC: Failed to connect: [org.bluez.Erro"

Now that I have the Mac address I am going to run the command to remove the mug, reset everything, and see if I can get it to work. I'll report back soon

austin202220 commented 2 years ago

yay!! Its working now, thank you so much!!

sopelj commented 2 years ago

@austin202220 Awesome! Thank you! I'll release the stable version soon. Just a few things I'd like to tweak first. :)