problem to setup HA menu
pilot1981 opened this issue ยท 21 comments
Hi,
I follower wiki instruction but I don't see any switches and I think there is some problem with connection to my HA instance.
this is UI of HA Menu:
and this is my troubleshooting output:
$ curl -i https://danielevelardi.duckdns.org:8123 -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjNDdiMjRlZGFjODE0MDQ2YWUxYzc4NTZmNjE2MGI0ZCxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 3086
Date: Fri, 22 Nov 2019 08:16:53 GMT
Server: Python/3.7 aiohttp/3.6.1
import "/frontend_latest/app.38af62d9.js";
import "/frontend_latest/hass-icons.53a6eeed.js";
window.customPanelJS = "/frontend_latest/custom-panel.99a8af4b.js";</script><script nomodule>(function() {
// // Safari 10.1 supports type=module but ignores nomodule, so we add this check.
if (!isS101) {
window.customPanelJS = "/frontend_es5/custom-panel.aeb4b321.js";
_ls("/static/polyfills/custom-elements-es5-adapter.js");
_ls("/frontend_es5/compatibility.8b90988f.js");
_ls("/frontend_es5/core.fa29f9d2.js");
_ls("/frontend_es5/app.ab5d8bbe.js");
_ls("/frontend_es5/hass-icons.37d005f7.js");
}
Related to issue #24
I can now replicate the issue but this is going to take some time.
I found that adding a trailing slash in preferences causes this. Ensure your server is
http://yourip:8123 only
Added a fix in version 1.6
I'll have to spend time adding a lot more error handling in this to be able to easily diagnose what issue your having rather than just guessing. I'll work on a new version next week.
please re-open this ticket; I'm unable to do it!
That indicates an incorrect URL, see you are using duckdns. Try your direct ip to start with.
That would indicate there's something wrong with the data returned from the API. The proper curl statement to test the API is as follows.
curl -i http://YOURIP:8123/api/states -H "Authorization: Bearer YOURTOKEN" > apitest.txt
This will save the output to a file in your current folder (usually user home folder if new terminal).
That should return json which is in the following structure
https://developers.home-assistant.io/docs/en/external_api_rest.html#get-apistates
Whilst this data probably contains lots of information you won't want to share, if HA is returning something odd in this then that will trip up the parser. If you obscure sensitive stuff and share then I can read through and try and spot something.
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 411991
Date: Tue, 26 Nov 2019 10:49:26 GMT
Server: Python/3.7 aiohttp/3.6.1
HTTP/1.1 200 OK Content-Type: application/json Content-Length: 411991 Date: Tue, 26 Nov 2019 10:49:26 GMT Server: Python/3.7 aiohttp/3.6.1
There should be a LOT more than that returned, it's basically acknowledging the API call but returning nothing about state.
I've never seen this not enabled by default but trying adding the API component to configuration.yml
Yes there is a lot more... too much to search for sensitive stuff
if you let me know what to look for.....
Unfortunately the parser has to work through everything, so if something is wrong with an element I'm not even interested in it could still trip it up.
email is andrew@codechimp.org if you deem it non-sensitive enough to share directly. It does not contain connection details/secrets, only the names/states of devices.
I've mailed you the .txt file
I've mailed you the .txt file
Thanks, just received. That's exactly the type of data I'm expecting to be returned so connection URL and token are working fine.
I'll run that data manually through the parser when I'm at home tonight and see what error it throws.
Pretty sure I'll be able to diagnose this weird issue now.
Having that sample data made it trivial to track this down.
V1.8 just released should hopefully finally fix this.
I'll await feedback before closing.
I can confirm v1.8 is working for me
Chiming in another confirmation here too! Thanks @andrew-codechimp
Thanks for confirmations and sticking with this. My HA instance isn't as complex as others it seems and I'm still learning a lot. It's taught me a lot solving this one and made the app more defensive/cleaner in the process.
Hi,
I can confirm v1.8 solve all my problems.
thanks