Home Assistant Integration
Surface ipinsights.io threat scoring inside Home Assistant — handy for homelabs running an exposed VPN, reverse proxy or self-hosted app.
Overview
Home Assistant ships a built-in rest sensor platform. We'll define a sensor
whose value is the threat score for an IP that you set via an input helper, and a small
automation that fires a critical mobile notification when the score crosses a threshold —
ideal for "someone just hit my Nginx Proxy Manager from a known-bad IP" alerting.
Prerequisites
- Home Assistant 2024.1+ (any installation method)
- An ipinsights.io API key — your profile page
- Optional but recommended: a secrets-store entry for the key
Step 1 — Store the API Key
Add the key to secrets.yaml so it never lands in configuration.yaml:
Step 2 — Input Helper
Add an input text helper so the IP you want to look up can be set from automations / the UI.
Inside configuration.yaml:
Step 3 — REST Sensor
Restart Home Assistant (or use Developer Tools → YAML → Reload REST) to load the sensor.
Step 4 — Automation
Example automation: whenever Nginx Proxy Manager (or any source you trust to publish a
last_remote_ip sensor) reports a new IP, set the input helper and notify on a
high score. Adapt the trigger to wherever the IP comes from on your network.
Verify
- Developer Tools → States → find
sensor.ip_insights_threat_scoreand confirm the attributes are populated. - Set
input_text.ipinsights_target_ipto a Tor exit node and confirm the score jumps andis_torflips totrue. - Manually trigger the automation from the UI to make sure your mobile notification fires.
API Key: Required — store it in secrets.yaml. Find your key on
your profile page.
Request Higher API Limit
Running a high-volume Home Assistant deployment? If the default rate limit isn't enough for your environment, submit a request below and we'll review it.