lovelylain / hass_ingress

Home Assistant ingress feature, add additional ingress panels to your Home Assistant frontend.
Apache License 2.0
31 stars 6 forks source link
custom-component home-assistant ingress

hass_ingress

GitHub actions

Hass.io provides a very nice feature called Hass.io Ingress, hass_ingress extracts this feature into a standalone integration, it allows you to add additional ingress panels to your Home Assistant frontend. The panels are listed in the sidebar and can contain external resources like the web frontend of your router, your monitoring system, or your media server. Home Assistant will take care of the authentication and the secure connection, so users can access the external resources without extra login.

overview

Features

Install

You can install this custom component by adding this repository (https://github.com/lovelylain/hass_ingress) to HACS in the settings menu of HACS first. You will find the custom component in the integration menu afterwards, look for Ingress. Alternatively, you can install it manually by copying the custom_component folder to your Home Assistant configuration folder.

Configuration

To enable Ingress panels in your installation, add the following to your configuration.yaml file, then restart HA:

ingress:
  link_automation:
    work_mode: iframe
    ui_mode: replace
    title: Automation
    icon: mdi:link
    url: /config/automation/dashboard
  frigate:
    ui_mode: toolbar
    title: Frigate
    icon: mdi:cctv
    url: http://172.30.32.2:5000
  nodered:
    require_admin: true
    title: Node-RED
    icon: mdi:sitemap
    url: http://127.0.0.1:45180
    headers:
      authorization: !secret nodered_auth
  nodered_ui:
    parent: nodered
    title: Node-RED Dashboard
    icon: mdi:monitor-dashboard
    url: http://127.0.0.1:45180
    index: /ui/
    headers:
      authorization: !secret nodered_auth

After you modify the Ingress configuration, you can go to developer-tools page and click Reload Ingress to reload without restarting HA.

reload

Configuration variables

Notice: Not all backend services can be proxied by ingress, it must use relative paths or use X-Ingress-Path http header to generate correct absolute paths. For unsupported backend services, you can try work_mode: auth to work with another domain reverse proxied by nginx, or use nginx's sub_filter to fix the absolute paths in the response.