Bonjour,
je suis nouveau dans le monde de HA et découvre avec beaucoup d’intérêt toutes les possibilités offertes par la liaison de tous ces devices, etc.
J’ai comme projet de piloter par l’intermédiaire d’un Philips Hue Tap 8719514440937/8719514440999
→ un HP Sonos (Volume, pause, piste précédente, suivante, Radio)
→ des Strip led pilotés par controleur Zigbee ( TS0505B )(Intensité, couleur K blanc Chaud/Froid)/Scene, etc)
→ Un Esp32 avec Wled
J’essaye donc d’avoir un mix de ceci:
https://flows.nodered.org/flow/c95d562d4858cbe1bf80fee95ba9815f
Mon souci, récupérer les infos par Z2M pour gestion des Dial gauche, droite et arriver à contrôler le volume ou intensité ou température de lumière.
Gestion de Simple, double, triple, etc Clic qui permet une fois effectué de choisir quelles fonctions sont appliquées au bouton rotatif par exemple.
Tous les projets que j’ai trouvés sont soit des Blueprint, soit des NodeFlow mais à partir de DECONZ et je ne suis pas suffisamment expérimenté pour « convertir » cela à Z2A
J’ai commencé un Flow « test » mais j’avance pas
Si quelqu’un avait déjà un début de Flow avec Z2M et ce switch je serai si content afin d’essayer de le modifier pour arriver à mes attentes
Merci d’avance à ceux ou celui qui pourront m’aider à avancer.
Ci-dessous « mon flow » où je fais mes tests mais qui est encore bien loin de ce que je désire
[
{
"id": "4bcadb510dbde523",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "390bf692b274291a",
"type": "mqtt in",
"z": "4bcadb510dbde523",
"name": "MQTT Trigger",
"topic": "zigbee2mqtt/HueSwitch/action",
"qos": "2",
"datatype": "auto-detect",
"broker": "99709302a818dd3b",
"nl": false,
"rap": false,
"inputs": 0,
"x": 140,
"y": 220,
"wires": [
[
"55be735cab60b919"
]
]
},
{
"id": "55be735cab60b919",
"type": "switch",
"z": "4bcadb510dbde523",
"name": "Switch on Payload and Topic",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "button_1_press_release",
"vt": "str"
},
{
"t": "eq",
"v": "button_4_press_release",
"vt": "str"
},
{
"t": "eq",
"v": "button_3_press_release",
"vt": "str"
},
{
"t": "eq",
"v": "button_1_hold",
"vt": "str"
},
{
"t": "eq",
"v": "button_2_press",
"vt": "str"
},
{
"t": "eq",
"v": "button_2_hold",
"vt": "str"
},
{
"t": "eq",
"v": "button_3_hold",
"vt": "str"
},
{
"t": "regex",
"v": "dial_rotate_right_.*|dial_rotate_left_.*",
"vt": "str",
"case": false
}
],
"checkall": "true",
"repair": false,
"outputs": 8,
"x": 350,
"y": 220,
"wires": [
[
"7169772137fc81c7"
],
[
"fe9ccccc75f59b25"
],
[
"4e151bf2615020cd"
],
[
"48ac396acd74b189"
],
[
"3ce40eb4263909f9"
],
[
"6de133330c6828f9"
],
[
"4c6b714f0aad1eac",
"f2853165ae64dadc"
],
[
"5e0bb0cecac24779",
"747780669991dad7",
"cd5e967b19b85f4a"
]
]
},
{
"id": "7169772137fc81c7",
"type": "api-call-service",
"z": "4bcadb510dbde523",
"name": "Play/Pause Media Player",
"server": "92ab386eaaffa3ef",
"version": 5,
"debugenabled": false,
"domain": "media_player",
"service": "media_play_pause",
"areaId": [],
"deviceId": [],
"entityId": [
"media_player.move"
],
"data": "{}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 910,
"y": 120,
"wires": [
[]
]
},
{
"id": "fe9ccccc75f59b25",
"type": "api-call-service",
"z": "4bcadb510dbde523",
"name": "Next Track",
"server": "92ab386eaaffa3ef",
"version": 5,
"debugenabled": false,
"domain": "media_player",
"service": "media_next_track",
"areaId": [],
"deviceId": [],
"entityId": [
"media_player.move"
],
"data": "{}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 870,
"y": 220,
"wires": [
[]
]
},
{
"id": "4e151bf2615020cd",
"type": "api-call-service",
"z": "4bcadb510dbde523",
"name": "Previous Track",
"server": "92ab386eaaffa3ef",
"version": 5,
"debugenabled": false,
"domain": "media_player",
"service": "media_previous_track",
"areaId": [],
"deviceId": [],
"entityId": [
"media_player.move"
],
"data": "{}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 870,
"y": 300,
"wires": [
[]
]
},
{
"id": "5e0bb0cecac24779",
"type": "switch",
"z": "4bcadb510dbde523",
"name": "Switch on Dial Rotate Right",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "dial_rotate_right_step",
"vt": "str"
},
{
"t": "eq",
"v": "dial_rotate_right_slow",
"vt": "str"
},
{
"t": "eq",
"v": "dial_rotate_right_fast",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
"x": 400,
"y": 380,
"wires": [
[
"bb94dc3d058d96dd"
],
[
"bb94dc3d058d96dd"
],
[
"bb94dc3d058d96dd"
]
]
},
{
"id": "747780669991dad7",
"type": "switch",
"z": "4bcadb510dbde523",
"name": "Switch on Dial Rotate Left",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "dial_rotate_left_step",
"vt": "str"
},
{
"t": "eq",
"v": "dial_rotate_left_sloww",
"vt": "str"
},
{
"t": "eq",
"v": "dial_rotate_left_fastt",
"vt": "str"
},
{
"t": "eq",
"v": "dial_rotate_left_fast",
"vt": "str"
},
{
"t": "eq",
"v": "dial_rotate_left_slow",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 5,
"x": 400,
"y": 460,
"wires": [
[
"7554a45ddd5b8e2c"
],
[
"7554a45ddd5b8e2c"
],
[
"7554a45ddd5b8e2c"
],
[
"072268317c8c4cd3"
],
[
"072268317c8c4cd3"
]
]
},
{
"id": "17646e20e513c5dc",
"type": "api-call-service",
"z": "4bcadb510dbde523",
"name": "Set Volume",
"server": "92ab386eaaffa3ef",
"version": 5,
"debugenabled": false,
"domain": "media_player",
"service": "volume_set",
"areaId": [],
"deviceId": [],
"entityId": [
"media_player.move"
],
"data": "{\"volume_level\": 0.08}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [
{
"property": "meta",
"propertyType": "msg",
"value": "",
"valueType": "data"
}
],
"queue": "none",
"x": 870,
"y": 420,
"wires": [
[]
]
},
{
"id": "48ac396acd74b189",
"type": "api-call-service",
"z": "4bcadb510dbde523",
"name": "Scene Ambiance Chaude Froide",
"server": "92ab386eaaffa3ef",
"version": 5,
"debugenabled": false,
"domain": "scene",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"scene.ambiance_chaude_froide"
],
"data": "{}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 860,
"y": 500,
"wires": [
[]
]
},
{
"id": "3ce40eb4263909f9",
"type": "api-call-service",
"z": "4bcadb510dbde523",
"name": "Light Turn On",
"server": "92ab386eaaffa3ef",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"light.zig"
],
"data": "{\"kelvin\": 2714,\"brightness\": 47}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 850,
"y": 580,
"wires": [
[]
]
},
{
"id": "6de133330c6828f9",
"type": "api-call-service",
"z": "4bcadb510dbde523",
"name": "Light Turn On (Brightness 100%)",
"server": "92ab386eaaffa3ef",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"light.zig"
],
"data": "{\"brightness_pct\": 100}",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 900,
"y": 660,
"wires": [
[]
]
},
{
"id": "cd5e967b19b85f4a",
"type": "debug",
"z": "4bcadb510dbde523",
"name": "debug 14",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 810,
"y": 360,
"wires": []
},
{
"id": "7859340a13de9889",
"type": "switch",
"z": "4bcadb510dbde523",
"d": true,
"name": "Switch on Payload and Topic",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "button_1_press_release",
"vt": "str"
},
{
"t": "eq",
"v": "button_4_press_release",
"vt": "str"
},
{
"t": "eq",
"v": "button_3_press_release",
"vt": "str"
},
{
"t": "regex",
"v": "dial_rotate_right_.*|dial_rotate_left_.*|button_1_hold|button_2_press_release|button_2_hold|button_3_hold|button_4_hold",
"vt": "str",
"case": false
}
],
"checkall": "true",
"repair": false,
"outputs": 4,
"x": 350,
"y": 100,
"wires": [
[],
[],
[],
[]
]
},
{
"id": "4c6b714f0aad1eac",
"type": "api-call-service",
"z": "4bcadb510dbde523",
"name": "Light Turn Off",
"server": "92ab386eaaffa3ef",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"light.zig"
],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 850,
"y": 740,
"wires": [
[]
]
},
{
"id": "f2853165ae64dadc",
"type": "api-call-service",
"z": "4bcadb510dbde523",
"name": "Light Turn Off ZbMini",
"server": "92ab386eaaffa3ef",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.zbmini2"
],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 870,
"y": 800,
"wires": [
[]
]
},
{
"id": "bb94dc3d058d96dd",
"type": "api-call-service",
"z": "4bcadb510dbde523",
"name": "Set Volume UP",
"server": "92ab386eaaffa3ef",
"version": 5,
"debugenabled": false,
"domain": "media_player",
"service": "volume_up",
"areaId": [],
"deviceId": [],
"entityId": [
"media_player.move"
],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1040,
"y": 380,
"wires": [
[]
]
},
{
"id": "7554a45ddd5b8e2c",
"type": "api-call-service",
"z": "4bcadb510dbde523",
"name": "Set Volume DOWN",
"server": "92ab386eaaffa3ef",
"version": 5,
"debugenabled": false,
"domain": "media_player",
"service": "volume_down",
"areaId": [],
"deviceId": [],
"entityId": [
"media_player.move"
],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1050,
"y": 460,
"wires": [
[]
]
},
{
"id": "a5612287d55fbdf3",
"type": "mqtt in",
"z": "4bcadb510dbde523",
"d": true,
"name": "MQTT Trigger",
"topic": "zigbee2mqtt/+/action",
"qos": "2",
"datatype": "auto-detect",
"broker": "99709302a818dd3b",
"nl": false,
"rap": false,
"inputs": 0,
"x": 130,
"y": 100,
"wires": [
[]
]
},
{
"id": "072268317c8c4cd3",
"type": "api-call-service",
"z": "4bcadb510dbde523",
"name": "",
"server": "92ab386eaaffa3ef",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"light.zig"
],
"data": "{\t \"brightness_step_pct\": -10}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 550,
"y": 660,
"wires": [
[
"f63b5f03c503beae"
]
]
},
{
"id": "f63b5f03c503beae",
"type": "debug",
"z": "4bcadb510dbde523",
"name": "debug 16",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 620,
"y": 800,
"wires": []
},
{
"id": "0cf50a6c8485844d",
"type": "delay",
"z": "4bcadb510dbde523",
"name": "",
"pauseType": "delay",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1340,
"y": 320,
"wires": [
[]
]
},
{
"id": "99709302a818dd3b",
"type": "mqtt-broker",
"name": "",
"broker": "192.168.1.77",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "",
"birthQos": "0",
"birthRetain": "false",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closeRetain": "false",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willRetain": "false",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
},
{
"id": "92ab386eaaffa3ef",
"type": "server",
"name": "Home Assistant",
"version": 5,
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true,
"cacheJson": true,
"heartbeat": false,
"heartbeatInterval": "30",
"areaSelector": "friendlyName",
"deviceSelector": "friendlyName",
"entitySelector": "friendlyName",
"statusSeparator": ": ",
"statusYear": "hidden",
"statusMonth": "short",
"statusDay": "numeric",
"statusHourCycle": "default",
"statusTimeFormat": "h:m",
"enableGlobalContextStore": false
}
]