active911-snpp-client
v0.2.2
Published
A simple SNPP Client for Active911 Alert Generation
Downloads
2
Readme
active911-snpp-client
A simple SNPP Client for Active911 Alert Generation
Get it now on npm!
npm install active911-snpp-client
Basic Usage
const { Alert } = require("active911-snpp-client");
// Create a new alert, using CADPage format (see below)
const alert = new Alert({
call: "Car Crash",
place: "Burgerville",
address: "123 N 1st ST",
city: "Pleasentville",
priority: "HIGH",
timeout: 10*1000, // 10 seconds
});
// Attach some non-CAD meta data
alert.set("META_DATA_FIELD_1", "More data")
alert.set("META_DATA_FIELD_2", "Even more data")
// Send the alert
await alert.send({
host: "snpp.active911.com",
port: 444,
pager_id: "1234-abCdeAF", // example only, this should be your custom alert email address; see below
})
CLI
Or, if you prefer, you can use this on the command line. First install the tool globally:
npm install active911-snpp-client
Then you can,
a911-snpp \
--host "snpp.active911.com" \
--pager-id "1234-abCdeAF" \
--call "Car Crash" \
--place "Burgerville" \
--address "123 N 1st ST" \
--city "Pleasentville" \
--info "Some info" \
--unit "Unit" \
--detail "META_DATA_1=more info" \
--detail "META_DATA_2=even more info"
See a911-snpp --help
for more information
Active911 Reference
Active911's documentation for using SNPP can be found here.
Active911's documentation on messaging format can be found here.