Bonjour à tous,
voici un flow node-red que j’utilise pour faire de la « Luminothérapie »
Des études semblent indiquer que le matin les lumières avec une teinte plus bleutée aident à se réveiller et que le soir les lumières d’une teinte plus rouge favorisent le repos et l’endormissement. Alors en tant que geek cela me faisait une belle occasion d’utiliser mon module Zwave Fibaro RGBW
Donc le principe de ce flow est lors d’une détection de mouvement (FIBRO FGMS) mon bandeau led RGBW s’allume avec 3 teintes différentes :
Bleue le matin (A partir du lever du soleil)
Blanc en journée (A partir de midi)
Rouge en soirée (A partir du coucher du soleil)
[
{
"id": "705af216.f43c4c",
"type": "server-state-changed",
"z": "86158e97.336ba",
"name": "",
"server": "5cddae88.02da4",
"version": 1,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "binary_sensor.20_mouvement_palier_1er",
"entityidfiltertype": "substring",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": false,
"x": 190,
"y": 960,
"wires": [
[
"7381df6.bd1c42"
]
]
},
{
"id": "8d80bb18.8f0d28",
"type": "api-call-service",
"z": "86158e97.336ba",
"name": "",
"server": "5cddae88.02da4",
"version": "1",
"debugenabled": false,
"service_domain": "light",
"service": "turn_on",
"entityId": "light.bandeau_led_colore",
"data": "{\"brightness_pct\":100,\"rgb_color\":[0,0,255]}",
"dataType": "json",
"mergecontext": "",
"output_location": "payload",
"output_location_type": "msg",
"mustacheAltTags": false,
"x": 1220,
"y": 960,
"wires": [
[]
]
},
{
"id": "7381df6.bd1c42",
"type": "switch",
"z": "86158e97.336ba",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "on",
"vt": "str"
},
{
"t": "eq",
"v": "off",
"vt": "str"
}
],
"checkall": "true",
"outputs": 2,
"x": 360,
"y": 1060,
"wires": [
[
"47bdb148.6abf2",
"e35ce0d3.e4a9e"
],
[
"47bdb148.6abf2"
]
]
},
{
"id": "e35ce0d3.e4a9e",
"type": "api-current-state",
"z": "86158e97.336ba",
"name": "Lumière is Already On?",
"server": "5cddae88.02da4",
"version": 1,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"override_topic": true,
"entity_id": "light.bandeau_led_colore",
"state_type": "str",
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"blockInputOverrides": false,
"x": 788,
"y": 1053,
"wires": [
[],
[
"9cf6fd66.a0453",
"ef0b17a.3f42de8",
"2235b277.0ea55e"
]
]
},
{
"id": "47bdb148.6abf2",
"type": "stoptimer",
"z": "86158e97.336ba",
"duration": "5",
"units": "Minute",
"payloadtype": "num",
"payloadval": "0",
"name": "20min",
"x": 560,
"y": 1100,
"wires": [
[
"6ccd3590.eb9f8c"
],
[]
]
},
{
"id": "6ccd3590.eb9f8c",
"type": "api-current-state",
"z": "86158e97.336ba",
"name": "Détecteur palier Is on ?",
"server": "5cddae88.02da4",
"version": 1,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"override_topic": true,
"entity_id": "binary_sensor.20_mouvement_palier_1er",
"state_type": "str",
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"blockInputOverrides": false,
"x": 790,
"y": 1120,
"wires": [
[],
[
"5d3022ed.24370c"
]
]
},
{
"id": "5d3022ed.24370c",
"type": "api-call-service",
"z": "86158e97.336ba",
"name": "",
"server": "5cddae88.02da4",
"version": "1",
"debugenabled": false,
"service_domain": "light",
"service": "turn_off",
"entityId": "light.bandeau_led_colore",
"data": "",
"dataType": "json",
"mergecontext": "",
"output_location": "payload",
"output_location_type": "msg",
"mustacheAltTags": false,
"x": 1020,
"y": 1220,
"wires": [
[]
]
},
{
"id": "9cf6fd66.a0453",
"type": "time-range-switch",
"z": "86158e97.336ba",
"name": "Sunrise to solarNoon",
"lat": "49.672232",
"lon": "5.665709",
"startTime": "sunrise",
"endTime": "solarNoon",
"startOffset": 0,
"endOffset": 0,
"x": 1020,
"y": 1000,
"wires": [
[
"8d80bb18.8f0d28"
],
[]
]
},
{
"id": "ef0b17a.3f42de8",
"type": "time-range-switch",
"z": "86158e97.336ba",
"name": "SolarNoon to sunsetStart",
"lat": "49.672232",
"lon": "5.665709",
"startTime": "solarNoon",
"endTime": "sunsetStart",
"startOffset": 0,
"endOffset": 0,
"x": 1010,
"y": 1100,
"wires": [
[
"19591317.a4d2fd"
],
[]
]
},
{
"id": "19591317.a4d2fd",
"type": "api-call-service",
"z": "86158e97.336ba",
"name": "",
"server": "5cddae88.02da4",
"version": "1",
"debugenabled": false,
"service_domain": "light",
"service": "turn_on",
"entityId": "light.bandeau_led_colore",
"data": "{\"brightness_pct\":100,\"rgb_color\":[255,255,255]}",
"dataType": "json",
"mergecontext": "",
"output_location": "payload",
"output_location_type": "msg",
"mustacheAltTags": false,
"x": 1220,
"y": 1100,
"wires": [
[]
]
},
{
"id": "af763801.39b9b8",
"type": "api-call-service",
"z": "86158e97.336ba",
"name": "",
"server": "5cddae88.02da4",
"version": "1",
"debugenabled": false,
"service_domain": "light",
"service": "turn_on",
"entityId": "light.bandeau_led_colore",
"data": "{\"brightness_pct\":100,\"rgb_color\":[255,0,0]}",
"dataType": "json",
"mergecontext": "",
"output_location": "payload",
"output_location_type": "msg",
"mustacheAltTags": false,
"x": 1220,
"y": 1160,
"wires": [
[]
]
},
{
"id": "2235b277.0ea55e",
"type": "time-range-switch",
"z": "86158e97.336ba",
"name": "sunsetStart to sunrise",
"lat": "49.672232",
"lon": "5.665709",
"startTime": "sunsetStart",
"endTime": "sunrise",
"startOffset": 0,
"endOffset": 0,
"x": 1030,
"y": 1160,
"wires": [
[
"af763801.39b9b8"
],
[]
]
},
{
"id": "5cddae88.02da4",
"type": "server",
"z": "",
"name": "Home Assistant",
"legacy": false,
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true
}
]