1.6.1 • Published 3 months ago

node-red-contrib-feiertage v1.6.1

Weekly downloads
23
License
MIT
Repository
github
Last release
3 months ago

banner

Node Red Feiertage

NPM NPM_downloads issues

NPM

The Node Red Feiertage node is the ultimate node to get information about german, austrian and swiss holidays.

Are there any holidays missing? Write an issue! I'm going to add these holidays for you.

This node contains all german, austrian and swiss holidays. To get the perfect node for your country read the point below.

You're living in Germany, Austria or Switzerland?

countryNode Red node
Germanynode-red-contrib-feiertage-germany
Austrianode-red-contrib-feiertage-austria
Switzerlandnode-red-contrib-feiertage-switzerland
Or you want all in one node (Germany, Austria, Switzerland)node-red-contrib-feiertage

Installation

npm install node-red-contrib-feiertage

Getting Started

At first, it's important to check that you have picked the right localisation and timezone on your device. Below you can find a manual how to change those settings on to a RaspberryPi.

Login into your Pi. Then open the settings with this command.

sudo raspi-config

Now you should see this interface. Navigate to 5 Localisation Options and press ENTER.

pi_settings_1

Here you can set your Local and Timezone. If your localisation is Germany chose de_DE.UTF-8 as your local and Europe --> Berlin as your timezone.

pi_settings_2

After you have finished setup click Finish. To make your changes valid reboot your pi.

sudo reboot

Node Description

Input

The input can be used to trigger special outputs. The keywords are listed below.

msg.payloadoutput
isTodayHolidayboolean whether today is holiday
isTomorrowHolidayboolean whether tomorrow is holiday
isChristmasTimeboolean whether today is Christmas time (1. Advent - Heilige drei Könige)
nextHolidayinformation about next holiday
nextThreeHolidaysinformation about next 3 holidays
allinformation about all holidays
daysUntilNextHolidaynumber of days until next holidays

Output

The output can be used to listen to automatic and user triggered events. Every day at 00:01 o'clock the node automatically outputs a boolean value whether today is a holiday.

You decide what you want to receive: Object or Array! To enable output as array open the node settings and hit the checkbox output: Array instead of Object at the bottom.

holiday object output:

keyoutput
idid
namename
dateObjdate (yyyy-mm-dd)
dateDEgerman date (dd.mm.yyyy)

holiday array3 output:

indexoutput
0id
1name
2date (yyyy-mm-dd)
3german date (dd.mm.yyyy)

Every day at 12 am you will receive a boolean value whether today is a holiday if daily output is enabled.

Own Holidays

You can choose up to 10 own dates. Select the day in the first dropdown-menu and the month in the second. Chose a name for your holiday and type it into the input field. Don't forget to hit the checkbox to enable your own holiday. Pay attention: The node does NOT validate your own dates. So if you set the 30 february or the 31 april as date you won't get an error message.

own_holiday_example

Example Flow

You can import this example into your Node Red flow.

flow_example

