Inverse distance weighted heatmap #648
MaPePeR
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I created a webtool that takes a SVG floorplan, that contains some elements that describe the floorplan outline and sensor locations, and generates a data structure that allows calculating the path distance from every sensor to every point on the floorplan using WebGL.
The sensor values are updated using the
floorplan.dataset_setservice.With that distance data and sensor values I can render an inverse distance weighted heatmap of the sensor values onto a canvas that is inserted into the floorplan.
Disclaimer: The algorithm to generate the distance-data contains a lot of literal and figurative edge cases. It would be a miracle if I managed to properly handle them all.
More explanation/documentation on the GitHub Pages page: https://mapeper.github.io/heatmap-for-home-assistant-floorplan/
Though there are still a lot of rough edges. E.g. I'm pretty sure the colormap shader I use is wrong (viridis isn't supposed to have visible bands?) and it is not yet possible to calculate the deviation of an average value or something like that (though that could be achieved outside of this tool with templates, I guess).
Also not sure yet if this is useful at all. But I think its pretty. 😅
I'm not sure how long that projects continues to interest me, so adjust your expecations in improvements and support accordingly.
All reactions