Skip to content
sqall01 edited this page Jun 15, 2019 · 30 revisions

Tutorials

In this document a list of existing official tutorials for AlertR are shown.

If a tutorial is missing or you have an idea that is not shown there, feel free to write one yourself and contribute it. It would be great if other users can benefit from your contribution.

Please make sure you read the Installation documentation to understand how the installation works. As a starting point, use the Server Tutorial and then add easy to use clients such as the AlertR Sensor Client Ping and AlertR Manager Client Console to your test configuration.

List of Tutorials

AlertR Alert Clients

AlertR Manager Clients

AlertR Sensor Clients

AlertR Server

Developers

AlertR Alert Client Dbus

This tutorial describes the basic installation and configuration of the AlertR Alert Client Dbus. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
AlertR Alert Client Dbus
------------------------
Instance:
alertClientDbus

Type:
alert

Version:
0.501-0

Dependencies:
1: dbus (lowest version: 1.2.0)

Description:
This client handles triggered alerts and is written to show a message notification via D-Bus. It works with all window managers that support D-Bus and implement the freedesktop.org specification. For example, you can run it as a service on your workstation and as soon as an event happens (front door opens, door bell rings, service goes down, incoming phone call, and so on) it shows a notification on the display.
[...]

AlertR Alert Client Dbus Tutorial

AlertR Alert Client Executer

This tutorial describes the basic installation and configuration of the AlertR Alert Client Executer. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
AlertR Alert Client Executer
----------------------------
Instance:
alertClientExecuter

Type:
alert

Version:
0.400-1

Dependencies:
None

Description:
This client handles triggered alerts and is written to execute a configured script or command with arguments. The arguments are configured and the command is executed on a triggered sensor alert event or when all alerts are stopped. For example you can start a init script on a Linux system when a sensor alert was triggered and when all alerts are stopped the init script is stopped.
[...]

AlertR Alert Client Executer Tutorial

AlertR Alert Client Push Notification

This tutorial describes the basic installation and configuration of the AlertR Alert Client Push Notification. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
AlertR Alert Client Push Notification
-------------------------------------
Instance:
alertClientPushNotification

Type:
alert

Version:
0.501-2

Dependencies:
1: lightweightpush (pip packet: lightweightpush) (lowest version: 0.0.5)

Description:
This client handles triggered sensor alerts and is written to send an end-to-end encrypted push notification on the configured channel when it receives a sensor alert. It needs an account at https://alertr.de and the receiving devices to have the AlertR app installed. For each alert you configure, you can customize the message content by using template files. Special keywords will be replaced by information about the received sensor alert.
[...]

AlertR Alert Client Push Notification Tutorial

AlertR Alert Client Raspberry Pi - Siren

This tutorial describes the basic installation and configuration of the AlertR Alert Client Raspberry Pi. It focuses on connecting a homemade siren to the Raspberry Pi. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
AlertR Alert Client Raspberry Pi
--------------------------------
Instance:
alertClientRaspberryPi

Type:
alert

Version:
0.501-0

Dependencies:
1: RPi.GPIO (lowest version: 0.5.2)

Description:
This client handles triggered alerts and is written to set/unset GPIO pins of a Raspberry Pi. This means it gets notified by the server if an alert was triggered by a sensor and can set/unset configured GPIO pins, for example, to activate a siren or something else.
[...]

AlertR Alert Client Raspberry Pi - Siren Tutorial

AlertR Manager Client Console

This tutorial describes the basic installation and configuration of the AlertR Manager Client Console. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
AlertR Manager Client Console
-----------------------------
Instance:
managerClientConsole

Type:
manager

Version:
0.400-1

Dependencies:
1: urwid (pip packet: urwid) (lowest version: 1.1.1)

Description:
This client is a manager client for the alert system. It shows the current state of all sensors, the sensor and alert clients and if the alert system is activated or not.
[...]

AlertR Manager Client Console Tutorial

AlertR Manager Client Database

This tutorial describes the basic installation and configuration of the AlertR Manger Client Database. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
AlertR Manger Client Database
-----------------------------
Instance:
managerClientDatabase

Type:
manager

Version:
0.400-1

Dependencies:
1: MySQLdb (pip packet: MySQL-python) (lowest version: 1.2.3)

Description:
This client stores the state of the alert system in a database for external usage. It uses a MySQL db to store all information about the alert system and events that occur (for example a client that disconnected from the alert system). External components, such as a website, can use the information in the database for their purposes. In the case of a website, it can process the data and show a visualization to the user. In order to let external components interact with the alert system, the manager client contains a local UNIX socket server which can be contacted.
[...]

