Community Hass.io Add-on: Home Assistant Control Panel

I guess so!

Homebridge was the first add-on I created. Using it as a template ever since :blush:

1 Like

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.

1 Like

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.

  1. Does it auto update?
  2. How do I change the view like you have?

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.

10 Likes

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)


-Text size for weather condition is to big, overlays the panels.
-Text size within panels to big (see pic)

Request:
-Different languages (German), I can help translate.

Welp. Iā€™m officially in love with @frenck now!

1 Like

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 :wink:

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 :wink:

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.

4 Likes

@frenck The Tenck, you rule. Does each device display itā€™s own unique panel?