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

Thoughts on dealing with multiple floors #26

Open
mvgijssel opened this issue Dec 6, 2022 · 4 comments
Open

Thoughts on dealing with multiple floors #26

mvgijssel opened this issue Dec 6, 2022 · 4 comments

Comments

@mvgijssel
Copy link

Thanks for this project, it's really dope!

I've setup ad-espresense-ips in this PR https://github.com/mvgijssel/setup/pull/134/files where I've configured two AppDaemon apps, Downstairs_ESPresenseIps and Upstairs_ESPresenseIps to help me with bluetooth object tracking across two floor.

I've made a couple of observations

  1. As mentioned in your readme, it's really helpful to have bluetooth scanners in the corners of your house. Trying to solve that in Install additional BLE scanners to improve accuracy vgijssel/setup#139.

  2. matplatlib is not thread safe, therefore I got some really interesting behaviour in the mqtt camera inside of Home Assistant 🤣 because AppDaemon uses a thread per app. Implemented draw_interval_offset as a quick hack to get a semi-stable image for upstairs and downstairs.

  3. The z value of the tracked object is really high. For example this is a plot of the last 15 minutes from Home Assistant where the lowest z is 4,66 meters and I'm pretty sure my Apple Watch is in the living room on the downstairs floor and not on the roof 🤔.

image

Now I'm curious if you have any thoughts how to accurately determine the floor. I've read the comment posted here #21 (comment), to use the z value as a way to determine the active floor, but there doesn't seem to be a reliable pattern when changing floors while looking at the data. The z value is constantly really high and seems to fluctuate a lot. I'm probably doing something wrong, just would love to pick your brain on what that is!

@mvgijssel
Copy link
Author

To begin answering my own question. In vgijssel/setup#148 found and fixed a bug where I used a comma instead of a dot to indicate decimals:

diff --git a/home-assistant/config/appdaemon/apps/apps.yaml b/home-assistant/config/appdaemon/apps/apps.yaml
index 9dcd82b..ef54664 100755
--- a/home-assistant/config/appdaemon/apps/apps.yaml
+++ b/home-assistant/config/appdaemon/apps/apps.yaml
@@ -23,7 +23,7 @@ Downstairs_ESPresenseIps:
     hallway: [3.43, 9.43, 2.75]
     hallway_vacuum: [5.18, 11.2, 0.05]
     driveway: [2.83, 9.13, 1.03]
+    kitchen: [2.83, 7.28, 1.03]
-    kitchen: [2.83, 7,28, 1.03]
     kitchen_oven: [0.00, 8.03, 0.00]
     garden: [0.46, 0.00, 1.03]
     #

This would result in the z being 28 meter instead of 1.03 meter resulting in the wrong measurements 🤦.

After fixing the bug and installing multiple moko mk115's downtairs z is between -1 and 4 and upstairs between 3 and 8. It will require further tuning, but this will be a good starting point to determine different floors!

@DTTerastar
Copy link
Contributor

Have you checked out ESPresense-companion? It's the WIP successor to this. I would love feedback. It has multiple floors built in as well.

@wtadler
Copy link

wtadler commented Mar 5, 2023

Is there anything written on how to configure the companion? I'm not sure how to get started drawing floors, adding my ESPresense devices, connecting MQTT, etc.

@mvgijssel
Copy link
Author

Have you checked out ESPresense-companion? It's the WIP successor to this. I would love feedback. It has multiple floors built in as well.

Will check it out, thanks!

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

3 participants