node-red-contrib-suncron
Advanced tools
Comparing version
{ | ||
"name": "node-red-contrib-suncron", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "A Node-RED node that triggers configurable outgoing messages based on the position of the sun", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -28,2 +28,35 @@ # SunCron | ||
## Outgoing messages | ||
The node will eject messages at the specified times (respecting offsets), which will have a `msg.payload` and `msg.topic` as configured in the editor. Outgoing messages also have a `schedule` attribute containing an object with details about the schedule of the current date. The schedule contains only events which have been configured with a payload. | ||
Each event has the following attributes: | ||
- `event` is the name of the sun event | ||
- `sunEventTime` refers to the unadjusted time of the respective sun event. | ||
- `cronTime` refers to the adjusted time, i.e. taking the offset into account. | ||
### Example `msg.schedule` object | ||
```javascript | ||
{ | ||
"sunrise": { | ||
"event": "sunrise", | ||
"sunEventTime": "2019-09-08T06:29:51", | ||
"cronTime": "2019-09-08T07:31:51" | ||
}, | ||
"sunriseEnd": { | ||
"event": "sunriseEnd", | ||
"sunEventTime": "2019-09-08T06:33:24", | ||
"cronTime": "2019-09-08T03:33:24" | ||
}, | ||
"dawn": { | ||
"event": "dawn", | ||
"sunEventTime": "2019-09-08T05:54:49", | ||
"cronTime": "2019-09-08T06:54:49" | ||
} | ||
//... | ||
} | ||
``` | ||
 | ||
@@ -30,0 +63,0 @@ |
196057
0.55%66
100%