-
Notifications
You must be signed in to change notification settings - Fork 0
Home
INTERNE NOTIZEN: DURATION wird immer überschrieben bei neuem raise | delay wird nie überschrrieben, sondern nur gesetzt, wenn keins vorhanden ist | alarme mit ACK können mit gleicher oder höhere PRIO überschrieben werden, falls die PRIO niedriger ist, dann wird dieser wert gespeichert und übernommen sobald quttiert wird
AlarmWatcher can be installed either using Docker for a quick and easy setup or manually using the non-Docker method. Follow the instructions below based on your preferred installation approach.
Docker is the fastest way to get AlarmWatcher up and running with minimal configuration.
Note
AlarmWatcher supports only x64 systems. 32-bit systems are not compatible.
To install via Docker, simply run the following command:
docker run -d --restart=always -p 3777:3777 -p 3778:3778 -v alarmwatcher_data:/usr/src/app/data --name alarmwatcher johnnyde/alarmwatcher:latest
Once the container is up and running, you can access AlarmWatcher by navigating to http://localhost:3777/ or https://localhost:3778/.
If you prefer a manual setup, you can install AlarmWatcher without Docker by following the steps below.
Note
AlarmWatcher only supports x64 systems. Please ensure that your system meets this requirement, as 32-bit systems are not supported.
Before installing, make sure your system meets the following requirements:
- Platform:
- major Linux distributions such as Debian, Ubuntu, etc.
- Windows 10 or Windows Server 2012 R2 or higher
- Node.js - tested with version 20.17.0
- npm - tested with version 10.8.2
- Git
- pm2
To install AlarmWatcher manually, execute the following commands in your terminal:
git clone https://github.com/johnny-de/alarmwatcher.git
cd alarmwatcher
npm run setup
# Install PM2 if you don't have it:
npm install pm2 -g && pm2 install pm2-logrotate
# Start server
pm2 start server.js --name alarmwatcher
Here are some handy commands for managing your PM2 processes:
# Monitor current console output:
pm2 monit
# Enable automatic startup:
pm2 save && pm2 startup
Alarmwatcher is now running on http://localhost:3777/.
For detailed API documentation, please refer to the Swagger documentation available at http://localhost:3777/api-docs/
after installing AlarmWatcher. This interactive documentation allows you to test the http API endpoints directly within your browser.
The AlarmWatcher API provides several endpoints for managing alarms. Here’s a brief overview of the most important functions:
-
Get Server Time:
/api/serverTime
(GET) - Returns the current server time as a UNIX timestamp. -
Raise Alarm:
/api/raiseAlarm
(GET) - Requires alarm_id and alarm_class. Confirms alarm insertion. -
Acknowledge Alarm:
/api/ackAlarm
(GET) - Requires alarm_id. Confirms acknowledgment of the alarm. -
Clear Alarm:
/api/clearAlarm
(GET) - Requires alarm_id. Confirms deletion of the alarm. -
Get Alarms:
/api/getAlarms
(GET) - Returns a JSON array of alarms. Optional filters: alarm_id, before, after.
AlarmWatcher supports browser notifications to alert you about new alarms in real time. However, due to browser security settings, notifications are only allowed when AlarmWatcher is accessed through http://localhost:3777/
. Accessing the application from a different device on your network or using an external URL will prevent notifications from functioning.
Since AlarmWatcher uses HTTP (not HTTPS), some browsers require you to manually enable notifications in their settings.
The time and timezone used by AlarmWatcher is determined by the timezone settings of the PC on which it is opened. To adjust the displayed time, simply modify the settings on your computer.
The date and time format is defined by the browser settings. In most modern browsers, this is reflected by the language used. To change the date and time format, simply adjust the language settings in your browser, and AlarmWatcher will adapt accordingly.
The dark mode setting is also defined by your browser preferences. To enable or disable dark mode, modify the browser settings as needed.