Repository navigation
FAQ
PagerAlarm ist ein MicroPython-Projekt für den D1 Mini (ESP8266), das erkennt, wenn ein Feuerwehr-Pager in der Dockingstation über einen Alarm ausgelöst wird und über MQTT diesen Alarm weitergibt.
Das System erkennt nicht den Melder selbst, sondern den elektrischen Kontakt über ein verbautes Relais an der Dockingstation vom Melder. Jeder Pager oder Melder, der einen Schließkontakt bei der Dockingstation hat, funktioniert.
An der Stelle habe ich schon ein Node Red und MQTT-Broker in meinem Heimnetz, der mit meiner Heimautomation gekoppelt ist. Es gibt Anleitungen, die ein ähnliches Konzept mit Node Red direkt an einem Raspberry Pi Zero 2 zeigen. Mein Problem an der Stelle, der Raspberry Pi Zero 2 und die Dockingstation vom Melder brauchen eine separate Spannungsversorgnung, was ich nicht wollte.
Nein. Ein Standard-D1 Mini (~3-5 €), ein paar Stiftleisten und ein selbst gefrästes PCB reichen. Das Gehäuse ist optional. Bei den Airbus Defence & Space - Meldern ist ein spezieller Stecker notwendig. Diesen findest du auf Amazon unter folgendem Link. Bei anderen Pagern / Dockingstations ist ggf. ein anderer Stecker nötig.
Ja, aber die Pin-Belegung und teilweise die Bibliotheken (umqtt.simple, MicroPython-Version) unterscheiden sich. Der Code muss dafür von dir angepasst werden.
1.19 oder neuer für ESP8266. Ältere Versionen können Probleme mit umqtt.simple haben. Meine Empfehlung an der Stelle, "Neu ist immer besser"
Ja. Passe COOLDOWN_MS in config_dock.py an
COOLDOWN_MS = 40000 # 40 Sekunden (Default)
COOLDOWN_MS = 10000 # 10 Sekunden (für Tests)
COOLDOWN_MS = 120000 # 2 Minuten (weniger empfindlich)Das ist das gewünschte Verhalten! Der 40-Sekunden-Cooldown verhindert, dass bei einem wackeligen Kontakt oder versehentlichem Aus- und Wieder-Einstecken dutzende Alarme ausgelöst werden. Zudem kann ich aus meiner Erfahrung sagen, dass eine Nachalamierung oder Änderung der Alamierung nicht unter einer Minute erfolgt.
Die PCB-Platine musst du dir selber fräsen oder über einen Anbieter herstellen lassen. Hast du eine kleine Fräse daheim, kannst du diese darauf fertigen. Den D1 Mini kannst du bei üblichen Onlineshops erwerben.
Die grundlegende Shaltung ist nicht kompliziert, einzig die Stromversorgung zum D1 Mini und Melder könnte kompliziert werden. Es steht dir aber natürlich frei, den Grundaufbau anders umzusetzen.
Ja. Das Gehäuse ist rein optisch/praktisch. Die Platine kann auch frei verbaut werden. Dabei ist aber darauf zu achten, dass freie Kontaktpunkte zu Kurzschlüsse und Fehlverhalten führen kann.
- Typ B = Stromversorgung für die PCB und Melder (z.B. von einem USB-Netzteil)
- Typ A = Stromausgang zur Dockingstation
Ja, bei einer Standard-5mm-LED bei 3,3 V. Für helle/high-power LEDs evtl. 220 Ω verwenden.
Nein die Platine ist so aufgebaut, dass der Widerstand, sofern du auch die LED nicht nutzen willst, nicht verlöten musst.
Ja, dieses Projekt zielt darauf ab, dass der Melderalarm-Status an einen MQTT-Broker gesendet wird. Das ist mit einem Raspberry Pi oder freie Heimautomation kein Hexenwerk und schnell erledigt.
Nein. Node-RED ist optional. Du kannst den MQTT-Alarm auch in Home Assistant, OpenHAB oder jedem anderen MQTT-Subscriber verarbeiten.
Ja. Der Node-RED Flow ist nur ein Beispiel. Du kannst die Nachricht auch per E-Mail, Discord, Pushover, Signal etc. senden — dafür gibt es entsprechende Node-RED-Nodes. In meinem Fall nutze ich Telegram und weitere Flows, die auf die Melderauslösung reagieren. Stichwort hier: Lichtsteuerung zur Haustür bei Alamierung in der Dämmerung oder Nachts.
Nein. Der Broker läuft in deinem lokalen Netzwerk. Du musst selbst einen Broker betreiben (z.B. Mosquitto auf einem Raspberry Pi). Eine Anleitung findest du schnell im Internet. Solltest du schon eine Heimautomation laufen haben, prüfe doch mal, ob da nicht schon ein MQTT-Broker mitläuft!
QoS 2 garantiert exactly-once delivery. Für Alarme ist das ideal, weil keine Nachricht verloren geht. Es ist aber langsamer als QoS 0 oder 1. Für schnellere Reaktionszeiten kannst du auf QoS 1 umstellen.
Wenn dein MQTT-Broker ungesichert im Netzwerk läuft oder über das Internet erreichbar ist: Ja.
Empfohlene Maßnahmen:
- MQTT-Authentifizierung aktivieren (
MQTT_USER/MQTT_PASS) - TLS-Verschlüsselung für MQTT verwenden
- Broker nicht aus dem Internet erreichbar machen (ohne VPN)
Der Hardware-Watchdog setzt den D1 Mini nach ~1,7 Sekunden zurück. Danach verbindet er sich neu mit WiFi und MQTT. Damit sollte einem Absturz oder Freeze vorgebeugt sein.
PagerAlarm is a MicroPython project for the D1 Mini (ESP8266) that detects when a fire department pager triggers an alarm in the docking station and forwards this alarm via MQTT.
The system does not detect the alert device itself, but the electrical contact via a built-in relay at the docking station of the alert device. Any pager or alert device that has a contact closure at the docking station will work.
At this point I already have a Node-RED and MQTT broker in my home network, which is coupled with my home automation. There are guides that show a similar concept with Node-RED directly on a Raspberry Pi Zero 2. My problem at this point is that the Raspberry Pi Zero 2 and the alert device's docking station require a separate power supply, which I didn't want.
No. A standard D1 Mini (~3-5 €), a few pin headers, and a self-milled PCB are sufficient. The housing is optional. For Airbus Defence & Space devices, a special connector is required. You can find it on Amazon at this link. Other pagers / docking stations may require a different connector.
Yes, but the pin layout and some libraries (umqtt.simple, MicroPython version) differ. The code needs to be adapted by you.
1.19 or newer for ESP8266. Older versions may have issues with umqtt.simple. My recommendation: "Newer is always better"
Yes. Adjust COOLDOWN_MS in config_dock.py
COOLDOWN_MS = 40000 # 40 seconds (Default)
COOLDOWN_MS = 10000 # 10 seconds (for testing)
COOLDOWN_MS = 120000 # 2 minutes (less sensitive)That is the intended behavior! The 40-second cooldown prevents dozens of alarms from being triggered by a loose contact or accidental removal and re-insertion. Additionally, based on my experience, re-alarms or alarm changes do not occur within one minute.
You need to mill or have the PCB manufactured yourself. If you have a small mill at home, you can produce it yourself. You can purchase the D1 Mini from usual online shops.
The basic circuit is not complicated, but the power supply to the D1 Mini and the alert device could become complicated. However, you are of course free to implement the basic setup differently.
Yes. The housing is purely cosmetic/practical. The board can also be mounted freely. However, make sure that exposed contact points can cause short circuits and malfunction.
- Type B = Power supply for the PCB and alert device (e.g. from a USB power adapter)
- Type A = Power output to the docking station
Yes, for a standard 5 mm LED at 3.3 V. For bright/high-power LEDs, use 220 Ω instead.
No, the board is designed so that you don't have to solder the resistor if you don't want to use the LED either.
Yes, this project is designed to send the alert device alarm status to an MQTT broker. This is easily done with a Raspberry Pi or existing home automation and is quickly set up.
No. Node-RED is optional. You can also process the MQTT alarm in Home Assistant, OpenHAB, or any other MQTT subscriber.
Yes. The Node-RED flow is just an example. You can also send the message via email, Discord, Pushover, Signal, etc. — there are corresponding Node-RED nodes for that. In my case, I use Telegram and additional flows that react to the alarm trigger. Key point here: door lighting control when alarming at dusk or at night.
No. The broker runs in your local network. You must operate your own broker (e.g. Mosquitto on a Raspberry Pi). You can quickly find instructions on the Internet. If you already have home automation running, check if an MQTT broker is already running there!
QoS 2 guarantees exactly-once delivery. For alarms, this is ideal because no message is lost. But it is slower than QoS 0 or 1. For faster response times, you can switch to QoS 1.
If your MQTT broker runs unsecured on the network or is accessible from the internet: Yes.
Recommended measures:
- Enable MQTT authentication (
MQTT_USER/MQTT_PASS) - Use TLS encryption for MQTT
- Do not make the broker accessible from the internet (without VPN)
The hardware watchdog resets the D1 Mini after ~1.7 seconds. After that, it reconnects to WiFi and MQTT. This should prevent a crash or freeze.
Fehlt eine Frage? / Missing a question? Bearbeite diese Seite oder erstelle ein Issue im Repository! / Edit this page or create an issue in the repository!