Replies: 1 comment
-
Working triangulation with node-red and the Room-assistant API |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey there,
I'm back :-)
FINALLY had some time to have another crack at this, and i'm wiring in all my devices (ethernet hats on pi zero's work great, as do microUSB ethernet adapters). This prevents any issues with BT and WiFi that I had before.
Also Beta with BLE on the iOS app works like a CHARM! so thanks @mKeRix This has the potential to be THE way to track room presence (i'm working on 3D printing some cases and exploring compact power options too)
That as an aside, the way RA is architected is to send the only room the device is in, rather than the distances from all the in range sensors (it seems).
Is there a way to tell RA to send all distances from all sensors (i'm using Node-Red to try to do some triangulation).
The issue I have is that my downstairs is sort of open plan (i have a loop around the kitchen basically). With an RA device in the living room and one in the kitchen, unless they are directly centered, as the range is a sphere from the RA device which means if i set a fixed max distance on one side of the kitchen (green X), then the other side will be incorrect (purple X) as not the same distance :(
diagram here - the blue square is a solid wall.
So i'm now wondering if all RA devices could send the distance of the iphones to MQTT, I could then use the coordinates of 3 of them to establish where the person is.
room-assistant/sensor/room/device-id/distance = 0.1
or
room-assistant/device-id/location = { "livingroom": "0.1", "kitchen": "0.6", "office": "1.5", "landing": "none" }
cant tell at this point which would be easier to parse out (given some may not detect the device, so to avoid errors having a 'none' value cant be handled in the logic, vs having to deal with an array in the JSON of varying entities.
2 values would give me a curve, and the 3rd would allow me to intersect that providing house positioning
(the resulting node-red flows would be specific to my set up, but based on trying Xandem in theory I could draw a floor plan to scale and then overlay the co-ordinates of someone moving around.
I'm going to to some research about how to create the floor plan aspect - but for now will be doing it all in node-red.
What are your thoughts?
Beta Was this translation helpful? Give feedback.
All reactions