Replies: 5 comments 15 replies
-
weather providers are also location based. I like the idea! |
Beta Was this translation helpful? Give feedback.
-
May be for the location specific discovery coordinates and a radius works better. For larger area's this seems not ideal to me. But I guess It could be checked if there is a service near by. Not sure if this would be practical to manage in the |
Beta Was this translation helpful? Give feedback.
-
Besides of country filtering, location filtering based on coordinates works best when the location coordinates are passed to a service that filters from a database calculating the distance and make a top-n-list. But that will also bring privacy concerns. It will also bring issues if we fetch a full location list and process it locally. |
Beta Was this translation helpful? Give feedback.
-
I reached out to my friend @grischard at OpenStreetMap. He suggested to use GeoJSON, an existing standard for capturing regions. Regions can be drawn/checked on websites like https://geojson.io/, but even better: cities etc can be exported from OSM directly from a website like https://osm-boundaries.com/Map For checking if an instance is inside the shape, we can leverage a Ray Casting algorithm (inspiration). |
Beta Was this translation helpful? Give feedback.
-
I think it absolutely makes sense to surface integrations geographically. The existing discovery mechanism through Devices and Services > Add Integration today requires you to have knowledge of a particular brand / service having an HA integration already. Even today, I am still finding new ones that I was not previously aware of (despite having scrolled the list myself many times). When there is a new release which adds relevant integrations for your locality, there is no surfacing of these either (outside of the release notes / blog). Bearing in mind that we are only talking about core integrations here. If we have already agreed to incorporate a particular integration into core, why would we not want people to know about it? Surfacing these integrations through a discovery flow seems the best way to do it, with an option to ignore and not be reminded again for that integration. |
Beta Was this translation helpful? Give feedback.
-
As I was on my bike listening to the HA release party, I came up with a new way of getting people in touch with useful data.
Location based auto discovery
When setting up Home Assistant, you automatically get notified about devices on your network or devices found with Bluetooth.
While Home Assistant is a good platform for automating stuff with devices, it can also be used for reading and displaying public data.
In this proposal I want to describe the idea of auto discovery of integrations that integrate with external services that have a bound location to them.
What integrations would be valid?
This is not a definition carved in stone, so feel free to suggest other definitions.
To give a list:
One thing to keep in mind is the amount of integrations that get added to HA after being discovered.
For example discovered network devices would almost always be relevant for the user.
For bluetooth devices, it would depend on the amount of detected bluetooth devices of neighbours or visitors.
The relevancy of integrations recommended by location based auto discovery would be lower.
For example telecom providers, if I use a different provider, I have no use of the recommended integration.
This is also applicable to utility companies.
How can we define the relevancy
Currently we only know the coordinates of the user and their country.
I want to propose to utilize both since they both have pros and cons.
Country based
For example, PEGEL ONLINE would have Germany as country with relevance.
This would be a good way of recommending a country wide integration.
If you would want to use this for for example Twente Mileu it wouldn't be ideal, since the actual part where the integration is relevant is small.
To give another example, if you would select the United states of america as country, and it automatically recommends all opower virtual integrations even though only one would be relevant.
Example
manifest.json
:Bounding box
To take Twente Mileu as example again. You could create a bounding box around the relevant area.
We could also allow multiple bounding boxes to enhance the relevancy.
This would be ideal for a local government or local company that has an integration.
The bounding box wouldn't be great for integrations like PEGEL ONLINE, since countries are shaped weird and it would take or a lot of bounding boxes, or it would cover a lot of other countries.
(To give an example, here's Germany)
Example
manifest.json
:When do we check?
Since location is something that changes rarely in a session, this should only be checked at startup.
What integration should not use this?
This shouldn't be a way for companies to push their product to customers in areas.
For example if there's an integration that acts like a hub for powerdata (for utility companies that may or may not have an integration)/
They should not be able to use this to promote users to sign up at their service to collect more data.
General notes
Since the likelyhood of users installing them is lower than normal discovered integrations, it doesn't make sense to show it as big as currently is happening.
For example in the netherlands you could work with zipcodes.
If we could store more relevant location data we could recommend more specific, this isn't a necessary point to have before implementing.
Another option would be to go for regions, in America it would be based on states and in the netherlands on the regions.
cc @Lash-L
Beta Was this translation helpful? Give feedback.
All reactions