node-red-contrib-suncron
Advanced tools
Comparing version 1.6.2 to 1.6.3
{ | ||
"name": "node-red-contrib-suncron", | ||
"version": "1.6.2", | ||
"version": "1.6.3", | ||
"description": "A Node-RED node that triggers configurable outgoing messages based on the position of the sun", | ||
@@ -33,11 +33,11 @@ "main": "index.js", | ||
"dependencies": { | ||
"cron": "^1.8.2", | ||
"dayjs": "^1.10.5", | ||
"suncalc": "^1.8.0" | ||
"cron": "^3.5.0", | ||
"dayjs": "^1.11.13", | ||
"suncalc": "^1.9.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^7.29.0", | ||
"mocha": "^9.0.1", | ||
"node-red": "^1.2.9", | ||
"node-red-node-test-helper": "^0.2.5" | ||
"eslint": "^9.18.0", | ||
"mocha": "^11.0.1", | ||
"node-red": "^4.0.8", | ||
"node-red-node-test-helper": "^0.3.4" | ||
}, | ||
@@ -44,0 +44,0 @@ "prettier": { |
@@ -55,10 +55,12 @@ # SunCron | ||
The node will emit messages at the specified sun events (respecting offsets) or when it receives an inbound msg with a non-object paylod, e.g. `true`. Outbound messages will have a `msg.payload` and `msg.topic` as configured in the editor. Those 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. | ||
The node will emit messages at the specified sun events (respecting offsets) or when it receives an inbound msg with a non-object payload, e.g. `true`. Outbound messages will have a `msg.payload` and `msg.topic` as configured in the editor. Those 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. | ||
- `offset` refers to the configured offset in seconds. | ||
| Attribute | Description | | ||
|-----------------|---------------------------------------------------| | ||
| `event` | The name of the sun event | | ||
| `sunEventTime` | The unadjusted time of the respective sun event | | ||
| `cronTime` | The adjusted time, taking the offset into account | | ||
| `offset` | The configured offset in seconds | | ||
@@ -97,3 +99,3 @@ #### Example `msg.schedule` object | ||
Depending on your configured location (lat / lon) and time of the year, you might notice some sun events not being triggered. This is not an error but how lighting works on earth. For example in polar regions, they sometimes have day (or night) for weeks at a time. But even in Berlin / Germany there might not always be a distinct 'night' event as the sun during summer does not go below the astronomical twilight treshold. | ||
Depending on your configured location (lat / lon) and time of the year, you might notice some sun events not being triggered. This is not an error but how lighting works on earth. For example in polar regions, they sometimes have day (or night) for weeks at a time. But even in Berlin / Germany there might not always be a distinct 'night' event as the sun during summer does not go below the astronomical twilight threshold. | ||
@@ -100,0 +102,0 @@ ## Contributions and Suggestions |
@@ -157,3 +157,3 @@ const CronJob = require('cron').CronJob | ||
let cron = new CronJob({ | ||
let cron = CronJob.from({ | ||
cronTime: event.cronTime.toDate(), | ||
@@ -193,3 +193,3 @@ onTick: () => { | ||
const cron = new CronJob({ | ||
const cron = CronJob.from({ | ||
cronTime, | ||
@@ -196,0 +196,0 @@ onTick: () => { |
Sorry, the diff of this file is not supported yet
216753
103
+ Added@types/luxon@3.4.2(transitive)
+ Addedcron@3.5.0(transitive)
+ Addedluxon@3.5.0(transitive)
- Removedcron@1.8.3(transitive)
- Removedluxon@1.28.1(transitive)
Updatedcron@^3.5.0
Updateddayjs@^1.11.13
Updatedsuncalc@^1.9.0