SignalK / signalk-zones

Signal K Node server plugin to handle zones: value ranges per Signal K key
Apache License 2.0
2 stars 5 forks source link

null values for state, message and method #11

Closed sailoog closed 2 years ago

sailoog commented 7 years ago

When I set a zone but a notification is not triggered yet, this is what I get in full data model:

  "notifications": {
    "navigation": {
      "speedOverGround": {
        "value": null,
        "$source": "self.notificationhandler.XX"
      }
    },

when limits are overcomed and a notification is triggered, this changes to:

  "notifications": {
    "navigation": {
      "speedOverGround": {
        "value": null,
        "$source": "self.notificationhandler.XX",
        "state": "alert",
        "message": "xxxxxx",
        "method": [
          "visual",
          "sound"
        ]
      }
    },

Would not it make more sense something like this for the first case?

  "notifications": {
    "navigation": {
      "speedOverGround": {
        "$source": "self.notificationhandler.XX",
        "state": null,
        "message": null,
        "method":null
      }
    },

Could this be possible? My intention is to use signal k alarms system as triggers for actions in openplotter. The menu to select triggers is built from the existing leaves from full data model and this way we could select "state" or "message" as trigger. I miss also a timestamp.

I like the web interface of zones plugin. I got a SK crash when testing but I was no able to reproduce it again. Thanks.