genie-server
genie-server copied to clipboard
Home Assistant: Wrong URL to HA instance skill shown
After successful integration of Almond and HA, this is listed in the "My Skills" panel:
The location "http://supervisor/homeassistant" however is wrong. Looks like a dev placeholder 😄.
The location is correct, in fact. That's the URL used by add-ons to connect to Home Assistant from inside the docker contaienr network. We should probably hide it though if it is confusing.
In the coding I see a different one: https://github.com/stanford-oval/thingpedia-common-devices/blob/cbe9efec3d43bb6abc911684abacb35064d5dc30/main/io.home-assistant/index.js#L25
But this one seems to win: https://github.com/stanford-oval/almond-hassio-repository/blob/514458df1bfd7835d176dfce182e408b64ec2e5e/edge/rootfs/etc/services.d/almond/register#L30
Ideally it should dynamically be determined (current host + default HA port 8123) and in then long run be configurable as the coding comment already states 😜.
Again, in the code the location is correct - as you noted, the one in the addon wins. There is a DNS configuration in the supervisor that makes those URLs work. This is only a matter of displaying the right URL - which would need to come from Home Assistant's external URL then.
Yes, I understand that technically this URL is correct for the internal workings, but it's confusing for the end user (since it won't resolve outside of the internal docker containers).
We are on the same page here 👍.