genie-server icon indicating copy to clipboard operation
genie-server copied to clipboard

Home Assistant: Wrong URL to HA instance skill shown

Open spacegaier opened this issue 3 years ago • 4 comments

After successful integration of Almond and HA, this is listed in the "My Skills" panel:

grafik

The location "http://supervisor/homeassistant" however is wrong. Looks like a dev placeholder 😄.

spacegaier avatar May 11 '21 17:05 spacegaier

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.

gcampax avatar May 18 '21 17:05 gcampax

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 😜.

spacegaier avatar May 20 '21 20:05 spacegaier

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.

gcampax avatar May 20 '21 20:05 gcampax

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 👍.

spacegaier avatar May 20 '21 20:05 spacegaier