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

[Query] No update if device out of range #2

Closed
vswraith opened this issue Sep 6, 2016 · 6 comments · Fixed by home-assistant/core#3321
Closed

[Query] No update if device out of range #2

vswraith opened this issue Sep 6, 2016 · 6 comments · Fixed by home-assistant/core#3321

Comments

@vswraith
Copy link

vswraith commented Sep 6, 2016

Love the tool and just set it up with HomeAssistant,one thing I noticed is when the device is out of range of the beacon, it long longer sends any update on the MQTT...so HomeAssistant keeps the last known value instead of 0. Is there a way to set it to 0 if device is out of range?

How have you setup the room based automation rules? Would be great if you share some.

Thanks.

@vswraith vswraith changed the title No update if device out of range [Query] No update if device out of range Sep 6, 2016
@mKeRix
Copy link
Owner

mKeRix commented Sep 6, 2016

I have some more time on the weekend and can take a look at implementing something like this. Do ou want this to work smilar to the consider_home timeout of the HASS device trackers? So e.g. no update from any tracker for a while sets the current sensor state to away. That would have to be implemented on the HASS server side (even though it shouldn't be much of a problem).

And I've been planning on sharing my setup related to this tool anyway, I'll try to get a blog post out on the weekend. :)

@vswraith
Copy link
Author

vswraith commented Sep 7, 2016

Yes,either set it to away or send a 0 to ensure the device is no longer in range. Also i get very big values in the distance variable(eg. 5797954322.232323) from my Fitbit device....is this normal? Can the code be tweaked to send signal strength instead?

I look forward to the blog post :)

@mKeRix
Copy link
Owner

mKeRix commented Sep 11, 2016

I just made a pull request for this feature on home-assistant repo, although it won't be in till 0.29. If you need the feature soon I guess you could copy in the changed file manually once the code has been checked & merged.

The estimated distance is in meters, so it definitely should not deliver such moon values. I have not seen this happen on my end yet, although I have the suspicion that it may be related to the txPower value. If the Fitbit does not send data for that the calculation is thrown off. I am going to the algorithm locally in regards to this and add some better debug logging so we can get to the bottom of this.

The signal strength is actually already being sent as the rssi value, currently you can explore it with an MQTT client (planning to add a console publisher in the next version). However using it with mqtt_room would not work since it is inverted. The estimated distance is directly based on the signal strength anyway.

Last but not least: since some other things came up I did not have time to write that blog post yet, but it is definitely coming up in the next couple days. I'll comment in here again once I'm done. :)

@vswraith
Copy link
Author

Could you send me the link of your blog,will add it to my rss feeds :)

@mKeRix
Copy link
Owner

mKeRix commented Oct 12, 2016

Sorry for the long radio silence, been a busy couple weeks! As the main issue of this request has been solved with Home Assistant 0.29 (see away_timeout) I am going to mark this as resolved.

As far as the blog post goes... I am kinda ashamed to admit that it is still just an unfinished draft. Once I actually posted it I will link it in this thread.

@mKeRix mKeRix closed this as completed Oct 12, 2016
@mKeRix
Copy link
Owner

mKeRix commented Jan 8, 2017

I really have to apologize that the post never came together. You probably don't need the post anymore at this point, but I wrote a little explanation of my basic presence logic on reddit. If you or anyone else stumbling upon this topic are interested: https://www.reddit.com/r/homeassistant/comments/5jvwew/use_automation_triggers_with_home_zoning/dc5xgmw/

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

Successfully merging a pull request may close this issue.

2 participants