1.1.5 • Published 6 days ago

@teamteanpm2024/praesentium-voluptas-aliquam v1.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
6 days ago

node-red-contrib-timegate

Switches the input received on out1 or out2 depending on the time and the settings of the node.

The node compares the current time to up to five different time configurations and thansfers its input unmodified on the first output if the current time matches any of the configuration or, otherwise, on the second output.

node-red-contrib-timegate

Inputs

msg (any type)

Any input message is passed unmodified to one of the outputs.

Outputs

out-1

Passes the input msg when any of the time configuration matches the current time.

out-2

passes the input msg when none of the timer matches the current time.

Configurations

node-red-contrib-timegate-setup

Reference datetime

The node can use the current date and time to check against one of it's configurations or can be initialized with a property inside the message passed to it's input, a value inside the flow object or a global value.

You can use the Reference DateTime Field to decide where to get an external reference datetime from.

The value can be specified in one of these formats:

YYYY/MM/DD HH:mm 
YYYY/MM/DD

If the msg/flow/global variable is not set, the node will use the current date time.

Time matching configurations

You can configure up to five different time matching configurations to be checked against the reference datetime.

For each configuration, you can specify these parameters:

Time

One or more time ranges separated by commas.

A time can be be a 24 hour time or a SunCalc event, as expressed by the SunCalc Library.

Keywords are case insensitive.

PropertyDescription
sunrisesunrise (top edge of the sun appears on the horizon)
sunriseEndsunrise ends (bottom edge of the sun touches the horizon)
goldenHourEndmorning golden hour (soft light, best time for photography) ends
solarNoonsolar noon (sun is in the highest position)
goldenHourevening golden hour starts
sunsetStartsunset starts (bottom edge of the sun touches the horizon)
sunsetsunset (sun disappears below the horizon, evening civil twilight starts)
duskdusk (evening nautical twilight starts)
nauticalDusknautical dusk (evening astronomical twilight starts)
nightnight starts (dark enough for astronomical observations)
nadirnadir (darkest moment of the night, sun is in the lowest position)
nightEndnight ends (morning astronomical twilight starts)
nauticalDawnnautical dawn (morning nautical twilight starts)
dawndawn (morning nautical twilight ends, morning civil twilight starts)

Example:

10:15-11:30 or 10:00-12:00,15:30-16:30
12:00-goldenHour or sunsetStart-sunset

Day

One or more day values separated by commas.

Possible values:

  • 1,8,15,21 to match the day number
  • SUN,MON,TUE,WED,THU,FRI,SAT to match the day name
  • ODD,EVEN to match odd or even days based on the number of the day in the month (1-31)
  • ODD-YEAR,EVEN-YEAR to match odd or even days based on the number of the day in the year (1-365)

Example:

1,SUN,ODD is true for: the first day of the month, every sundays and every odd day number in the month

SAT,SUN,EVEN-YEAR is true on saturdays and sundays and on every even day based the number of the day in the year

Week

One or more week values separated by commas.

Possible values:

  • 1,2,3,4,5,6 to match the week number in the month
  • ODD,EVEN to match odd or even weeks based on the number of the week in the month (1-6)
  • ODD-YEAR,EVEN-YEAR to match odd or even weeks based on the number of the day in the year (1-52)

Example:

1,EVEN-YEAR is true for: the first week of the month and every even week number in the year

Month

One or more month values separated by commas.

Possible values:

  • 1,2,3,4,5,6 to match the month

Example:

1,2,3 is true for: January, February and March

Multiple configurations

For every timer configuration the time settings is mandatory. If you add any day, week or month settings, these are evaluated in AND between each other.

Multiple timer configurations are evaluated in OR between each other.

Example:

Time: 10:00-11:00
Day: ODD
Week: EVEN-YEAR
Month: 1,2,3,4,5,6

This configuration will pass the input to Out-1 only from 10:00 to 11:00 of every odd day (based on the number of the day in the month) of every even week (based on the number of the week in the year) and from January to June. Otherwise, it will pass the input to Out-2.

