Heatmap for Homeassistant Floorplan


        

Description

This is a tool to add a distance weighted heatmap to a Floorplan for Home Assitant.

A JSON structure is generated that allows to calculate path distance from every choosen sensor to every point in your floorplan to generate a weighted interpolated value. The heatmap data is then calculated and rendererd with WebGL2 to a <canvas> that is inserted into your floorplan.

Requirements for Floorplan .svg:

The tool will generate a JSON structure that contains all the distance data for all the sensors. If you change your layout or any sensor position you will have to regenerate that data.

To add it to Home Assistant you will need to:

Load your augmented floorplan here to generate the distance data for your floorplan. After loading your floorplan you have the option to simulate and randomize sensor data (0.0-1.0) to see the heatmap result. Sensors without a valid value will be ignored.

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.

References

[1] Benmoshe, N. (2025). A Simple Solution for the Inverse Distance Weighting Interpolation (IDW) Clustering Problem. Sci, 7(1), 30. https://doi.org/10.3390/sci7010030