-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Allow home 8000 assistant in MQTT configuration_url schema #96107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow homeassistant in MQTT configuration_url schema #96107
Conversation
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Hello, i tested this feature by patching the mqtt component (with The Visit button gets the proper URL (e.g. I re-tested with relative URLs (e.g. The frontend seems to be specifically designed to do this: https://github.com/home-assistant/frontend/blob/b1a909d30299486532f7ef683566295d3a282676/src/panels/config/devices/ha-config-device-page.ts#L1074 @frenck how can we have the UI open Also, after testing if i do not open the ingress URL once before cliking "Visit URL", i get a 401 error. I guess that setIngressCookie is not called when opening a So that probably means that lovelace must be modified to detect that the user is clicking some ingress-related Is there a way / API to pass a path to the ingress iframe UI URL like |
We don't. They are internal URLs not external ones.
This is an known frontend issue, Grafana also has issues like this. See the issue tracker of the frontend for more information.
no. ../Frenck |
Which issue are you referring to ? I tried https://github.com/home-assistant/frontend/issues?q=is%3Aissue+is%3Aopen+grafana but found nothing @jbouwh if the frontend needs heavy changes for this feature to be useful (the initial need was to target an ingress URL), should this PR still be pursued ? Or should i open a related issue on the Frontend project (related to initializing the ingress session when clicking the Visit button, and possibly displaying the iframe like when accessing the addons UI) ? |
Also, should this MR not be named "Allow homeassistant in mqtt configuration_url schema" ? |
Just tested this in dev and it seems there is no frontend change needed. The frontend translates the schema correctly. |
I confirm it works, but my initial usecase which was to access an ingress URL does not work without frontend modifications. The only way it works currently is to 1) access the ingress UI at least once 2) open the "Visit" link in a new tab. Do you see any alternative usecases for |
Not directly, but we could wait merging this one till the ingress frontend issues are solved? |
Found it in discussions, i'll chime in: home-assistant/frontend#11273
I think so too |
I think we could continue on this one. While there is an ingress bug, I don't see a reason to block it. One could (in theory), also link to a config panel or integration page. |
2c3887f
to
c412d0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @jbouwh 👍
../Frenck
Proposed change
Allow homeassistant in URL schema for configuration URL's. This can be used by add on's that use
hassio_ingress
and expose configuration URL's that share the Home Assistant base URL.The frontend will automatically rewite URL's with the
homeassistant
schema.Example:
homeassistant::/45df7312_zigbee2mqtt/ingress?next=/#/device/0x70ac08fffe87636c/info
will be rewritten in the frontend to:http://ha.local:8123/45df7312_zigbee2mqtt/ingress?next=/#/device/0x70ac08fffe87636c/info
. Assuminghttp://ha.local:8123
is your Home Assistant base URL.Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: