diff --git a/README.md b/README.md new file mode 100644 index 0000000..b9d9146 --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# NotificationLatch + +Filters notifications so that each one is only sent once until it is reactivated. Designed for use with Domoticz. At the time of writing only Pushover is supported as a target transport. + +## Installing + +Install Node.js, at least the current LTS version. + +Install the dependencies and build the frontend: +``` +npm install +cd frontend +npm install +npm run build +cd .. +``` +Install PM2 and run the backend service: +``` +npm install pm2 -g +pm2 startup +pm2 start .\ecosystem.config.js +pm2 save +``` + +## Configuring Domoticz + +Go to Setup - Settings - Notifications. Enable Custom HTTP/Action and fill in the following information: + +| Field | Value | +|--|--| +| URL/Action | ```http://localhost:3369/api/notification``` | +| POST Data: | ```subject=#SUBJECT&message=#MESSAGE&priority=#PRIORITY``` | +| POST Content-Type: | ```application/x-www-form-urlencoded``` | +| POST Headers: | ```Authorization: Bearer ``` | \ No newline at end of file diff --git a/ecosystem.config.js b/ecosystem.config.js new file mode 100644 index 0000000..e4220c2 --- /dev/null +++ b/ecosystem.config.js @@ -0,0 +1,6 @@ +module.exports = { + apps : [{ + name : "NotificationLatch", + script : "./index.js" + }] +}