All Projects → cyberjunky → home-assistant-p2000

cyberjunky / home-assistant-p2000

Licence: MIT license
🚒 This component tracks P2000 emergency events in The Netherlands.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to home-assistant-p2000

openrgb ha
OpenRGB integration for Home Assistant
Stars: ✭ 40 (-11.11%)
Mutual labels:  homeassistant, hacs, custom-component
ha-eskom-loadshedding
Fetches loadshedding data from Eskom
Stars: ✭ 48 (+6.67%)
Mutual labels:  homeassistant, hacs, custom-component
ltss
Long time state storage (LTSS) custom component for Home Assistant using Timescale DB
Stars: ✭ 34 (-24.44%)
Mutual labels:  homeassistant, hacs, custom-component
ha-zoom-automation
Custom Home Assistant component for Zoom. Tracks when you are connected to a Zoom call by default but may allow you to track more.
Stars: ✭ 47 (+4.44%)
Mutual labels:  homeassistant, hacs, custom-component
home-assistant-frigidaire
Custom component for the Frigidaire integration
Stars: ✭ 11 (-75.56%)
Mutual labels:  homeassistant, hacs, custom-component
ledfxrm
Custom Integration for Home Assistant to control a any (local/remote) LedFX-server - State: beta
Stars: ✭ 31 (-31.11%)
Mutual labels:  homeassistant, hacs, custom-component
content-card-linky
cardLinky comptatible with sensor apiEnedis
Stars: ✭ 48 (+6.67%)
Mutual labels:  homeassistant, hacs
ha-config-ataraxis
My Home Assistant Configs. If you like what you see, please ⭐️my repo. It would encourage me a lot 🤘
Stars: ✭ 146 (+224.44%)
Mutual labels:  homeassistant, hacs
mercedes me api
Script to use Mercedes Me APIs.
Stars: ✭ 34 (-24.44%)
Mutual labels:  homeassistant, hacs
hass-livebox-component
Livebox Component for Home assistant
Stars: ✭ 24 (-46.67%)
Mutual labels:  homeassistant, hacs
hass-hue-icons
Additional vector icons for home assistant to model Philips Hue bulbs and fixtures.
Stars: ✭ 161 (+257.78%)
Mutual labels:  homeassistant, hacs
homeassistant-powercalc
Custom component to calculate estimated power consumption of lights and other appliances
Stars: ✭ 261 (+480%)
Mutual labels:  homeassistant, hacs
thermal
Thermal Vision Sensor and Camera for Home Assistant
Stars: ✭ 43 (-4.44%)
Mutual labels:  homeassistant, hacs
ha-lovelace-elapsed-time-card
Home Assistant Lovelace Custom Card to calculate time elapsed/left
Stars: ✭ 21 (-53.33%)
Mutual labels:  homeassistant, hacs
Home-Assistant-custom-components-DPC-Alert
Italy Meteo-hydro alert and hydrogeological phenomena Civil Protection (Protezione Civile). In this custom component you can find the vigilance Bulletin and the Bulletin of national hydrogeological and hydraulic criticalities. They allow to check whether in your current location there will be criticalities/warnings related to weather-hydrogeolog…
Stars: ✭ 31 (-31.11%)
Mutual labels:  homeassistant, hacs
slider-button-card
A button card with integrated slider
Stars: ✭ 319 (+608.89%)
Mutual labels:  homeassistant, hacs
homeassistant-aemet-sensor
AEMET integration for Home Assistant
Stars: ✭ 21 (-53.33%)
Mutual labels:  homeassistant, hacs
entur-card
Home Assistant Lovelace card card for the Entur public transport component.
Stars: ✭ 38 (-15.56%)
Mutual labels:  homeassistant, hacs
sensor.avanza stock
Custom component to get stock data from Avanza for Home Assistant
Stars: ✭ 30 (-33.33%)
Mutual labels:  homeassistant, hacs
ad-alexatalkingclock
Alexa (or other Smart Speakers) tell you the time without asking every hour. Please ⭐️if you like my app :)
Stars: ✭ 30 (-33.33%)
Mutual labels:  homeassistant, hacs

hacs_badge made-with-python Donate

P2000 Sensor Component

NOTE:

We now use a new RSS feed service provided by Erwin from http://p2000.brandweer-berkel-enschot.nl/ thanks! Hence this version is in beta state.

P2000 Sensor Component

