I guess so!
Homebridge was the first add-on I created. Using it as a template ever since
I guess so!
Homebridge was the first add-on I created. Using it as a template ever since
can you elaborate on what the issue is here? Should i be seeking port 7080 or 8123 should my CORS allowed origin cite port 7080 or 8123.
Your Home Assistant is running on 8123 (normally, you could have modify that, but for sake of the example, lets assume it is).
The add-on runs a separate webserver for the panel on port 7080. So the add-on will connect from port 7080 to 8123 (to get data from Home Assistant).
Javascript is not allowing connections to other hosts directly. That is what the CORS setting is for. Configuring this setting is telling javascript that anything running on port 7080 is allowed to connect to 8123 for data.
Hence the following:
Addon running on 7080
Home Assistant running on port 8123.
-> Home Assistant sending out CORS to allow connections from add-on port 7080
-> Add-on needs to connect with 8123 for data
About the auto-detection: This add-on encapsulates existing software. The autodetection in this software is kinda stupid and assumes the current URL (add-on webserver) is the same as the host and port Home Assistant runs on. This is incorrect in the case of this add-on.
Hi there ! Same problem with Claudioā¦ Any solution yet ?
After setup, Iām accessing the Control Panel via Safari on my iPhone. I save a Home Screen shortcut, and when I launch that it wants to do the setup all over again, so I do that, but they it canāt connect to HA. The address is correct (Iām using https://hassio.local:8123). Just keeps failing and asking me for a correct address. Any suggestions? Again, I can access it via Safari (iOS and macOS), just not when I put it on my home screen in iOS.
Thanks @frenck! Got it working, it was auto-populating in the settings with port 7080. Making sure that was 8123 did the trick.
This is great. Two questions.
Thanks!
The addon fails to start for me - could hassio version be an issue? Running 0.65.6
Edit: updated hassio, still doesnāt start
2nd Edit: Uninstalling the addon > Rebooting my Pi > Reinstalling did the trick
Hi, Iām the developer of the Control Panel - itās not really been setup to work as an add on, however Iād be happy to make changes to make it integrate better.
Obviously the first thing looks like the auto detect function needs updating - it is very simple, it just does an http request to commonly used HA addresses, and if it gets a reply back it assumes thatās the right address. Works for Hassio most of the time, but can be refined.
Iāll install the add on this week and see what improvements I can make for it. Itās still very early days, less than 3 weeks dev time so far, so thereās still a way to go with it.
I have a few bugs and questions to report:
-Where are the settings stored of the control panel?
-Why does it take so long to load?
Bugs:
-Google Pixel XL 2 on Google Chrome can not add panel if hosting panel is on the really right side, nothing happens if panel clicked (see pic)
Request:
-Different languages (German), I can help translate.
Maybe the instruction are not clear enough for everyone. @frenck Whatās the cast where we use https and duckdns? Hereās my config. That wonāt allow the control panel to connect
I must also say that my router/firewall doesnāt allow me to access my Home assistant using the external IP, internally, I need to access: https://10.20.30.X:8123 which gives me a certificate error.
base_url: https://externaldns.website.com:8123
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem
api_password: !secret http_password
cors_allowed_origins:
- http://10.20.30.X:7080
Thanks
@godinperson In case your router doesnāt allow loopback, I would (in general, not related to this issue) strongly advise you to use the NGinx proxy to handle the SSL for you (and expose those ports externally). Using this method would allow you to still approach Home Assistant internally without SSL.
In my case, I go one step further, I use the Pi-Hole addon to override my domain (e.g., hassio.frenck.nl) to point to my internal address. That way on my internal network I will be served the internal IP and Home Assistant on my internal network, but on the big bad internet, I would be served my external IP (with SSL via NGinx).
This is my general advise ābest praticeā in case you have loopback issues. Having such a setup, would also remove the problem youāve been describing
I hope this makes senseā¦
Mmm, just so you know, my hassio setup works perfectly, just getting the certificate error because the certificate is for my domain but it works great.
Itās just that the Control panel addon doesnāt work.
Certificate errors can lead to strange behaviorsā¦
So there is not way to have base_url set for external access but control_panel set with internal?
Yes, there is. SSL offloading, using an proxy like suggested
First off, thanks for putting this together! I would love to get this working as it looks awesome (and HADash is a pain to configure.) But alas no matter what I try, the config will not work with my set up:
Iām using hassio with duckdns addon and itās builtin self signed SSL. Accessing via my domain name works both internally and externally via https and only https.
It doesnāt matter if I use SSL or not with this addon, the farthest I can get is failed log-on errors. Is there a way to pass the API password via the config or any other thoughts?
my config
{
ālog_levelā: āinfoā,
āsslā: true,
ācertfileā: ā/ssl/fullchain.pemā,
ākeyfileā: ā/ssl/privkey.pemā,
āipv6ā: false
}http:
api_password: !secret http_password
base_url: my.duckdns.org:8123
cors_allowed_origins:
- http://my.duckdns.org:7080
- https://my.duckdns.org:7080
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem
When I open the control panel, the auto detect puts in the wrong port. I change it to 8123, but it just comes back with wrong address and asks again.
and the error from my logs:
WS 1878588432: Message incorrectly formatted: extra keys not allowed @ data[āevent_typeā]. Got āstate_changedā extra keys not allowed @ data[āidā]. Got 1 not a valid value for dictionary value @ data[ātypeā]. Got āsubscribe_eventsā required key not provided @ data[āapi_passwordā]. Got None
10:56 AM components/websocket_api.py (ERROR)
Login attempt or request with invalid authentication from 10.0.1.54
10:56 AM components/http/ban.py (WARNING)
Seems to me the problem is that it is sending http://myserver.com:8123?api_password=undefined ā if I look at the Network tab of the Chrome Dev Tools.
To get it working, I had to clear browser cookies, reload the control panel page, and when greeted with setup, choose the āManualā config option ā there it allowed me to input the api password, and was then able to connect.