When developing the vigieau integration, it would have been interesting to retrieve the coordinates of the house that we configured in Gladys.
Here is claude’s feedback on the subject:
1 & 2. Retrieving Gladys house location — impossible, and there's no workaround
I cloned the core of Gladys to verify rather than assume. The house does have coordinates (server/models/house.js: latitude/longitude), but nothing exposes them to an integration container:
The integration host API (/api/integration/v1/*) has exactly 21 routes (server/api/routes.js) — none of them concern the house. getConfig() only returns the integration's own config.
GET /api/v1/house is authenticated: true, so a user JWT: session.validateAccessToken requires audience: 'user', whereas an integration token has audience: 'integration'. The middleware states this explicitly — the two audiences never intersect.
Detour via getDevices(): the response does include room, but getStandardDeviceIncludes() does not nest the house — the room only has a house_id, without coordinates.
The requested button would therefore require a PR on the core (a GET /api/integration/v1/house route + an SDK method). I haven't implemented anything on this side, and I've recorded the finding in CLAUDE.md so that it isn't reinvented.
Can’t we coordinate with the dev of @Will_71 and choose his « weather provider »?
I know there was talk of merging Openweathermap and MétéoFrance in the internal integration and choosing the one we wanted.
Now with the external integration, I don’t know what the situation is, too many topics to follow and remember
@pierre-gilles modified the SDK so that we can develop external weather integrations.
The widget I developed will be in the core and we will be able to choose the source that will take either OpenWeather, Météo France, Météo Suisse…
On my side, the external Météo-France integration is ready to be tested. I’m just waiting for the SDK and Gladys core PR, with the weather part, to be ready.
Good news, we agree that this is a real need And not just for Vigieau, by the way: weather, air quality, pollen… all integrations related to location have this problem today.
Your analysis is correct: the coordinates are indeed in the database, but nothing exposes them on the API side of the integrations. So we will add a route GET /api/integration/v1/house that will return the list of houses with their name and coordinates (and only that, not the alarm info, of course), along with the accompanying SDK method.
A small but important detail: the house coordinates are sensitive data (it’s the home address!). Therefore, the integration will need to declare in its manifest that it requires the location, and this will be visible in the store before installation. If the integration has not declared this, the API will return a 403. Same logic as what we already do for network discovery.
Note for your code: the coordinates can be null (if the user has not configured them), and there can be multiple houses. Make sure to handle these two cases