This is a Custom Component for Home-Assistant (https://home-assistant.io) that tracks P2000 emergency events in The Netherlands.

About

This component queries http://p2000.brandweer-berkel-enschot.nl/ at the configured interval and applies filters for range (if lat/lon is available), discipline(s) and regio(s) set.

When events are found the P2000 sensor state gets set, which you can use to trigger automation, display sensor data, and even plot location on the map.

Installation

HACS - Recommended

  • Have HACS installed, this will allow you to easily manage and track updates.
  • Search for 'P2000'.
  • Click Install below the found integration.
  • Configure using the configuration instructions below.
  • Restart Home-Assistant.

Manual

  • Copy directory custom_components/p2000 to your <config dir>/custom_components directory.
  • Configure with config below.
  • Restart Home-Assistant.

Usage

To use this component in your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entries

sensor:
  - platform: p2000
    scan_interval: 20
    capcodes: 1403001,1403003
    icon: mdi:fire-truck
    nolocation: true
    
  - platform: p2000
    name: Amsterdam
    regios: 13
    disciplines: Politiediensten
    radius: 10000
    scan_interval: 10
    latitude: 52.3680
    longitude: 4.9036

Configuration variables:

  • regios (Optional): You can specify one, if you want more seperate them by commas, without it you trigger on all (is alot)
  • 0 = Gereserveerd
  • 1 = Groningen
  • 2 = Friesland
  • 3 = Drenthe
  • 4 = IJsselland
  • 5 = Twente
  • 6 = Noord en Oost Gelderland
  • 7 = Gelderland Midden
  • 8 = Gelderland Zuid
  • 9 = Utrecht
  • 10 = Noord Holland Noord
  • 11 = Zaanstreek-Waterland
  • 12 = Kennemerland
  • 13 = Amsterdam-Amstelland
  • 14 = Gooi en Vechtstreek
  • 15 = Haaglanden
  • 16 = Hollands Midden
  • 17 = Rotterdam Rijnmond
  • 18 = Zuid Holland Zuid
  • 19 = Zeeland
  • 20 = Midden- en West-Brabant
  • 21 = Brabant Noord
  • 22 = Brabant Zuid en Oost
  • 23 = Limburg Noord
  • 24 = Limburg Zuid
  • 25 = Flevoland
  • disciplines (Optional): Disciplines to display, separate them by commas. (default = all of them)
  • Brandweerdiensten = Brandweer
  • Ambulancediensten = Ambulance
  • Politiediensten = Politie
  • Gereserveerd = Gereserveerd
  • [Possible more of them]
  • radius (Optional): Only display on calls within this range in meters, it uses the lat/lon from your home-assistant.conf file as center or the optional latitude/longitude values.
  • scan_interval (Optional): Check every x seconds. (default = 30)
  • name (Optional): Name for sensor.
  • latitude (Optional): Latitude of center radius.
  • longitude (Optional): Longitude of center radius.
  • capcodes (Optional): Capcode(s) you want to filter on. http://capcode.nl. You can specify one, if you want more seperate them by commas. (full 7 digit notation)
  • nolocation (Optional): Set this to False if you only want events which contain location data (default = True)
  • contains (Optional): Search for events which contains this word exactly how it is written, for example GRIP

NOTE: Regarding capcodes; Make sure you specify the correct matching regio(s) in your config and remove leading 0's ie. capcode 0100001 is received as 100001

You can use a state trigger event to send push notifications like this:

# Example automation.yaml entry

automation:
  - alias: 'P2000 Bericht'
    trigger:
      platform: state
      entity_id: sensor.p2000
    condition:
      alias: "Time 07~23"
      condition: time
      after: "07:00:00"
      before: "23:00:00"
    action:
      - service_template: notify.html5
        data_template:
          title: P2000 Bericht - {{ state_attr('sensor.p2000', 'discipline') }}
          message: >
            {{ states('sensor.p2000') }} (Capcode: {{ state_attr('sensor.p2000', 'capcode') }})
          data:
            # iOS URL
            url: "https://www.google.com/maps/search/?api=1&query={{ state_attr('sensor.p2000', 'latitude') }},{{ state_attr('sensor.p2000', 'longitude') }}"
            # Android URL
            clickAction: "https://www.google.com/maps/search/?api=1&query={{ state_attr('sensor.p2000', 'latitude') }},{{ state_attr('sensor.p2000', 'longitude') }}"

Above is for html5 notify, you can click the notify message to open google maps with the lat/lon location if available in the P2000 message.

Screenshots

alt text alt text alt text

Lovelace card example:

cards:
      - entity: sensor.p2000
        name: P2000 Dordrecht
        type: sensor
      - entity: sensor.amsterdam
        icon: 'mdi:fire-truck'
        name: P2000 Amsterdam
        type: sensor
      - default_zoom: 7
        entities:
          - entity: sensor.p2000
          - entity: zone.home
          - entity: sensor.amsterdam
        title: P2000 Dordrecht & Amsterdam
        type: map

Debugging

If you experience unexpected output, please create an issue. Share your configuration and post some debug log info. You can obtain this by adding this line to your config and restart homeassistant.

logger:
  default: info
  logs:
      custom_components.p2000: debug

Donation

Donate

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].