Giter VIP home page Giter VIP logo

Comments (6)

gouldner avatar gouldner commented on August 15, 2024

Never mind....I found the issue. I was using the BLE white list for this device and I had iBeacon disabled. If I enable iBeacon and move this device to the iBeacon whitelist (different id of course) it works correctly.

I also searched some and found the code you used for distance calc and explanations on how these calculations work.
If you are curious this is the device I was using.
https://www.amazon.com/gp/product/B019G0VVZC/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1

from room-assistant.

mKeRix avatar mKeRix commented on August 15, 2024

Sorry for not replying, but good to see you solved the problem yourself. :)

BLE distance estimation doesn't really work well as you've seen, but maybe we can improve on that. It's a good point to consider for the new version of room-assistant I'm developing!

from room-assistant.

gouldner avatar gouldner commented on August 15, 2024

No worries you replied in less than 1 day, that's pretty fast in my book.

Do you have any ideas on how to prevent false positive arrivals ? They are pretty rare now that I fixed the few issues I was having with the update frequency but I still get a few. I suspect my remaining false positives are due to brief network outage or brief signal interference. I am thinking about just increasing the time before the token is considered "not_home". I am also considering some strategies I have read about using multiple presence sensors and a weighted average to consider presence. I could see that being an interesting addition to your software. My current use case for this is just Car arrival. So I can set a pretty long delay before a token is considered away and it would still work well for me. I am not using for room movement which would require much faster away/arrive processing.

I am interested in why you are writing new version and what it will do differently. Look forward to seeing it.

Some things I can see as being useful.

  1. Configuration at the token level. Some tokens may work better for distance, timeout etc so it might be nice to be able to configure the setting on a per/token basis instead of globally.
  2. combining tokens so multiple present = 1 MQTT message (sort of a virtual token based on multiple token logic. I am not sure this would actually fix false positives since a network outage basically makes it impossible for MQTT to report to HASS. (I have them on different devices.) Of course maybe this logic just belongs in HASS.

I have added loglevel debugging messages so that info reports relatively little and debug level reports more verbosely. I can share these changes if you are interested. So far I have modified ble and ibeacon.

I also added a map which stores token ids and when a new id is found writes "New Token id=..." to the log. It is very helpful for determining the id of a new token so it can be added to the whitelist. So far the tokens I have used can be enabled/disabled so I just disable. Turn on the app and let it report all the tokens it is finding and then when the "New Token" messages stop reporting I turn on the new token and the next "New Token" message is my ID.
For tokens that can't be turned off perhaps we could add a "identify moving token" mode that just tells you to run around with the token and it identifies the token it sees moving the most :)

from room-assistant.

mKeRix avatar mKeRix commented on August 15, 2024

I think the strategies you proposed are really good for your use case. For room based stuff you can work with motion sensors pointing towards the entryways, because a real change can only happen after the sensor has been triggered. At home I implement this by turning on the lights with motion, then checking the mqtt_room sensor once the sensor specific timeout (when it resets to 0) hits. Works pretty reliable for me.

Combining tokens is something I would suggest you to do in the Home Assistant logic, as there are good ways to do that there. Those are all great suggestions that we should consider for future versions though. For now I just want to cover the features we already have in the rewritten version (1.0), but in a cleaner way. :)

from room-assistant.

leranp avatar leranp commented on August 15, 2024

where is the "iBeacon whitelist" in the new version?
i have also wrong ble distance

from room-assistant.

mKeRix avatar mKeRix commented on August 15, 2024

@leranp The whitelist setting is still the same, see the wiki.

If you're using iBeacons make sure that the measured power is set up correctly on the beacon - it should be the power that you see on the Raspi if the beacon is 1 meter away. If you're just using a regular bluetooth device there is already a request open for providing measured powers in room assistant directly, see #58. I plan on implementing that asap.

Also note that the distance is always just an estimation, there are many unpredictable factors in BLE signal strength.

from room-assistant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.