appdaemon
appdaemon copied to clipboard
Relative URLs in the config
I run AppDaemon on docker together with the installation of Home Assistant on another docker container.
For the two to work together I have to 'hard code' the IP number for my HA instance:
---
secrets: /config/secrets.yaml
appdaemon:
latitude: 12
longitude: 5
elevation: 69
time_zone: Europe/Paris
plugins:
HASS:
type: hass
ha_url: http://192.1681.25:8123
token: !secret appdaemontoken
http:
url: http://127.0.0.1:5050
admin:
api:
hadashboard:
dash_url: http://192.168.1.25:5050
Is it possible to put some "relative" links in stead of the fixed IP addresses?
localhost
does not seem to work...
Maybe I can put poll the local IP with home assistant and use that sensor to provide the IP address? I need this to be able to take the machine around to other locations without resetting this address all the time.
I don’t run my setup like this but I know if multiple docker instances are running on the same docker network, you can access docker containers internally by their name. You may want to experiment with that.
From: filmgarage @.> Sent: Thursday, November 11, 2021 3:55 PM To: AppDaemon/appdaemon @.> Cc: Subscribed @.***> Subject: [AppDaemon/appdaemon] Relative URLs in the config (Issue #1386)
I run AppDaemon on docker together with the installation of Home Assistant on another docker container.
For the two to work together I have to 'hard code' the IP number for my HA instance:
secrets: /config/secrets.yaml appdaemon: latitude: 12 longitude: 5 elevation: 69 time_zone: Europe/Paris plugins: HASS: type: hass ha_url: http://192.1681.25:8123 token: !secret appdaemontoken http: url: http://127.0.0.1:5050 admin: api: hadashboard: dash_url: http://192.168.1.25:5050
Is it possible to put some "relative" links in stead of the fixed IP addresses?
localhost does not seem to work...
Maybe I can put poll the local IP with home assistant and use that sensor to provide the IP address? I need this to be able to take the machine around to other locations without resetting this address all the time.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AppDaemon/appdaemon/issues/1386 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AF7WL6V2JW5IUIPMTOVAHJTULRJUJANCNFSM5H3TH55A . https://github.com/notifications/beacon/AF7WL6QYVIKDWPCCOFQSLCDULRJUJA5CNFSM5H3TH55KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4PVL5FWQ.gif
Cool!
That sounds like a viable option!
Rob
After some reading: AppDaemon configuration using the Home Assistant Add-on file does not require the IP address to be set in the config file!
https://github.com/hassio-addons/addon-appdaemon/blob/main/appdaemon/DOCS.md#home-assistant-access-tokens-and-ha_url-settings
So I do not even have to set up relative URL's!
Consider this solved and perhaps keep this topic open as a tip for future reference...