Hello,
I am attempting to get a Long-Lived Access token to work appdaemon. For me, this is resulting in:
WARNING AppDaemon: HASS: Disconnected from Home Assistant, retrying in 5 seconds
in the appdaemon logs.
After digging a bit deeper, I have tried the following on the same machine as home assistant:
curl -v -X GET http://<my_ip>:8123/api/error/all -H "Authorization: Bearer potato"
As expected, this returns:
Authorization: Bearer potato
HTTP/1.1 403 Forbidden
I then tried my real token from my secrets file:
curl -v -X GET http://<my_ip>:8123/api/error/all -H "Authorization: Bearer $(grep appdaemon_ll_token secrets.yaml | awk -F': ' ' { print $2 } ') "
This returns:
Authorization: Bearer <expected_token>
HTTP/1.1 403 Forbidden
To generate this token:
- I logged into an existing user account for appdaemon on HA,
- Navigated to /profile,
- Clicked on long-lived tokens -> create token,
- Created it with a simple name,
- Copied the token into my secrets file so appdaemon can see it.
It seems clear that the token is being read from the secrets file correctly (see the curl above), and that token matches what I copied from the field after creating the token. What am I doing wrong?
- Ben