🇷🇺 Русская версия | 🇺🇸 English Version
This integration connects Home Assistant with Pangolin
Previously I used Cloudflare Zero Trust Tunnel and after switching to Pangolin I realized that I lacked monitoring, and so I decided to quickly make an addon for monitoring the status of my tunnels.
I will be glad to receive suggestions for new functionality.
- Authenticate using email and password
- Tracks tunnels/sites registered in Pangolin
- Displays state (online/offline) and stats per tunnel
- Configurable update interval (1 minute to 12 hours)
- Rounded traffic values to 2 decimal places
- Change settings after installation through Home Assistant interface
- Automatic re-authentication when token expires
- A admin user in Pangolin (normal user wont poll tunnel statuses).
- HACS installed on Home Assistant.
- You have mushroom cards installed too (optional)
- Go to Home Assistant HACS
- Click the three dots in the top right, Custom Repositories.
- Paste the URL for this repo into the Repository box, change the type to 'Integrations, and Press Add
- Go to Integrations
- Add new integration -> Pangolin Monitor
- Provide your Pangolin email, password, server base URL, and update interval (default 5 minutes)
After installing the integration, you can change settings at any time:
- Go to Settings → Devices & Services
- Find Pangolin Monitor in the integrations list
- Click on the integration
- Click Configure
- Change the update interval and save
If your credentials have changed or expired:
- In the integration settings, click Re-authenticate
- Enter new credentials
- The integration will automatically update
If you are using mushroom cards, you can use the Jinja Generator script below to generate cards for all your tunnels at once. Or you can use the built-in "Tile" component or any other component you prefer.
type: tile
entity: sensor.pangolin_monitor_tunnel_home_online
state_content:
- state
- megabytes_in
- megabytes_outImportant: Ensure that your tunnels are setup/viewable before doing this part.
- Go to Home Assistant → Developer Tools → Templates.
- Paste the Jinja code below and copy the generated YAML to your clipboard.
{% for entity in states.sensor
if entity.entity_id.startswith('sensor.pangolin_monitor_') %}
- type: custom:mushroom-template-card
primary: Tunnel {{ entity.attributes.site_name or entity.entity_id.split('_')[-1] }}
secondary: >
Status: {{ '{{ states("' ~ entity.entity_id ~ '") }}' }}
In: {{ '{{ (state_attr("' ~ entity.entity_id ~ '", "megabytes_in") / 1024) | round(2) }} GB ·
Out: {{ (state_attr("' ~ entity.entity_id ~ '", "megabytes_out") / 1024) | round(2) }} GB' }}
icon: mdi:cloud-outline
icon_color: orange
entity: {{ entity.entity_id }}
layout: horizontal
tap_action:
action: more-info
{% endfor %}- Go to your dashboard of choice, edit and create a new card as a "Manual Card" (or into a vertical-stack if there are multiple cards).
- Paste in the generated code, then add the below to the top of the code -
type: vertical-stack
cards:Note, make sure to indent the pasted code.
This project is not affiliated with or endorsed by Pangolin.