[{"id":"56d64fd2e4bee366","type":"inject","z":"d92a1f96.826db","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"nextHoliday","payloadType":"str","x":170,"y":160,"wires":[["ac8dee9a6f24cae2"]]},{"id":"85c391cbe019a4d7","type":"debug","z":"d92a1f96.826db","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":590,"y":200,"wires":[]},{"id":"08229fcaf5f944f2","type":"inject","z":"d92a1f96.826db","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"isTodayHoliday","payloadType":"str","x":160,"y":80,"wires":[["ac8dee9a6f24cae2"]]},{"id":"c209950abc65da20","type":"inject","z":"d92a1f96.826db","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"nextThreeHolidays","payloadType":"str","x":150,"y":200,"wires":[["ac8dee9a6f24cae2"]]},{"id":"1cdc14b92a4b5eae","type":"inject","z":"d92a1f96.826db","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"all","payloadType":"str","x":190,"y":240,"wires":[["ac8dee9a6f24cae2"]]},{"id":"56143ef5c7760b02","type":"inject","z":"d92a1f96.826db","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"isChristmasTime","payloadType":"str","x":160,"y":280,"wires":[["ac8dee9a6f24cae2"]]},{"id":"12d77ddf17208708","type":"inject","z":"d92a1f96.826db","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"daysUntilNextHoliday","payloadType":"str","x":140,"y":320,"wires":[["ac8dee9a6f24cae2"]]},{"id":"ac8dee9a6f24cae2","type":"feiertage","z":"d92a1f96.826db","name":"Feiertage","neujahr":true,"neujahrName":"Neujahr","berchtoldstag":true,"berchtoldstagName":"Berchtoldstag","heiligeDreiKoenige":true,"heiligeDreiKoenigeName":"Heilige drei Könige","weiberfastnacht":true,"weiberfastnachtName":"Weiberfastnacht","valentinstag":true,"valentinstagName":"Valentinstag","rosenmontag":true,"rosenmontagName":"Rosenmontag","fastnachtsdienstag":true,"fastnachtsdienstagName":"Fastnachtdienstag","aschermittwoch":true,"aschermittwochName":"Aschermittwoch","stJosef":true,"stJosefName":"St. Josef","gruendonnerstag":true,"gruendonnerstagName":"Gründonnerstag","karfreitag":true,"karfreitagName":"Karfreitag","easterSunday":true,"easterSundayName":"Ostersonntag","easterMonday":true,"easterMondayName":"Ostermontag","firstMay":true,"firstMayName":"1. Mai","stFlorian":true,"stFlorianName":"St. Florian","christiHimmelfahrt":true,"christiHimmelfahrtName":"Christi Himmelfahrt","pfingstsonntag":true,"pfingstsonntagName":"Pfingstsonntag","pfingstmontag":true,"pfingstmontagName":"Pfingstmontag","fronleichnam":true,"fronleichnamName":"Fronleichnam","bundesfeierCH":true,"bundesfeierCHName":"Bundesfeiertag","peterUndPaul":"Peter und Paul","peterUndPaulName":true,"mariaHimmelfahrt":true,"mariaHimmelfahrtName":"Maria Himmelfahrt","stRupert":true,"stRupertName":"St. Rupert","tagDerDeutschenEinheit":true,"tagDerDeutschenEinheitName":"Tag der Deutschen Einheit","tagDerVolksabstimmung":true,"tagDerVolksabstimmungName":"Tag der Volksabstimmung","nationalfeiertagAT":true,"nationalfeiertagATName":"Nationalfeiertag","halloween":true,"halloweenName":"Halloween","allerheiligen":true,"allerheiligenName":"Allerheiligen","stMartin":true,"stMartinName":"St. Martin","stLeopold":true,"stLeopoldName":"St. Leopold","bussUndBettag":true,"bussUndBettagName":"Buß und Bettag","nikolaus":true,"nikolausName":"Nikolaus","mariaeEmpfaengnis":true,"mariaeEmpfaengnisName":"Mariä Empfängnis","advent1":true,"advent1Name":"1. Advent","advent2":true,"advent2Name":"2. Advent","advent3":true,"advent3Name":"3. Advent","advent4":true,"advent4Name":"4. Advent","heiligabend":true,"heiligabendName":"Heiligabend","weihnachten1":true,"weihnachten1Name":"1. Weihnachtsfeiertag","weihnachten2":true,"weihnachten2Name":"2. Weihnachtsfeiertag","silvester":true,"silvesterName":"Silvester","ownHoliday1":true,"ownHoliday1Day":"28","ownHoliday1Month":"9","ownHoliday1Name":"Birthday","ownHoliday2":false,"ownHoliday2Day":"2","ownHoliday2Month":"2","ownHoliday2Name":"own Date 2","ownHoliday3":false,"ownHoliday3Day":3,"ownHoliday3Month":3,"ownHoliday3Name":"own Date 3","ownHoliday4":false,"ownHoliday4Day":4,"ownHoliday4Month":4,"ownHoliday4Name":"own Date 4","ownHoliday5":false,"ownHoliday5Day":5,"ownHoliday5Month":5,"ownHoliday5Name":"own Date 5","ownHoliday6":false,"ownHoliday6Day":"7","ownHoliday6Month":6,"ownHoliday6Name":"own Date 6","ownHoliday7":false,"ownHoliday7Day":7,"ownHoliday7Month":7,"ownHoliday7Name":"own Date 7","ownHoliday8":false,"ownHoliday8Day":8,"ownHoliday8Month":8,"ownHoliday8Name":"own Date 8","ownHoliday9":false,"ownHoliday9Day":9,"ownHoliday9Month":9,"ownHoliday9Name":"own Date 9","ownHoliday10":false,"ownHoliday10Day":10,"ownHoliday10Month":10,"ownHoliday10Name":"own Date 10","array":false,"dailyOutput":true,"x":410,"y":200,"wires":[["85c391cbe019a4d7"]]},{"id":"e927971f4c9bfefd","type":"inject","z":"d92a1f96.826db","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"isTomorrowHoliday","payloadType":"str","x":150,"y":120,"wires":[["ac8dee9a6f24cae2"]]}]
1.6.1

3 months ago

1.6.0

3 months ago

1.5.5

9 months ago

1.5.6

8 months ago

1.5.3

11 months ago

1.5.2

1 year ago

1.5.1

1 year ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.0

2 years ago

1.3.9

2 years ago

1.3.8

3 years ago

1.3.7

3 years ago

1.2.0

3 years ago

1.1.1

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

0.9.2

3 years ago

0.8.2

3 years ago

0.7.3

3 years ago

0.7.2

3 years ago