AlertR Manager Client Database Tutorial

AlertR Manager Client Keypad

This tutorial describes the basic installation and configuration of the AlertR Manager Client Keypad. It also shows a usual setup environment in which it can be used. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
AlertR Manager Client Keypad
----------------------------
Instance:
managerClientKeypad

Type:
manager

Version:
0.502-0

Dependencies:
1: urwid (pip packet: urwid) (lowest version: 1.1.1)

Description:
This client manages the state of the alarm system. It can activate or deactivate it. You have to enter a PIN before you can activate the alarm system, deactivate it or activate it with a configured delay. It is written to work as a client with keypad and small display (original for a Raspbery Pi, but is not limited to it). The client should be near an entrance to allow the user to activate/deactivate the alarm system when she leaves/enters.
[...]

AlertR Manager Client Keypad Tutorial

AlertR Sensor Client Executer

This tutorial describes the basic installation and configuration of the AlertR Sensor Client Executer. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
AlertR Sensor Client Executer
-----------------------------
Instance:
sensorClientExecuter

Type:
sensor

Version:
0.502-0

Dependencies:
None

Description:
This client handles watchdog scripts as sensors and informs the server if a sensor has triggered and/or the state of a sensor has changed. This means it executes configured watchdog scripts in an interval that check a service. Each sensor is basically a cronjob for the AlertR system. The sensor has two options to be triggered: 1) The sensor is triggered if the watchdog script exits with an exit code not equal to 0 or a time out. 2) The watchdog script outputs that the sensor should be triggered with the help of a well-defined protocol or a time out (see the developer tutorials for examples). For instance, you can execute a script that checks if the Internet connection is available and which triggers a sensor alert if no Internet connection is up.
[...]

AlertR Sensor Client Executer Tutorial

AlertR Sensor Client Executer- lm-sensors

This tutorial describes the integration of the Linux tool "lm-sensors" into the AlertR system. With the help of it, you are able to integrate all sensors that can be read by "lm-sensors" (for example CPU temperature) into your infrastructure and utilize them as any other of your AlertR sensor. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
AlertR Sensor Client Executer
-----------------------------
Instance:
sensorClientExecuter

Type:
sensor

Version:
0.502-0

Dependencies:
None

Description:
This client handles watchdog scripts as sensors and informs the server if a sensor has triggered and/or the state of a sensor has changed. This means it executes configured watchdog scripts in an interval that check a service. Each sensor is basically a cronjob for the AlertR system. The sensor has two options to be triggered: 1) The sensor is triggered if the watchdog script exits with an exit code not equal to 0 or a time out. 2) The watchdog script outputs that the sensor should be triggered with the help of a well-defined protocol or a time out (see the developer tutorials for examples). For instance, you can execute a script that checks if the Internet connection is available and which triggers a sensor alert if no Internet connection is up.
[...]

AlertR Sensor Client Executer - lm-sensors Tutorial

AlertR Sensor Client FIFO

This tutorial describes the basic installation and configuration of the AlertR Sensor Client FIFO. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
AlertR Sensor Client FIFO
-------------------------
Instance:
sensorClientFIFO

Type:
sensor

Version:
0.502-0

Dependencies:
None

Description:
This client is build for the integration of already developed scripts or other software into the AlertR infrastructure as a sensor. For each sensor it creates a FIFO file on the file system and monitors it. Other scripts/programs can write into the FIFO file to change the state of the associated sensor. For example, you can use a cronjob to write into the FIFO file at specific times to trigger a sensor event, or use the ISC DHCP server to write into the FIFO file each time a client in a specific subnet requests an IP address.
[...]

AlertR Sensor Client FIFO Tutorial

AlertR Sensor Client Ping

This tutorial describes the basic installation and configuration of the AlertR Sensor Client Ping. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
AlertR Sensor Client Ping
-------------------------
Instance:
sensorClientPing

Type:
sensor

Version:
0.400-1

Dependencies:
None

Description:
This client is specialized to just ping a server as a sensor and informing the AlertR server if a pinged host is reachable or not. The sensor is triggered if the server is not reachable or a time out occur.
[...]

AlertR Sensor Client Ping Tutorial

AlertR Sensor Client Raspberry Pi - Switch (Polling)

This tutorial describes the basic installation and configuration of the AlertR Sensor Client Raspberry Pi. It focuses on connecting two switches (one switch that monitors a window and one mechanical switch) to the Raspberry Pi. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
AlertR Sensor Client Raspberry Pi
---------------------------------
Instance:
sensorClientRaspberryPi

Type:
sensor