Example

See the example for a basic setup of the node

References

GitHub - the nodes github repository

Donations

If you use and appreciate this software, please consider the idea of supporting my efforts in mantaining it.

Thanks.

Donate

Changelog

  • 1.0.0 First release
  • 1.0.1 Minor fixes
  • 1.0.2 Added better help text
  • 1.0.3 Fixed a regression bug
  • 1.0.4 Moved examples to the correct folder
  • 1.0.5 Fixes issue #6 Name not shown in node
  • 1.0.6 Added the possibility to read reference datetime from msg, flow or global
  • 1.0.7 Added suncalc suport
concatMapprefix-0irqnpmpluginreact-hook-formreadYAMLstableless compilervalue3d_.extendpicomatchpyyamljQueryes2017byteLengtherror-handlingdebuggerURLSearchParamscss nestingsuperstructreact-hooksBigInt64ArrayObject.keysES2022Uint32ArrayjwtArray.prototype.includesvalidateredux-toolkitfullwidthl10noptimizertapArray.prototype.flatArray.prototype.containstypedasciipromisesECMAScript 5censordependency managerstreamssymlinkreduxcacheinstalltostringtagfolderes-abstractgenericsmonorepopoint-freePromiseperformanteast-asian-widthreduceloading0harmonyregular expressionexecpatchwarningcoercibleinvariantio-tsbrowserslistlanguageReactiveExtensionsstatushardlinkses-shimsrdsECMAScript 2021exitworkerdotenvjsonschemacurlreact-testing-libraryURLoptimistfsTypeScriptiteratoreveryMicrosoftnamessharedarraybufferspeedtextzerojsonescapeequalfantasy-landutilitiesflatMappackage manager__proto__corsasyncemrthroatlimitframervariables in cssiambusya11yfast-deep-clonepush6to5diramazoncomparejson-schema-validationtddxtermchannelemitgetoptjson-schema-validatormkdirmobileECMAScript 2020rateuuidcryptendpointES2016runtimebyteargvthrottlesafewafArrayBuffer.prototype.slicecharacterforEachsignalsJSON-SchemaflatauthECMAScript 2023browserlistcloudsearchcompile lessmime-dbArrayBuffernodees2016Object.definePropertyuninstallbuffersimmereslint-pluginpromisepreserve-symlinkswaapidefinedataViewprivatemkdirpwebreducerObject.valuesajvregexcontainspruneresolvelockfilePushstarterlibphonenumbersetterparsesyntaxqueryelectronObservablecolumnconstsignalmoduletoSortedpersistentsymlinksObservablesemojiidleglobregexpquoteanimationerrorInt8ArraysetPrototypeOfmochamapsetImmediateutil.inspectautoscalingqueuequeueMicrotasksesomitletkeysprotocol-bufferszodtoobjecthasOwnmapreducetc39typesafeurlInt32ArrayeventDispatchersymbolsstylesheetreact animationtacitdefinePropertyWeakSetratelimitbannerdomextendphonefilecheckeslintpluginCSSStyleDeclarationwaitparsertrimRightlookoptionsameValueZerobindairbnbsearchsqscloudformationnamerobustefficienttypanionsanitizetrimEndes-shim APIUint16ArrayviewcloudtrailansihandlersprototypeUint8Arraysorteduser-streamstestdragentries$.extendpositiveArray.prototype.findLastIndexjoislotrequeststylingoffsetcharacterslazyES2015visualWebSocketfile systemlogRFC-6455iterationcloudwatchtouchexpressionspringpropertiesCSSsyntaxerrornodejshooksguidString.prototype.trimtoStringTagmergeelbtranspilerstringlessi18ncomputed-typesgetterprocess
1.1.5

6 days ago

1.1.4

7 days ago

1.1.3

8 days ago

1.0.3

9 days ago

1.0.2

10 days ago

1.0.1

11 days ago

1.0.0

11 days ago