Error fetching data: <PreparedRequest [GET]> from https://xyz.duckdns.org/hassio/addon/core_samba/info failed with HTTPSConnectionPool(host='xyz.duckdns.org', port=443): Max retries exceeded with url: /hassio/addon/core_samba/info (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x6eda30d0>: Failed to establish a new connection: [Errno -3] Try again'))
Error fetching data: <PreparedRequest [GET]> from https://xyz.duckdns.org:8123/hassio/addon/core_samba/info failed with HTTPSConnectionPool(host='xyz.duckdns.org', port=8123): Max retries exceeded with url: /hassio/addon/core_samba/info (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x71802f50>: Failed to establish a new connection: [Errno 111] Connection refused'))
In the Profile page, when I can create a LLT, I press on “create” and get a Box to enter something… I enter “Bearer njfjMNGJdfj 4r4…” , and when I press OK, I get a new ‘code’ , much longer…
Which one I need to use ? The one I wrote with the “Bearer” or the long one I got in result?
It’s worth noting if you use the command line sensor you can just use the existing token within HA and just use the supervisor address making the package/config much more portable.
By the way, you can always try these commands from the Home Assistant command line using curl to see what JSON object is being returned to the sensor. So in this case you could try:
curl -X GET -H "Content-Type: application/json" http://10.0.0.25:8123/api/hassio/addons/bc9cb2be_cloudflare-argo/info -H "Authorization: <YOUR HA ACCESS TOKEN HERE>"
Then you can check the result to see that the JSON key you are looking for is actually present
For anyone stumbling across this like me:
Just like @phakorn mentioned, there is now a binary sensor for this that can tell you if an addon is running. You just have to enable it.
Go to Settings > Devices > Addon in question > Sensors > Running > Advanced Options > Enable.
Using the not_running trigger you can trigger on an addon stopping.