Version:
0.400-1

Dependencies:
1: RPi.GPIO (lowest version: 0.5.2)

Description:
This client handles Raspberry Pi GPIO pins as sensors. It either polls the state of a GPIO pin or uses an interrupt on a falling/rising edge and triggers an alert if the state has changed/interrupt has occurred (or a state change if it goes back from a state in which it triggers an alert to a normal state). This means it notifies the server if an alert was triggered by a sensor. A sensor connected to the GPIO pin can be anything you like for example a PIR (Passive InfraRed) sensor, a magnetic switch on a window, a water leak alarm sensor, a smoke detector and so on.
[...]

AlertR Sensor Client Raspberry Pi - Switch (Polling) Tutorial

AlertR Sensor Client Raspberry Pi - Door Bell (Interrupt)

This tutorial describes the basic installation and configuration of the AlertR Sensor Client Raspberry Pi. It focuses on connecting a door bell to the Raspberry Pi. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
AlertR Sensor Client Raspberry Pi
---------------------------------
Instance:
sensorClientRaspberryPi

Type:
sensor

Version:
0.400-1

Dependencies:
1: RPi.GPIO (lowest version: 0.5.2)

Description:
This client handles Raspberry Pi GPIO pins as sensors. It either polls the state of a GPIO pin or uses an interrupt on a falling/rising edge and triggers an alert if the state has changed/interrupt has occurred (or a state change if it goes back from a state in which it triggers an alert to a normal state). This means it notifies the server if an alert was triggered by a sensor. A sensor connected to the GPIO pin can be anything you like for example a PIR (Passive InfraRed) sensor, a magnetic switch on a window, a water leak alarm sensor, a smoke detector and so on.
[...]

AlertR Sensor Client Raspberry Pi - Door Bell (Interrupt) Tutorial

AlertR Sensor Client Raspberry Pi - DS18B20

This tutorial describes the basic installation and configuration of the AlertR Sensor Client Raspberry Pi. It focuses on connecting two DS18B20 temperature sensors to the Raspberry Pi. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
AlertR Sensor Client Raspberry Pi
---------------------------------
Instance:
sensorClientRaspberryPi

Type:
sensor

Version:
0.400-1

Dependencies:
1: RPi.GPIO (lowest version: 0.5.2)

Description:
This client handles Raspberry Pi GPIO pins as sensors. It either polls the state of a GPIO pin or uses an interrupt on a falling/rising edge and triggers an alert if the state has changed/interrupt has occurred (or a state change if it goes back from a state in which it triggers an alert to a normal state). This means it notifies the server if an alert was triggered by a sensor. A sensor connected to the GPIO pin can be anything you like for example a PIR (Passive InfraRed) sensor, a magnetic switch on a window, a water leak alarm sensor, a smoke detector and so on.
[...]

AlertR Sensor Client Raspberry Pi - DS18B20 Tutorial

AlertR Server

This tutorial describes the basic installation and configuration of the AlertR Server. The client is described as the following by the installation script:

sqall@towel:~$ python alertRinstaller.py -l

[...]
AlertR Server
-------------
Instance:
server

Type:
server

Version:
0.400-1

Dependencies:
1: MySQLdb (pip packet: MySQL-python) (lowest version: 1.2.3)

Description:
This is the server that handles the logic of the alert system. It is mandatory in order to use AlertR. It uses either MySQL or SQLite as storage backend. As user backend it uses (at the moment) only a csv file.
[...]

AlertR Server Tutorial

Developer - AlertR Sensor Client Executer Output

This tutorial describes how to create a basic script that is executed by the AlertR Sensor Client Executer and its exit code is processed by AlertR.

Developer - AlertR Sensor Client Executer Output Tutorial

Developer - AlertR Sensor Client Executer Processable Output

This tutorial describes how to create a basic script that is executed by the AlertR Sensor Client Executer and its output is processed by AlertR.

Developer - AlertR Sensor Client Executer Processable Output Tutorial

Developer - AlertR Sensor Client FIFO Write

This tutorial describes how to create a basic script that writes into a FIFO file provided by the AlertR Sensor FIFO Executer. With a FIFO file you can trigger an event in the AlertR system as soon as it occurs in contrast to the AlertR Sensor Client Executer which executes scripts in an interval.

Developer - AlertR Sensor Client FIFO Write

Developer - Instrument Sensor Alerts

This tutorial describes how you can instrument every sensor alert event in AlertR. As example scenario it explains how to setup a reminder for an open window in winter in order to not forget to close it.

Developer - Instrument Sensor Alerts

Clone this wiki locally