Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home Assistant not switching to away when beacon is away #5

Open
alexmat opened this issue Aug 13, 2017 · 8 comments
Open

Home Assistant not switching to away when beacon is away #5

alexmat opened this issue Aug 13, 2017 · 8 comments

Comments

@alexmat
Copy link

alexmat commented Aug 13, 2017

I have a beacon on my keychain. When I'm home it shows up as being in the hallway. When I leave it still says hallway in Home Assistant, but it says 'not found' on the presence server. How can I get it to set the home assistant state to away?

When I take it into the living room, the state changes to living room and vice versa, so that works.

@nemik
Copy link
Member

nemik commented Aug 13, 2017

This might be a Home Assistant bug rather than a Happy Bubbles one. What does your config look like? 'Not found' in presence server is correct if it's gone, but HA doesn't seem to be picking it up.

@alexmat
Copy link
Author

alexmat commented Aug 14, 2017

Here's the config I use:

  • platform: mqtt_room
    device_id: e2c56db5****6f0_0000_0000
    name: 'Husk Keys'
    state_topic: 'happy-bubbles/presence/ha'

Not sure whether it's the HASS side not reading the away state change or on the presence server not publishing it. Here's the HASS component code: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/sensor/mqtt_room.py

Does it look like it's doing the right thing to interpret the MQTT messages the presence server is sending?

@ryhanen
Copy link

ryhanen commented Aug 28, 2017

I am having the same issue. HA doesn't seem to be getting the away-info correctly. Instead it is stuck with the latest happy bubble that has seen the beacon. Running latest HA version from the docker image.

@nemik
Copy link
Member

nemik commented Aug 28, 2017

You guys need to add this to your config for your sensor:

timeout: 5
away_timeout: 60

you can change the values for whatever you want, but HA needs that timeout to know when to 'expire' a sensor as away when it doesn't see it for some amount of time.

@ryhanen
Copy link

ryhanen commented Aug 28, 2017

Ok, that sort of solved the issue, but at the same time made the setting "Only Send Changes in Location to Home Assistant" unusable as HA then consideres a beacon that stays in same place as "away" after the timeout. I had misunderstood that presence server would send "away-event" or something like that to HA after it's own "Last Seen Treshold" has passed.

@nemik
Copy link
Member

nemik commented Aug 28, 2017

I know...and I'm sorry about that, but there's just not much I can do about it with the way HA works. The problem is that Home Assistant doesn't seem to have any type of event it accepts to tell it that a beacon is away. So the only way to detect away in that case is for it to stop receiving notifications about that sensor.

If it was added since I wrote this functionality or if there is another way to handle this, please tell me and I'd be happy to issue and update and resolve this issues for you guys.

@wpeterw
Copy link

wpeterw commented Sep 13, 2017

When the iBeacon is gone Happy Bubbles presence server sends this message:

happy-bubbles/presence Beacon is most likely in with average distance 0.000000

Wouldn't it be possible to add "away" as a "dummy location" ?

@mellowmerlin
Copy link

Why not just send 'away' as the location?

The 'only send changes in location to home assistant' option is so promising...but completely useless without some kind of away notification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants