Skip to content

sbender9/signalk-alarm-silencer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

signals-alarm-silencer

Greenkeeper badge

Plugin to silence SignalK Alarms

This plugin provides the ability for clients/apps to change the state and method of existing alarms.

For example, an app can clear an alarm by setting the state to normal or silence and alarm by setting the method to []

API

All messages to plugin are done using PUT requests. These can be done via HTTP or over WebSockets.

Detailed info on PUT and Request/Response

Http:

PUT http://localhost:3000/signalk/v1/api/vessels/self/propulsion/port/lowOilLevel/state
{
  "value": 'normal',
}

Delta:

{
  "context": "vessels.self",
  "requestId": "184743-434373-348483",
  "put": {
    "path": "propulsion.port.lowOilLevel.state",
    "value": 'normal'
  }
}

Set Notifcation State

PUT http://localhost:3000/signalk/v1/api/vessels/self/propulsion/port/lowOilLevel/state
{
  "value": 'normal',
}

Notification Method

The value can be a set of visual, sound or blank states to change or remove the method of notification.

PUT http://localhost:3000/signalk/v1/api/vessels/self/propulsion/port/lowOilLevel/method
{
  "value": [ "visual" ],
}

Clearing a notification

POST http://localhost:3000/plugins/alarmsilencer/clearNotification
{
   "path": "notifications.someNotification"
}