Salut à tous
j'ai installé ce node:
mais je n'arrive pas à le faire fonctionnée
merci pour votre aide
Hi all
I installed this node: https://flows.nodered.org/node/node-red-contrib-german-holidays
but i can't get it to work
Thanks for your help
Salut à tous
j'ai installé ce node:
mais je n'arrive pas à le faire fonctionnée
merci pour votre aide
Hi all
I installed this node: https://flows.nodered.org/node/node-red-contrib-german-holidays
but i can't get it to work
Thanks for your help
What hardware are you running Node-RED on?
What operating system are you using?
Did you try and install the node?
Were there any errors when you installed the node?
What did the errors say?
Did try and use their example flow?
Were there any errors?
Did you use any debug nodes?
Were there any errors or helpful messages in the debug nodes?
What flows have you tried? (Reminder to use three ``` marks to post your flows to the forums).
Sur : Radpberry Pi 3
Et j’ai pas d’erreurs.
Mai quand je crée un jour férié pour tester , j’ai comme résultat faux
Pour les jours fériée: c’est France GUADELOUPE
Did you try and add a 'pre defined non-holiday' or an existing holiday in your test?
Did you note that you can only add one pre defined holiday?
| Guadeloupe | 2020 | 2021 | 2022 |
|---|---|---|---|
| Jour de l'an | mercredi 1er janvier | vendredi 1er janvier | samedi 1er janvier |
| Lundi de Pâques | lundi 13 avril | lundi 5 avril | lundi 18 avril |
| Fête du Travail | vendredi 1er mai | samedi 1er mai | dimanche 1er mai |
| Victoire des alliés | vendredi 8 mai | samedi 8 mai | dimanche 8 mai |
| Jeudi de l'Ascension | jeudi 21 mai | jeudi 13 mai | jeudi 26 mai |
| Lundi de Pentecôte | lundi 1er juin | lundi 24 mai | lundi 6 juin |
| Abolition de l'esclavage | mercredi 27 mai | jeudi 27 mai | vendredi 27 mai |
| Fête nationale | mardi 14 juillet | mercredi 14 juillet | jeudi 14 juillet |
| Assomption | samedi 15 août | dimanche 15 août | lundi 15 août |
| La Toussaint | dimanche 1er novembre | lundi 1er novembre | mardi 1er novembre |
| Armistice | mercredi 11 novembre | jeudi 11 novembre | vendredi 11 novembre |
| Noël | vendredi 25 décembre | samedi 25 décembre | dimanche 25 décembre |

yesterday: object
today: object
id: "05-27"
name: "Wednesday"
nameAlt: "Wed"
character: 0
dayOfWeek: 3
day: 27
month: 4
naturalMonth: 5
year: 2020
date: "2020-05-28T02:23:03.175Z"
ts: 1590552000000
tsUTC: 1590624000000
dateString: "2020-05-27"
dateISOString: "2020-05-28T02:23:03.175Z"
characteristics: array[0]
equals: function
type: array[1]
isSunday: false
isSaturday: false
isHoliday: false
isSpecialday: false
isWeekend: false
isSunOrHoliday: false
isWeekendOrHoliday: false
isHolidayOrSpecialday: false
isBetweenSundayAndHoliday: false
isBetweenHolidayAndSaturday: false
isBetweenWeekendOrHoliday: false
isCurrentOrBetweenWeekendOrHoliday: false
I imported the node and the test flow.
The node seems to work fine.
What is the error you are seeing?
N’importe quelle date, comme
Vous voulez
I added any date I wanted, and it works fine.
You still have not told us what is not working for you.
You still have not provided any debug information on what is not working for you.
Here is my add any date test as you requested.
Hallo,
Maybe you have to specify a name for the day.
Regards
Hypnos
Quel est la variable déclencheur ?
[{"id":"b1534891.5c6008","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"11086773.f2e2c9","type":"function","z":"b1534891.5c6008","name":"Relais n°7","func":"if(flow.get(\"updatingNow1\") === true) {\n flow.set(\"updatingNow1\",false);\n return;\n}\nif(flow.get(\"updatingNow2\") === true) {\n flow.set(\"updatingNow2\",false);\n return;\n}\n\n\nmsg.host = flow.get(\"host\");\nmsg.community = flow.get(\"password\");\nmsg.varbinds = [\n {\n \"oid\": msg.payload.indexOf(\"54\") != -1 ? \"1.3.6.1.4.1.42505.9.2.2.7.0\" : \"1.3.6.1.4.1.42505.9.2.2.7.0\",\n \"type\": \"Integer\",\n \"value\": msg.payload.indexOf(\"ON\") != -1 ? 1 : 0\n }\n\n\n\n]\n\nreturn msg;","outputs":2,"noerr":0,"x":650,"y":140,"wires":[[],[]]},{"id":"54512de8.c05314","type":"inject","z":"b1534891.5c6008","name":"","topic":"","payload":"msg.payload.today","payloadType":"str","repeat":"","crontab":"05 00 * * *","once":false,"onceDelay":0.1,"x":220,"y":140,"wires":[["189228a.9f0c2d7"]]},{"id":"189228a.9f0c2d7","type":"german-holidays","z":"b1534891.5c6008","name":"","topic":"","region":"","holidays":[],"specialdays":[{"id":"tes jmd","name":"tes jmd","nameAlt":"tes jmd","character":0,"month":5,"day":28,"nth":4,"dow":1},{"id":"test 2","name":"test 2","nameAlt":"","character":0,"month":5,"day":30,"nth":4,"dow":2}],"x":440,"y":140,"wires":[["11086773.f2e2c9"]]}]
54=ON >>> ON
54=OFF >>> OFF
For me it will take a few days before I can test that. For me the node runs without problems and so far nobody else has reported a problem to me.
J’ai pas de problème de fonctionnement, mai un problème d’utilisation.
Je cherche la variable Déclencheur. true ou false
msg.payload.isSpecialday = day-object* only available if the day is a special day. ( isSpecialday is true.)

Correct.
You are only checking for one condition in your switch node.
You should check for both and handle if the today is not special.

sorry to bother you
I'm starting to understand the beast
What is the difference between define holidays and define special days
If I understand correctly in my example Jun 10 is = vacancy from Jun 9 until midnight

I can't create a function for,
if(msg.payload.today.isHoliday === "true"){
msg.payload = ("54=ON");
}
return msg;