Template

Send SIA events as Prowl notifications
Post Reply
gol
Webbplatsadministratör
Posts: 81
Joined: Sun 01 Jun 2014, 19:38

Template

Post by gol » Tue 17 Jun 2014, 18:00

This is a program template written in Javascript that can be used to send SIA-events from the SPC panel to iOS by Prowl.
To use this program you need to install the Prowl App, create an account on http://www.prowlapp.com/ and get a API-key.

To be able to run the program you need to install NodeJS and some NodeJS addon modules.

Install NodeJS

Code: Select all

sudo apt-get update
sudo wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
Check the installation with: node -v

Install required addon modules

Code: Select all

cd <INSTALL_DIR>
sudo npm install websocket
sudo npm install node-prowl
Install spc-notify-prowl

Code: Select all

cd <INSTALL_DIR>
tar xzvf spc-notify-prowl.tar.gz
cd spc-notify-prowl
Modify the settings in config.json according your environment and API-key.
In spc-notify-prowl.js, function manageSiaEvent() you have to add all SIA-event types you want to be managed by the program. Look in the SPC documentation for definitions of the SIA-event types.

Run the program with: ./spc-notify-prowl.js
Attachments
spc-notify-prowl-1.0.tar.gz
(1.47 KiB) Downloaded 314 times

Post Reply