Timberwolf - How do i clear a notification in N...

How do i clear a notification in Node red? I am creating a notification when the fuel level is low, but how do i clear that noptificatiobn when the level is back to normal? As i undersans it i should set the notification value to Null, but i'm not sure how to do that in Node red.
9 Replies
Scott Bender
Scott Bender5mo ago
Send the notification again with state set to “normal”
Henry
Henry5mo ago
Use the trigger function to have it reset.
Timberwolf
Timberwolf5mo ago
But as i understand it the way to clear a notification is to send it with Null as value. Is sending with state normal the same thing?
Scott Bender
Scott Bender5mo ago
Your understanding is not correct. The correct way to “clear” a notification is to set it to normal. The notification remains, but it is no longer in a bad state.
Timberwolf
Timberwolf5mo ago
OK. i must have misunderstood this in the documentation at https://signalk.org/specification/1.7.0/doc/notifications.html: To clear the alarm condition, send: { "context": "vessels.urn:mrn:signalk:uuid:c0d79334-4e25-4245-8892-54e8ccc8021d", "updates": [ { "source": {...}, "timestamp": "2017-08-15T16:00:05.538Z", "values": [ { "path": "notifications.mob", "value": null } ] } ] }
Scott Bender
Scott Bender5mo ago
lol. Didn’t realize that was in there. I guess that would work too. Not sure there’s a way to do that on node-red. 99% of the plugins and even n2k alarms clear by setting the state.
Timberwolf
Timberwolf5mo ago
It was possible to send a delta and specify the value as a JSON string, but your solution is much more straight foreward
gregy
gregy5mo ago
i use a “send notification node” …. and its its config there is an entry for “set to normal” … this clears notification for the specific path specified
gregy
gregy5mo ago
No description
Want results from more Discord servers?
Add your server