A logical floor plan

Surely this must have been discussed before, and please redirect me to any such public discussion if so, but the closest I could find was this feature request:

Areas: add an “Adjacent areas” list attribute

My suggestion is having areas laid out spatially in a logical floor plan.

In the most basic form it could represent each area as an approximate rectangle with 2D coordinates for corners and connection points where different areas interconnect. (i.e. doorways.) From there it could take any number of more advanced forms all the way up to full 3D BIM models, but wouldn’t have to to be of value.

Many devices are inherently spatial in nature and could be given position attributes (spatial coordinates) in the coordinate system of the house.

The use case of lighting up adjacent areas could be further improved to light up lights within a certain radius. Areas could be large, such as a living room, or small, such as a hallway, and area adjacency may not be the best indicator of proximity. Actual spatial coordinates in combination with doorway information improves on that.

Many people create floor plan dashboards that allow them to get a nice visual overview. That is currently non spatial information presented spatially. With actual spatial information a simple floor plan dashboard could be auto generated.

Presence sensors such as the “Bermuda” BLE tracker could provide better tracking information by looking at RSSI from multiple ESPHome devices and trilaterate presence to areas in between areas with sensors. A more advanced implementation could potentially take wall attenuation into account where different walls may behave differently.

Visualization of things like WiFi signal strength or room temperatures are inherently spatial, and temperatures could be interpolated in between sensor locations.

The topology of mesh networks like Zigbee or Thread could be visualized spatially which could help to pinpoint weak spots.

Some devices like robotic vacuums generate their own maps, and while these may not be in open, well documented formats, there is at least potential for having maps from a vacuum form the basis for a HA floor plan and to visualize vacuum information in the HA floor plan.

Robotic lawn mowers that rely on GPS/GNSS should be much easier to visualize.

I am sure there are many more uses, but this is just what came to mind as I am typing this. In my mind this addition wouldn’t have to be all that intrusive: Areas could get something like

floorplan_top_left: [x ,y]
floorplan_bottom_right: [x ,y]
floorplan_doorways:
  - [ x1, y1 ]
  - [ x2, y2 ]

or even floorplan_polygon: [[x0, y0], [x1, y1], [x2, y2], [x3, y3] ,[x4, y4], [x5, y5]]

and devices get something like: location_xyz: [x ,y, z]

z-coordinates could be explicit or left out and inferred by the floor level.

These are just discussion points but I hope they could provide some inspiration.

You see a smart lamp as a light, but the IoT system sees it as a RF device.
The IoT system can not see the how the lamp lights up the area.

RF signals can only really be used to trilaterate when used in open space or over long distances.
When you try to trilaterate on short distances with obstacles then the obstacles will bounce and absorb the signal in unpredictable ways.
You might get a straight connection between two devices through a wall in one spot, but moving it a millimeter and the signal is completely dead.
This makes it pretty useless for visualizing RF devices placement.

The RF world is just not directly map-able tothe real world.

And anything that use GPS/GNSS will require that your floorplan also use that, which means your doorways, room and so on needs precise GPS locations too, but GPS is actually often not that precise and jumps a lot, especially indoor with lots of obstacles to bounce and absorb and other devices to cause electrostatic noise.

If you look at GPS, then the signal should be able to pinpoint you at 1cm precision with just 3 satellites, but due to the same interferences as with RF it requires at least 7 for that precision and those 7 satellites needs to weighted in a formula to get the right values.

Whole I understand whtt you’re saying wally I already have a small prototype of this actually working using Bermuda.You put enough BLE proxies and you overcome most of the issue. I currently have 13 within 3000 aqft. Sampling smooths out the jumping. It’s quite nice. And’good enough for gubment work’. While I cant place you within a foot. I can withing about 2M

I agree we should have spatial coords. In fact I have it setup for my LLM tknbav the home. But I don’t agree it needs to be a full on maprn because this stuff is in its infancy.

Until then op can have what thy want by creating a template sensor for each room (op I have x0, x1, y0, y1, doors and what rooms the doors connect to, if it is the exit for that room, if has a sensor or lock, if there are windows and some metadata in the room. and stuffing it with the attributes. Fcors, ad adjacency info. Is love for these to be metadata on the area. I basically gave myself be enough to direct you to the door in case of emergency. (you can do this by door path chaining if each exit is clearly marked.

If you have a vac that supports the custom vacuum map card. you have a map of your house at mm scale. Look at the attributes of the camera sensor generated by the xiaomi integration.

Also @magwe don’t forget to vote for your own idea

Right. HA currently does not have spatial information to treat it any other way, but if you supply that spatial information yourself you can easily realize use cases like “light up all lights within 5m from [x,y]”

Perhaps, but I am not after cm precision here. I am merely suggesting that knowing where BLE receivers are in a floor plan should give more information about where the transmitters are than not having that information. The usefulness is going to grow dramatically with Bluetooth 6 and channel sounding and round trip timing.

Relating one coordinate system to another is just a simple matrix multiplication. You just need the GPS coordinate of a single point in you floor plan and the direction of north. I absolutely agree that GPS should not be used for indoors applications. That would be reserved for lawn mowers and such.

1 Like

Coming from someone that has zero understanding of what you are trying to do, please help me. Are you trying to build some grahpical something that fits everybodies home, or some new integration that assumes your space looks a certain way, or what.
Who would use this (Your Target group), what would they use it for?
What does it do different that we have now?
You will have many more and much harder questions before this would be implemented.

In general ‘new’ integrations do not start as HA core like you are asking for here. They start as Custom Integrations and when stable might get pushed to core. Music Assistant, Go2rtc, Reolink, and hundreds of others are examples.

This link is relevant to your request found in the Pinned Post for this this category.
Feature Request Guidelines 📔 .

Spatial awareness for sub room level triggers.

I can reliably place my device in half a room now with a BLE receiver every 20’ in the home.

Example :
Coffee maker on. (threshold sensor on the circuit with the tea kettle)
Where’s Nathan? (condition if he’s in the kitchen and near the coffee pot)
And time between x and y

You just caught me making my morning coffee 100% it filters out my wife or anyone else making coffee. And therefore is a reliable trigger to open a voice conversation on the Kitchen VPE (this is literally on my list to do)

Lighting - you can position lamps on the map with x, y and like op said you now have targeting by position not just by room.

Lighting with relative x/y and specs on the lamp (usually available in the device) you can estimate relative intensity and color mix (you have to do the calcs for the llm, but you can position a light source in 3d space - does it run Doom?)

LLM guest assistance… Where’s Nathan keep the extra towels?

A: They’re in the hall linen closet. It’s halfway between the guest room and guest bathroom in the back hall.

Spatial coords allow all of this.

1 Like