Coder Social home page Coder Social logo

ha_divera-alarm's Introduction

ARCHIVED

As @fwmarcel created a custom integration for Home Assistant I'm going to archive my workaround. It's much easier to use his custom integration over here: https://github.com/fwmarcel/home-assistant-divera

Home Assistant Divera Alarm

I currently noticed that there isn't any documented way on how to get the Divera alarms into Home Assistant. Sadly I'm not able to create my own integration for it, but I show you my workaround to get the alarms into Home Assistant

1. Get your user accesskey from Divera

  1. Login to the Divera website
  2. Open the settings
  3. Inside the "debug" tab you can find your user-accesskey

image

2. Create two rest sensors

See sensor.yaml

Replace the <ACCESSSKEY> three times (line 9, 34, 36) with your user-accesskey, which you noted in the first step.

Explanation:

sensor.divera_id

The first sensor just checks, if a new alarm-id is available. This sensor is updated every 60 seconds. If you need to check more often, you can set the value down to 30 seconds. The state of this sensor is mostly empty and only shows the alarm-id when there is an alarm which isn't archived.

sensor.divera_alarm

The second sensor get the details for the new alarm. To get the details for the alarm, we need to know the current alarm-id, so we use the state from sensor.divera_id (from the first sensor) inside the second rest call. This sensor is only updated automatically once a week, because we trigger the update of this sensor via the blueprint/automation.

This sensor sensor.divera_alarm show the following values:

image

State: Shows the title of the alarm
Attributes:  
  text: return the text of the alarm. Inside the app this attribute is called "Nachricht"
  address: address of the alarm location
  new: Was the alarm already read inside divera app?
  lat: GPS latitude of the alarm location
  lng: GPS longitude of the alarm location
  closed: is the alarm already closed?
  duration: show the duration, after the alarm is closed

3. Create an automation

Preffered/easy way: Use my prebuild blueprint

Click this link:

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Or add the blueprint manually:

Go to Configuration and then Blueprints. Click on the blue “Import Blueprint" button in the bottom right. Add the following URL: https://github.com/N1c093/HA_divera-alarm/blob/main/blueprint_divera_alarm.yaml

Alternative way: Use my automation

See automation.yaml

Additional template sensor

If you want to display the alarm text or the alarm location in the lovelace view, you can create some template sensor. I created two template sensor. One sensor for the alarm location and one for the alarm text.

The sensor sensor.divera_alarm_location can be used inside the lovelace map, so you can see the alarm location on the map.

See configuration.yaml

Have fun with your Divera alarms inside Home Assistant

If there is anything unclear with my explanation or you find a problem, just open a new discussion or an issue.

ha_divera-alarm's People

Contributors

n1c093 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.