Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "26dc23f0398a79c2",
- "type": "subflow",
- "name": "Multipress",
- "info": "",
- "category": "",
- "in": [
- {
- "x": 40,
- "y": 460,
- "wires": [
- {
- "id": "c2c049ba0d3221b1"
- },
- {
- "id": "38fadaf395ea0d75"
- },
- {
- "id": "72c4dc5febf27b7b"
- }
- ]
- }
- ],
- "out": [
- {
- "x": 1110,
- "y": 220,
- "wires": [
- {
- "id": "a097ef0bd92f0533",
- "port": 0
- }
- ]
- },
- {
- "x": 1120,
- "y": 260,
- "wires": [
- {
- "id": "892af95c35da20eb",
- "port": 0
- }
- ]
- },
- {
- "x": 1110,
- "y": 300,
- "wires": [
- {
- "id": "d4d3d74391052d5b",
- "port": 0
- }
- ]
- },
- {
- "x": 1120,
- "y": 340,
- "wires": [
- {
- "id": "fb0d6c0a66e1df43",
- "port": 0
- }
- ]
- },
- {
- "x": 1150,
- "y": 400,
- "wires": [
- {
- "id": "f9e3c1e5b294383f",
- "port": 0
- }
- ]
- }
- ],
- "env": [],
- "meta": {
- "module": "multipress",
- "version": "0.0.1",
- "author": "Torben Stallknecht <[email protected]>",
- "desc": "Multi button press flow"
- },
- "color": "#3FADB5",
- "inputLabels": [
- "No Of pushes"
- ],
- "outputLabels": [
- "Single",
- "Double",
- "Tripple",
- "Quadro",
- "Complete payload"
- ],
- "status": {
- "x": 1080,
- "y": 160,
- "wires": [
- {
- "id": "eeee16cdd86d70ce",
- "port": 0
- }
- ]
- }
- },
- {
- "id": "fc0263cd622c89ae",
- "type": "change",
- "z": "26dc23f0398a79c2",
- "name": "Reset",
- "rules": [
- {
- "t": "set",
- "p": "reset",
- "pt": "msg",
- "to": "foo",
- "tot": "str"
- },
- {
- "t": "delete",
- "p": "payload",
- "pt": "msg"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 510,
- "y": 380,
- "wires": [
- [
- "38fadaf395ea0d75"
- ]
- ]
- },
- {
- "id": "83e63bac5a7e69c4",
- "type": "switch",
- "z": "26dc23f0398a79c2",
- "name": "count presses",
- "property": "count",
- "propertyType": "flow",
- "rules": [
- {
- "t": "eq",
- "v": "1",
- "vt": "num"
- },
- {
- "t": "eq",
- "v": "2",
- "vt": "num"
- },
- {
- "t": "eq",
- "v": "3",
- "vt": "num"
- },
- {
- "t": "eq",
- "v": "4",
- "vt": "num"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 4,
- "x": 420,
- "y": 280,
- "wires": [
- [
- "a097ef0bd92f0533"
- ],
- [
- "892af95c35da20eb"
- ],
- [
- "d4d3d74391052d5b"
- ],
- [
- "fb0d6c0a66e1df43"
- ]
- ]
- },
- {
- "id": "c2c049ba0d3221b1",
- "type": "trigger",
- "z": "26dc23f0398a79c2",
- "name": "",
- "op1": "",
- "op2": "0",
- "op1type": "nul",
- "op2type": "str",
- "duration": "500",
- "extend": true,
- "overrideDelay": false,
- "units": "ms",
- "reset": "",
- "bytopic": "all",
- "topic": "topic",
- "outputs": 1,
- "x": 200,
- "y": 280,
- "wires": [
- [
- "9c4e7cf586f4231f",
- "83e63bac5a7e69c4"
- ]
- ]
- },
- {
- "id": "a097ef0bd92f0533",
- "type": "change",
- "z": "26dc23f0398a79c2",
- "name": "Single Press",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "1",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 640,
- "y": 220,
- "wires": [
- [
- "f9e3c1e5b294383f",
- "eeee16cdd86d70ce"
- ]
- ]
- },
- {
- "id": "892af95c35da20eb",
- "type": "change",
- "z": "26dc23f0398a79c2",
- "name": "Double Press",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "2",
- "tot": "num"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 650,
- "y": 260,
- "wires": [
- [
- "f9e3c1e5b294383f",
- "eeee16cdd86d70ce"
- ]
- ]
- },
- {
- "id": "d4d3d74391052d5b",
- "type": "change",
- "z": "26dc23f0398a79c2",
- "name": "Tripple Press",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "3",
- "tot": "num"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 640,
- "y": 300,
- "wires": [
- [
- "f9e3c1e5b294383f",
- "eeee16cdd86d70ce"
- ]
- ]
- },
- {
- "id": "fb0d6c0a66e1df43",
- "type": "change",
- "z": "26dc23f0398a79c2",
- "name": "Four Press",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "4",
- "tot": "num"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 640,
- "y": 340,
- "wires": [
- [
- "f9e3c1e5b294383f",
- "eeee16cdd86d70ce"
- ]
- ]
- },
- {
- "id": "45f054435fe0ba3a",
- "type": "comment",
- "z": "26dc23f0398a79c2",
- "name": "DELAY - Instructions",
- "info": "In order to ensure correct triggering,\nthe delay should be set to be a little \nlonger than it would take to perfrom the maximum \namount of presses.\n\n",
- "x": 350,
- "y": 420,
- "wires": []
- },
- {
- "id": "de4eb71303ab40f6",
- "type": "comment",
- "z": "26dc23f0398a79c2",
- "name": "Input",
- "info": "",
- "x": 230,
- "y": 40,
- "wires": []
- },
- {
- "id": "508fdcc1deb34a36",
- "type": "comment",
- "z": "26dc23f0398a79c2",
- "name": "Outputs",
- "info": "Debug nodes are here now, but just connect\nthem to what ever you want.\nThe messages sent are in the nodes just before\nthe debug nodes.\n",
- "x": 1090,
- "y": 40,
- "wires": []
- },
- {
- "id": "9c4e7cf586f4231f",
- "type": "delay",
- "z": "26dc23f0398a79c2",
- "name": "Delay",
- "pauseType": "delay",
- "timeout": "1",
- "timeoutUnits": "seconds",
- "rate": "1",
- "nbRateUnits": "1",
- "rateUnits": "second",
- "randomFirst": "1",
- "randomLast": "5",
- "randomUnits": "seconds",
- "drop": false,
- "allowrate": false,
- "outputs": 1,
- "x": 390,
- "y": 380,
- "wires": [
- [
- "fc0263cd622c89ae"
- ]
- ]
- },
- {
- "id": "45c69515b0bc0fec",
- "type": "change",
- "z": "26dc23f0398a79c2",
- "name": "Flow set count",
- "rules": [
- {
- "t": "set",
- "p": "count",
- "pt": "flow",
- "to": "count",
- "tot": "msg"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 1140,
- "y": 460,
- "wires": [
- []
- ]
- },
- {
- "id": "38fadaf395ea0d75",
- "type": "counter",
- "z": "26dc23f0398a79c2",
- "name": "Count presses",
- "init": "0",
- "step": "1",
- "lower": "",
- "upper": "",
- "mode": "increment",
- "outputs": "1",
- "x": 720,
- "y": 460,
- "wires": [
- [
- "45c69515b0bc0fec"
- ]
- ]
- },
- {
- "id": "72c4dc5febf27b7b",
- "type": "change",
- "z": "26dc23f0398a79c2",
- "name": "Store origional payload",
- "rules": [
- {
- "t": "set",
- "p": "org_payload",
- "pt": "flow",
- "to": "payload",
- "tot": "msg",
- "dc": true
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 200,
- "y": 500,
- "wires": [
- []
- ]
- },
- {
- "id": "f9e3c1e5b294383f",
- "type": "function",
- "z": "26dc23f0398a79c2",
- "name": "Merge presses with payload",
- "func": "var presses = msg.payload;\n\nmsg.payload = flow.get(\"org_payload\");\n\nmsg.payload.presses = presses;\nreturn msg;",
- "outputs": 1,
- "timeout": 0,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 920,
- "y": 400,
- "wires": [
- []
- ]
- },
- {
- "id": "eeee16cdd86d70ce",
- "type": "change",
- "z": "26dc23f0398a79c2",
- "name": "Format status",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "{\t \"fill\":\"green\",\t \"shape\":\"dot\",\t \"text\": \"Presses: \" & payload\t}",
- "tot": "jsonata"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 900,
- "y": 160,
- "wires": [
- []
- ]
- },
- {
- "id": "7f86a26448c0ffe9",
- "type": "tab",
- "label": "Hue Dial 10",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "43d7d9f1f7f178af",
- "type": "comment",
- "z": "7f86a26448c0ffe9",
- "name": "Philips Hue dial music control",
- "info": "",
- "x": 260,
- "y": 320,
- "wires": []
- },
- {
- "id": "69b3c5b610b52c51",
- "type": "switch",
- "z": "7f86a26448c0ffe9",
- "name": "TriActionHueTap",
- "property": "payload",
- "propertyType": "msg",
- "rules": [
- {
- "t": "eq",
- "v": "button_1_press_release",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "button_2_press_release",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "button_3_press_release",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "button_4_hold",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "button_4_press_release",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "button_2_hold",
- "vt": "str"
- },
- {
- "t": "regex",
- "v": "dial_rotate_right_.*|dial_rotate_left_.*",
- "vt": "str",
- "case": false
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 7,
- "x": 320,
- "y": 600,
- "wires": [
- [
- "4339f482a2975da3"
- ],
- [
- "3b5d76660b086464"
- ],
- [
- "849b9bb1f87e9d14"
- ],
- [
- "6b7db223d715b6b0"
- ],
- [
- "9bdb160e541ca10a"
- ],
- [
- "53de8e285caa4dc2"
- ],
- [
- "1ab3a3345f2a9443"
- ]
- ]
- },
- {
- "id": "bdf3d59ad27a9947",
- "type": "switch",
- "z": "7f86a26448c0ffe9",
- "name": "last played?",
- "property": "lastplayed",
- "propertyType": "flow",
- "rules": [
- {
- "t": "eq",
- "v": "Discover Weekly",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "Disco",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "Flow, your personal mix",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "regenbogen",
- "vt": "str"
- },
- {
- "t": "else"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 5,
- "x": 2770,
- "y": 480,
- "wires": [
- [
- "67d1c2aace76bcc3",
- "de8a985805195d5d"
- ],
- [
- "31a8514ea3a369e6",
- "169997519ce2e10a"
- ],
- [
- "c9b24861b3feda5c",
- "e437398d25926a50"
- ],
- [
- "b2a08f633395fad5",
- "22daf5dfe92c793c"
- ],
- [
- "af6eba8b97b15d36",
- "27cff7c190fd8776"
- ]
- ]
- },
- {
- "id": "ca828af2ae7a53da",
- "type": "switch",
- "z": "7f86a26448c0ffe9",
- "d": true,
- "name": "playing?",
- "property": "playerstate",
- "propertyType": "flow",
- "rules": [
- {
- "t": "neq",
- "v": "playing",
- "vt": "str"
- },
- {
- "t": "else"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 2,
- "x": 1600,
- "y": 2180,
- "wires": [
- [
- "687e1530f7385d10"
- ],
- [
- "fe4aa048e6699c40"
- ]
- ]
- },
- {
- "id": "fe4aa048e6699c40",
- "type": "function",
- "z": "7f86a26448c0ffe9",
- "d": true,
- "name": "rotation -> volume",
- "func": "var currentVolume = flow.get(\"volume\") || 0.1;\nvar NEWexpectedrotation = msg.payload.rotaryevent;\nvar OLDexpectedrotation = flow.get(\"OLDexpectedrotation\") || 0;\nvar NETexpectedrotation = NEWexpectedrotation - OLDexpectedrotation;\n\n// Vérifier si NEWexpectedrotation est défini et est un nombre valide\nif (isNaN(NEWexpectedrotation)) {\n node.warn(\"NEWexpectedrotation n'est pas un nombre valide\");\n return null; // arrêter le traitement du message\n}\n\nif (msg.payload.hasOwnProperty(\"rotaryevent\")) {\n var rotaryevent = msg.payload.rotaryevent;\n if (rotaryevent == 1) {\n if (NEWexpectedrotation < 0) {\n //msg.payload = Math.round((NEWexpectedrotation) / 15);\n msg.payload = Math.round((NEWexpectedrotation) /15);\n } else if (Math.round((NEWexpectedrotation) / 25) + 1 > 9) {\n msg.payload = 8.5;\n } else {\n //msg.payload = Math.round((NEWexpectedrotation) / 25);\n msg.payload = Math.round((NEWexpectedrotation) / 2);\n }\n } else {\n if (NEWexpectedrotation < 0) {\n // msg.payload = Math.round((NETexpectedrotation) / 15);\n msg.payload = Math.round((NETexpectedrotation) /15);\n } else if (Math.round((NETexpectedrotation) / 25) + 1 > 9) {\n //msg.payload = 9;\n msg.payload = 8.5;\n } else {\n //msg.payload = Math.round((NETexpectedrotation) / 25);\n msg.payload = Math.round((NETexpectedrotation) / 2);\n }\n }\n}\n\nflow.set(\"OLDexpectedrotation\", NEWexpectedrotation);\n\nmsg.payload = (msg.payload / 100) + currentVolume;\n\nif (msg.payload < 0.01) {\n msg.payload = 0;\n}\n\nreturn msg;\n",
- "outputs": 1,
- "timeout": "",
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 2260,
- "y": 2400,
- "wires": [
- [
- "a445632f89446fd9",
- "07d1ff1def880a51"
- ]
- ]
- },
- {
- "id": "67d1c2aace76bcc3",
- "type": "change",
- "z": "7f86a26448c0ffe9",
- "name": "Modify To \"Disco\"",
- "rules": [
- {
- "t": "set",
- "p": "lastplayed",
- "pt": "flow",
- "to": "Disco",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 3170,
- "y": 300,
- "wires": [
- [
- "386ca9ac135971c4"
- ]
- ]
- },
- {
- "id": "4bf1d2dd0f59af70",
- "type": "inject",
- "z": "7f86a26448c0ffe9",
- "name": "Auto-reset source and volume",
- "props": [],
- "repeat": "",
- "crontab": "26 23 * * *",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "x": 290,
- "y": 80,
- "wires": [
- [
- "7e6d73a06b42bec0"
- ]
- ]
- },
- {
- "id": "8e5d56100acb45a6",
- "type": "trigger",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "op1": "light",
- "op2": "volume",
- "op1type": "str",
- "op2type": "str",
- "duration": "3",
- "extend": true,
- "overrideDelay": false,
- "units": "s",
- "reset": "StopLight",
- "bytopic": "all",
- "topic": "topic",
- "outputs": 1,
- "x": 1020,
- "y": 920,
- "wires": [
- [
- "e880641aeb36830d",
- "4064e2e1733df475"
- ]
- ]
- },
- {
- "id": "e880641aeb36830d",
- "type": "change",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "rules": [
- {
- "t": "set",
- "p": "mode",
- "pt": "flow",
- "to": "payload",
- "tot": "msg"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 1260,
- "y": 920,
- "wires": [
- []
- ]
- },
- {
- "id": "4f9fd7aeb6b12cb4",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "toggle living room lights",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "light",
- "service": "turn_on",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "light.credence"
- ],
- "data": "{\"brightness_step\": -150, \"transition\": 0.5}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 1070,
- "y": 860,
- "wires": [
- [
- "4fd5ec8a743f73b4"
- ]
- ]
- },
- {
- "id": "c8b29b8c5557c021",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "toggle living room lights",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "light",
- "service": "toggle",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "light.credence"
- ],
- "data": "{\"brightness_step\": 155, \"transition\": 0.5}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 1510,
- "y": 860,
- "wires": [
- []
- ]
- },
- {
- "id": "9bdb160e541ca10a",
- "type": "delay",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "pauseType": "rate",
- "timeout": "5",
- "timeoutUnits": "seconds",
- "rate": "1",
- "nbRateUnits": "2",
- "rateUnits": "second",
- "randomFirst": "1",
- "randomLast": "5",
- "randomUnits": "seconds",
- "drop": true,
- "allowrate": false,
- "outputs": 1,
- "x": 800,
- "y": 840,
- "wires": [
- [
- "8e5d56100acb45a6",
- "4f9fd7aeb6b12cb4"
- ]
- ]
- },
- {
- "id": "de8a985805195d5d",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "\"Playing Smooth Jazz radio\"",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "tts",
- "service": "google_say",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{\"message\":\"Playlist Vrac\",\"language\":\"fr\"}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [
- {
- "property": "meta",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 3200,
- "y": 340,
- "wires": [
- [
- "386ca9ac135971c4",
- "1f23819ff9254007"
- ]
- ]
- },
- {
- "id": "27cff7c190fd8776",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "\"Playing Discover Weekly on Spotify\"",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": true,
- "domain": "tts",
- "service": "google_say",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{\"message\":\"Qmusic Radio\",\"language\":\"fr\"}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [
- {
- "property": "meta",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 3230,
- "y": 840,
- "wires": [
- [
- "386ca9ac135971c4",
- "df70b12212777c68"
- ]
- ]
- },
- {
- "id": "ac194a7f31aefe85",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "media_player",
- "service": "volume_set",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{ \"volume_level\": {{payload}}}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [
- {
- "property": "meta",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 2630,
- "y": 2400,
- "wires": [
- [
- "4cc441fb62daa1ea"
- ]
- ]
- },
- {
- "id": "4cc441fb62daa1ea",
- "type": "trigger",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "op1": "",
- "op2": "",
- "op1type": "nul",
- "op2type": "payl",
- "duration": "1",
- "extend": true,
- "overrideDelay": false,
- "units": "s",
- "reset": "",
- "bytopic": "all",
- "topic": "topic",
- "outputs": 1,
- "x": 2880,
- "y": 2400,
- "wires": [
- [
- "f924a53f5a27c3fe"
- ]
- ]
- },
- {
- "id": "f924a53f5a27c3fe",
- "type": "switch",
- "z": "7f86a26448c0ffe9",
- "name": "if volume 0",
- "property": "volume",
- "propertyType": "flow",
- "rules": [
- {
- "t": "lte",
- "v": "0",
- "vt": "num"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 1,
- "x": 3050,
- "y": 2400,
- "wires": [
- [
- "242aa30e56d30088"
- ]
- ]
- },
- {
- "id": "242aa30e56d30088",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "media_player",
- "service": "media_pause",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [
- {
- "property": "meta",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 3300,
- "y": 2400,
- "wires": [
- [
- "efe0d62f44ba0bd1"
- ]
- ]
- },
- {
- "id": "849b9bb1f87e9d14",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "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": [
- {
- "property": "payload",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 1200,
- "y": 680,
- "wires": [
- [
- "adc6bd185e0d316a"
- ]
- ]
- },
- {
- "id": "855a54bc1ea31c1f",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "d": true,
- "name": "",
- "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",
- "output_location": "",
- "output_location_type": "none",
- "x": 2280,
- "y": 2180,
- "wires": [
- [
- "3758c9b1690e57e2",
- "efe0d62f44ba0bd1"
- ]
- ]
- },
- {
- "id": "3758c9b1690e57e2",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "media_player",
- "service": "media_play",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [
- {
- "property": "meta",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 3110,
- "y": 2020,
- "wires": [
- [
- "efe0d62f44ba0bd1"
- ]
- ]
- },
- {
- "id": "f4fd5405872c666b",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "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": [
- {
- "property": "payload",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 1210,
- "y": 500,
- "wires": [
- [
- "adc6bd185e0d316a"
- ]
- ]
- },
- {
- "id": "561b3393c91a65ee",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "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": [
- {
- "property": "payload",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 1190,
- "y": 560,
- "wires": [
- [
- "adc6bd185e0d316a"
- ]
- ]
- },
- {
- "id": "c33a8c48c1aa6f3b",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "media_player",
- "service": "media_play",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 3990,
- "y": 840,
- "wires": [
- [
- "fa4820cce656fd80"
- ]
- ]
- },
- {
- "id": "fa4820cce656fd80",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "media_player",
- "service": "shuffle_set",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{\"shuffle\": true}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 4270,
- "y": 840,
- "wires": [
- []
- ]
- },
- {
- "id": "bd2cdd2f4bbc4472",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "media_player",
- "service": "media_play",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 3890,
- "y": 340,
- "wires": [
- [
- "50d81c3d72b3f558"
- ]
- ]
- },
- {
- "id": "f7eb7281f2caf1aa",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "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": [],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 810,
- "y": 80,
- "wires": [
- [
- "69a76da9d36c12a1"
- ]
- ]
- },
- {
- "id": "69a76da9d36c12a1",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "media_player",
- "service": "media_pause",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 1060,
- "y": 80,
- "wires": [
- [
- "ae078c6bec362f51"
- ]
- ]
- },
- {
- "id": "7e6d73a06b42bec0",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "media_player",
- "service": "select_source",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{\"source\":\"Discover Weekly\"}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 560,
- "y": 80,
- "wires": [
- [
- "f7eb7281f2caf1aa"
- ]
- ]
- },
- {
- "id": "ae078c6bec362f51",
- "type": "change",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "rules": [
- {
- "t": "set",
- "p": "lastplayed",
- "pt": "flow",
- "to": "Discover Weekly",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 1290,
- "y": 80,
- "wires": [
- []
- ]
- },
- {
- "id": "4fd5ec8a743f73b4",
- "type": "delay",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "pauseType": "delay",
- "timeout": "0.3",
- "timeoutUnits": "seconds",
- "rate": "1",
- "nbRateUnits": "1",
- "rateUnits": "second",
- "randomFirst": "1",
- "randomLast": "5",
- "randomUnits": "seconds",
- "drop": false,
- "allowrate": false,
- "outputs": 1,
- "x": 1270,
- "y": 860,
- "wires": [
- [
- "c8b29b8c5557c021"
- ]
- ]
- },
- {
- "id": "1060ac72b4f8a208",
- "type": "change",
- "z": "7f86a26448c0ffe9",
- "name": "save volume and playing state",
- "rules": [
- {
- "t": "set",
- "p": "volume",
- "pt": "flow",
- "to": "media.new_state.attributes.volume_level",
- "tot": "msg"
- },
- {
- "t": "set",
- "p": "playerstate",
- "pt": "flow",
- "to": "media.new_state.state",
- "tot": "msg"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 610,
- "y": 420,
- "wires": [
- []
- ]
- },
- {
- "id": "02e73717a9f69cfb",
- "type": "server-state-changed",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "outputs": 1,
- "exposeAsEntityConfig": "",
- "entityId": "media_player.move",
- "entityIdType": "exact",
- "outputInitially": true,
- "stateType": "str",
- "ifState": "",
- "ifStateType": "str",
- "ifStateOperator": "is",
- "outputOnlyOnStateChange": false,
- "for": "0",
- "forType": "num",
- "forUnits": "minutes",
- "ignorePrevStateNull": false,
- "ignorePrevStateUnknown": false,
- "ignorePrevStateUnavailable": false,
- "ignoreCurrentStateUnknown": true,
- "ignoreCurrentStateUnavailable": true,
- "outputProperties": [
- {
- "property": "media",
- "propertyType": "msg",
- "value": "",
- "valueType": "eventData"
- }
- ],
- "x": 260,
- "y": 380,
- "wires": [
- [
- "1060ac72b4f8a208",
- "5e8857d9e2798fd8"
- ]
- ]
- },
- {
- "id": "4c759ad21fe28b89",
- "type": "delay",
- "z": "7f86a26448c0ffe9",
- "d": true,
- "name": "",
- "pauseType": "rate",
- "timeout": "5",
- "timeoutUnits": "seconds",
- "rate": "1",
- "nbRateUnits": "1",
- "rateUnits": "second",
- "randomFirst": "1",
- "randomLast": "5",
- "randomUnits": "seconds",
- "drop": true,
- "allowrate": false,
- "outputs": 1,
- "x": 2070,
- "y": 2180,
- "wires": [
- [
- "855a54bc1ea31c1f"
- ]
- ]
- },
- {
- "id": "a445632f89446fd9",
- "type": "delay",
- "z": "7f86a26448c0ffe9",
- "d": true,
- "name": "limit",
- "pauseType": "rate",
- "timeout": "5",
- "timeoutUnits": "seconds",
- "rate": "1",
- "nbRateUnits": "0.1",
- "rateUnits": "second",
- "randomFirst": "1",
- "randomLast": "5",
- "randomUnits": "seconds",
- "drop": true,
- "allowrate": false,
- "outputs": 1,
- "x": 2440,
- "y": 2400,
- "wires": [
- [
- "ac194a7f31aefe85"
- ]
- ]
- },
- {
- "id": "2b1b6ed8be41b8e5",
- "type": "delay",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "pauseType": "rate",
- "timeout": "5",
- "timeoutUnits": "seconds",
- "rate": "1",
- "nbRateUnits": "2",
- "rateUnits": "second",
- "randomFirst": "1",
- "randomLast": "5",
- "randomUnits": "seconds",
- "drop": true,
- "allowrate": false,
- "outputs": 1,
- "x": 2580,
- "y": 480,
- "wires": [
- [
- "bdf3d59ad27a9947"
- ]
- ]
- },
- {
- "id": "5e8857d9e2798fd8",
- "type": "debug",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "media.new_state.attributes.volume_level",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 650,
- "y": 380,
- "wires": []
- },
- {
- "id": "adc6bd185e0d316a",
- "type": "debug",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload.service",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 1560,
- "y": 560,
- "wires": []
- },
- {
- "id": "386ca9ac135971c4",
- "type": "debug",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "meta.data.message",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 3610,
- "y": 300,
- "wires": []
- },
- {
- "id": "efe0d62f44ba0bd1",
- "type": "debug",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "meta.service",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 3550,
- "y": 2200,
- "wires": []
- },
- {
- "id": "07d1ff1def880a51",
- "type": "debug",
- "z": "7f86a26448c0ffe9",
- "d": true,
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 2590,
- "y": 2450,
- "wires": []
- },
- {
- "id": "35b1cd5f9649755d",
- "type": "comment",
- "z": "7f86a26448c0ffe9",
- "name": "link to latest version of this flow",
- "info": "Latest version of this flow can be found at \nhttps://flows.nodered.org/flow/c95d562d4858cbe1bf80fee95ba9815f#",
- "x": 560,
- "y": 320,
- "wires": []
- },
- {
- "id": "4931bbc27225a7d7",
- "type": "mqtt in",
- "z": "7f86a26448c0ffe9",
- "name": "MQTT Trigger",
- "topic": "zigbee2mqtt/HueSwitch/action",
- "qos": "2",
- "datatype": "auto-detect",
- "broker": "99709302a818dd3b",
- "nl": false,
- "rap": false,
- "inputs": 0,
- "x": 110,
- "y": 600,
- "wires": [
- [
- "ce97660f4c735035",
- "69b3c5b610b52c51"
- ]
- ]
- },
- {
- "id": "ce97660f4c735035",
- "type": "debug",
- "z": "7f86a26448c0ffe9",
- "name": "MqTT Triggerr",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 160,
- "y": 720,
- "wires": []
- },
- {
- "id": "1ab3a3345f2a9443",
- "type": "switch",
- "z": "7f86a26448c0ffe9",
- "name": "Mode Light/Temp/Volume",
- "property": "mode",
- "propertyType": "flow",
- "rules": [
- {
- "t": "eq",
- "v": "temperature",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "volume",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "light",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 3,
- "x": 550,
- "y": 1100,
- "wires": [
- [
- "b220b796f9f7c38e",
- "b4b80bfb0cbccb46"
- ],
- [
- "cf52694a024cd0af",
- "36af925053eb1254"
- ],
- [
- "289a557d7b669421",
- "00d898a5c77af9a8",
- "a682a60698636eea",
- "8e5d56100acb45a6"
- ]
- ]
- },
- {
- "id": "b254c88688b77051",
- "type": "sonos-universal",
- "z": "7f86a26448c0ffe9",
- "confignode": "421ce7d478b2e9b1",
- "command": "group.play.mysonos",
- "state": "",
- "stateType": "str",
- "avoidCheckPlayerAvailability": false,
- "name": "",
- "x": 3640,
- "y": 340,
- "wires": [
- [
- "bd2cdd2f4bbc4472"
- ]
- ]
- },
- {
- "id": "1f23819ff9254007",
- "type": "change",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "Liste",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 3440,
- "y": 340,
- "wires": [
- [
- "b254c88688b77051"
- ]
- ]
- },
- {
- "id": "ca840d3c025e196b",
- "type": "sonos-manage-mysonos",
- "z": "7f86a26448c0ffe9",
- "confignode": "421ce7d478b2e9b1",
- "command": "mysonos.stream.item",
- "state": "",
- "stateType": "str",
- "avoidCheckPlayerAvailability": false,
- "name": "",
- "x": 3740,
- "y": 840,
- "wires": [
- [
- "c33a8c48c1aa6f3b"
- ]
- ]
- },
- {
- "id": "df70b12212777c68",
- "type": "change",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "Qmusic",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 3500,
- "y": 840,
- "wires": [
- [
- "ca840d3c025e196b"
- ]
- ]
- },
- {
- "id": "af6eba8b97b15d36",
- "type": "change",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "rules": [
- {
- "t": "set",
- "p": "lastplayed",
- "pt": "flow",
- "to": "Discover Weekly",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 3170,
- "y": 800,
- "wires": [
- []
- ]
- },
- {
- "id": "fe52e16b1e7b1c09",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "media_player",
- "service": "shuffle_set",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{\"shuffle\": true}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 4090,
- "y": 460,
- "wires": [
- []
- ]
- },
- {
- "id": "cc4046f96ad15ce2",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "media_player",
- "service": "media_play",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 3810,
- "y": 460,
- "wires": [
- [
- "fe52e16b1e7b1c09"
- ]
- ]
- },
- {
- "id": "f9bf699dbec25482",
- "type": "sonos-manage-mysonos",
- "z": "7f86a26448c0ffe9",
- "confignode": "421ce7d478b2e9b1",
- "command": "mysonos.stream.item",
- "state": "",
- "stateType": "str",
- "avoidCheckPlayerAvailability": false,
- "name": "",
- "x": 3560,
- "y": 460,
- "wires": [
- [
- "cc4046f96ad15ce2"
- ]
- ]
- },
- {
- "id": "169997519ce2e10a",
- "type": "change",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "Viva Cité Charleroi",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 3160,
- "y": 460,
- "wires": [
- [
- "9cf82b52e7db03d2"
- ]
- ]
- },
- {
- "id": "31a8514ea3a369e6",
- "type": "change",
- "z": "7f86a26448c0ffe9",
- "name": "Modify To \"Flow, your personal mix\"",
- "rules": [
- {
- "t": "set",
- "p": "lastplayed",
- "pt": "flow",
- "to": "Flow, your personal mix",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 3220,
- "y": 420,
- "wires": [
- []
- ]
- },
- {
- "id": "289a557d7b669421",
- "type": "debug",
- "z": "7f86a26448c0ffe9",
- "name": "debug 172",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "true",
- "targetType": "full",
- "statusVal": "",
- "statusType": "auto",
- "x": 1090,
- "y": 1700,
- "wires": []
- },
- {
- "id": "85a6f85c2d9f9367",
- "type": "sonos-universal",
- "z": "7f86a26448c0ffe9",
- "confignode": "421ce7d478b2e9b1",
- "command": "group.play.mysonos",
- "state": "Flow, your personal mix",
- "stateType": "str",
- "avoidCheckPlayerAvailability": false,
- "name": "",
- "x": 3520,
- "y": 620,
- "wires": [
- [
- "c288f59337b9a82f"
- ]
- ]
- },
- {
- "id": "c288f59337b9a82f",
- "type": "debug",
- "z": "7f86a26448c0ffe9",
- "name": "End Flow, your personal mix",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 3840,
- "y": 620,
- "wires": []
- },
- {
- "id": "c9b24861b3feda5c",
- "type": "change",
- "z": "7f86a26448c0ffe9",
- "name": "Modify To \"Regenbogen\"",
- "rules": [
- {
- "t": "set",
- "p": "lastplayed",
- "pt": "flow",
- "to": "regenbogen",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 3230,
- "y": 580,
- "wires": [
- []
- ]
- },
- {
- "id": "7445beb1f5f8513b",
- "type": "debug",
- "z": "7f86a26448c0ffe9",
- "d": true,
- "name": "debug 173",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1990,
- "y": 2100,
- "wires": []
- },
- {
- "id": "9a061e5f0676af39",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "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": 1790,
- "y": 1320,
- "wires": [
- [
- "3758c9b1690e57e2"
- ]
- ]
- },
- {
- "id": "c79cbc2eb96367a7",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "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": 1800,
- "y": 1420,
- "wires": [
- [
- "4cc441fb62daa1ea"
- ]
- ]
- },
- {
- "id": "36af925053eb1254",
- "type": "switch",
- "z": "7f86a26448c0ffe9",
- "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_slow",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "dial_rotate_left_fast",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 3,
- "x": 1130,
- "y": 1420,
- "wires": [
- [
- "c79cbc2eb96367a7"
- ],
- [
- "c79cbc2eb96367a7"
- ],
- [
- "c79cbc2eb96367a7"
- ]
- ]
- },
- {
- "id": "cf52694a024cd0af",
- "type": "switch",
- "z": "7f86a26448c0ffe9",
- "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": 1130,
- "y": 1340,
- "wires": [
- [
- "9a061e5f0676af39"
- ],
- [
- "9a061e5f0676af39"
- ],
- [
- "9a061e5f0676af39"
- ]
- ]
- },
- {
- "id": "00d898a5c77af9a8",
- "type": "switch",
- "z": "7f86a26448c0ffe9",
- "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_slow",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "dial_rotate_left_fast",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 3,
- "x": 1130,
- "y": 1820,
- "wires": [
- [
- "0584655d50c80cda"
- ],
- [
- "0584655d50c80cda"
- ],
- [
- "0584655d50c80cda"
- ]
- ]
- },
- {
- "id": "0584655d50c80cda",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "Light Down",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "light",
- "service": "turn_on",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "light.credence"
- ],
- "data": "{\t \"brightness_step_pct\": -10}",
- "dataType": "jsonata",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "x": 1800,
- "y": 1840,
- "wires": [
- []
- ]
- },
- {
- "id": "8ba3c470fabfc8d9",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "Light UP",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "light",
- "service": "turn_on",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "light.credence"
- ],
- "data": "{\t \"brightness_step_pct\": 10}",
- "dataType": "jsonata",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "x": 1800,
- "y": 1760,
- "wires": [
- []
- ]
- },
- {
- "id": "a682a60698636eea",
- "type": "switch",
- "z": "7f86a26448c0ffe9",
- "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": 1140,
- "y": 1740,
- "wires": [
- [
- "8ba3c470fabfc8d9"
- ],
- [
- "8ba3c470fabfc8d9"
- ],
- [
- "8ba3c470fabfc8d9"
- ]
- ]
- },
- {
- "id": "53de8e285caa4dc2",
- "type": "delay",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "pauseType": "rate",
- "timeout": "5",
- "timeoutUnits": "seconds",
- "rate": "1",
- "nbRateUnits": "2",
- "rateUnits": "second",
- "randomFirst": "1",
- "randomLast": "5",
- "randomUnits": "seconds",
- "drop": true,
- "allowrate": false,
- "outputs": 1,
- "x": 800,
- "y": 1020,
- "wires": [
- [
- "b220b796f9f7c38e"
- ]
- ]
- },
- {
- "id": "b220b796f9f7c38e",
- "type": "trigger",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "op1": "temperature",
- "op2": "volume",
- "op1type": "str",
- "op2type": "str",
- "duration": "3",
- "extend": true,
- "overrideDelay": false,
- "units": "s",
- "reset": "StopTemperature",
- "bytopic": "all",
- "topic": "payload",
- "outputs": 1,
- "x": 1060,
- "y": 1060,
- "wires": [
- [
- "ace79b93065e6d79",
- "6ae624698bc53f1b"
- ]
- ]
- },
- {
- "id": "ace79b93065e6d79",
- "type": "change",
- "z": "7f86a26448c0ffe9",
- "name": "Temperature",
- "rules": [
- {
- "t": "set",
- "p": "mode",
- "pt": "flow",
- "to": "payload",
- "tot": "msg"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 1850,
- "y": 1060,
- "wires": [
- []
- ]
- },
- {
- "id": "2775de41299ab7cf",
- "type": "switch",
- "z": "7f86a26448c0ffe9",
- "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_slow",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "dial_rotate_left_fast",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 3,
- "x": 3210,
- "y": 1440,
- "wires": [
- [
- "763aea758f0e645d"
- ],
- [
- "763aea758f0e645d"
- ],
- [
- "763aea758f0e645d"
- ]
- ]
- },
- {
- "id": "3268c55095832389",
- "type": "switch",
- "z": "7f86a26448c0ffe9",
- "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": 3220,
- "y": 1260,
- "wires": [
- [
- "dba0341f9ba0de42"
- ],
- [
- "dba0341f9ba0de42"
- ],
- [
- "dba0341f9ba0de42"
- ]
- ]
- },
- {
- "id": "fd833d0dc3a50f2a",
- "type": "inject",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "dial_rotate_right_step",
- "payloadType": "str",
- "x": 2980,
- "y": 1160,
- "wires": [
- [
- "3268c55095832389"
- ]
- ]
- },
- {
- "id": "ed01e60e45b1d62b",
- "type": "inject",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "dial_rotate_left_step",
- "payloadType": "str",
- "x": 2970,
- "y": 1560,
- "wires": [
- [
- "2775de41299ab7cf"
- ]
- ]
- },
- {
- "id": "753732637b4164c1",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "Light UP",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "light",
- "service": "turn_on",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "light.credence"
- ],
- "data": "payload",
- "dataType": "jsonata",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "x": 4100,
- "y": 1200,
- "wires": [
- [
- "3869712128d983b6"
- ]
- ]
- },
- {
- "id": "50b068d480a6a157",
- "type": "debug",
- "z": "7f86a26448c0ffe9",
- "name": "WarmColor",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 4690,
- "y": 1200,
- "wires": []
- },
- {
- "id": "e93b9dc6054e4c2b",
- "type": "debug",
- "z": "7f86a26448c0ffe9",
- "name": "Coldcolor",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 4700,
- "y": 1480,
- "wires": []
- },
- {
- "id": "a20e2a9b2d75bbcd",
- "type": "function",
- "z": "7f86a26448c0ffe9",
- "name": "GoToWarm",
- "func": "// Récupérer la valeur actuelle de \"color_temp\" depuis le contexte\n//var currentColorTemp = context.get('currentColorTemp') || 154;\nvar currentColorTemp = flow.get('Temp') || 154;\n// Ajouter 10 à la valeur actuelle de \"color_temp\"\nvar newColorTemp = currentColorTemp + 32;\n\n// Limiter la nouvelle valeur de \"color_temp\" à 500\nnewColorTemp = Math.min(newColorTemp, 500);\n\n// Mettre à jour la valeur de \"color_temp\" dans le contexte\ncontext.set('currentColorTemp', newColorTemp);\n\n// Mettre à jour le payload avec la nouvelle valeur de \"color_temp\"\nmsg.payload = {\n \"color_temp\": newColorTemp\n};\n\nreturn msg;\n",
- "outputs": 1,
- "timeout": 0,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 3910,
- "y": 1200,
- "wires": [
- [
- "753732637b4164c1",
- "6eaee65f569fb2df"
- ]
- ]
- },
- {
- "id": "aa16e853d85f1dd9",
- "type": "inject",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "",
- "payloadType": "date",
- "x": 3680,
- "y": 1120,
- "wires": [
- [
- "a20e2a9b2d75bbcd"
- ]
- ]
- },
- {
- "id": "4a0a4b548072323d",
- "type": "inject",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "",
- "payloadType": "date",
- "x": 3780,
- "y": 1540,
- "wires": [
- [
- "5f87a72e61d1ba37"
- ]
- ]
- },
- {
- "id": "6eaee65f569fb2df",
- "type": "debug",
- "z": "7f86a26448c0ffe9",
- "name": "debug 174",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 4110,
- "y": 1300,
- "wires": []
- },
- {
- "id": "dba0341f9ba0de42",
- "type": "api-current-state",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 3,
- "outputs": 1,
- "halt_if": "",
- "halt_if_type": "str",
- "halt_if_compare": "is",
- "entity_id": "light.credence",
- "state_type": "str",
- "blockInputOverrides": false,
- "outputProperties": [
- {
- "property": "payload",
- "propertyType": "msg",
- "value": "",
- "valueType": "entityState"
- },
- {
- "property": "data",
- "propertyType": "msg",
- "value": "",
- "valueType": "entity"
- }
- ],
- "for": "0",
- "forType": "num",
- "forUnits": "minutes",
- "override_topic": false,
- "state_location": "payload",
- "override_payload": "msg",
- "entity_location": "data",
- "override_data": "msg",
- "x": 3720,
- "y": 1260,
- "wires": [
- [
- "a20e2a9b2d75bbcd"
- ]
- ]
- },
- {
- "id": "3869712128d983b6",
- "type": "api-current-state",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 3,
- "outputs": 1,
- "halt_if": "",
- "halt_if_type": "str",
- "halt_if_compare": "is",
- "entity_id": "light.credence",
- "state_type": "str",
- "blockInputOverrides": false,
- "outputProperties": [
- {
- "property": "payload",
- "propertyType": "msg",
- "value": "",
- "valueType": "entityState"
- },
- {
- "property": "data",
- "propertyType": "msg",
- "value": "",
- "valueType": "entity"
- }
- ],
- "for": "0",
- "forType": "num",
- "forUnits": "minutes",
- "override_topic": false,
- "state_location": "payload",
- "override_payload": "msg",
- "entity_location": "data",
- "override_data": "msg",
- "x": 4420,
- "y": 1200,
- "wires": [
- [
- "50b068d480a6a157"
- ]
- ]
- },
- {
- "id": "afaf9a31aebf3812",
- "type": "api-current-state",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 3,
- "outputs": 1,
- "halt_if": "",
- "halt_if_type": "str",
- "halt_if_compare": "is",
- "entity_id": "light.credence",
- "state_type": "str",
- "blockInputOverrides": false,
- "outputProperties": [
- {
- "property": "payload",
- "propertyType": "msg",
- "value": "",
- "valueType": "entityState"
- },
- {
- "property": "data",
- "propertyType": "msg",
- "value": "",
- "valueType": "entity"
- }
- ],
- "for": "0",
- "forType": "num",
- "forUnits": "minutes",
- "override_topic": false,
- "state_location": "payload",
- "override_payload": "msg",
- "entity_location": "data",
- "override_data": "msg",
- "x": 4420,
- "y": 1480,
- "wires": [
- [
- "e93b9dc6054e4c2b"
- ]
- ]
- },
- {
- "id": "5f87a72e61d1ba37",
- "type": "function",
- "z": "7f86a26448c0ffe9",
- "name": "GoToCold",
- "func": "// Récupérer la valeur actuelle de \"color_temp\" depuis le contexte\nvar currentColorTemp = flow.get('Temp') || 500;\n\n// Soustrait 10 à la valeur actuelle de \"color_temp\"\nvar newColorTemp = currentColorTemp - 32;\n\n// Limiter la nouvelle valeur de \"color_temp\" à 154\nnewColorTemp = Math.max(newColorTemp, 154);\n\n// Mettre à jour la valeur de \"color_temp\" dans le contexte\ncontext.set('currentColorTemp', newColorTemp);\n\n// Mettre à jour le payload avec la nouvelle valeur de \"color_temp\"\nmsg.payload = {\n \"color_temp\": newColorTemp\n};\n\nreturn msg;\n",
- "outputs": 1,
- "timeout": 0,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 3920,
- "y": 1480,
- "wires": [
- [
- "9e6c9d71af35a59b"
- ]
- ]
- },
- {
- "id": "9e6c9d71af35a59b",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "Light DOWN",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "light",
- "service": "turn_on",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "light.credence"
- ],
- "data": "payload",
- "dataType": "jsonata",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "x": 4130,
- "y": 1480,
- "wires": [
- [
- "afaf9a31aebf3812"
- ]
- ]
- },
- {
- "id": "763aea758f0e645d",
- "type": "api-current-state",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 3,
- "outputs": 1,
- "halt_if": "",
- "halt_if_type": "str",
- "halt_if_compare": "is",
- "entity_id": "light.credence",
- "state_type": "str",
- "blockInputOverrides": false,
- "outputProperties": [
- {
- "property": "payload",
- "propertyType": "msg",
- "value": "",
- "valueType": "entityState"
- },
- {
- "property": "data",
- "propertyType": "msg",
- "value": "",
- "valueType": "entity"
- }
- ],
- "for": "0",
- "forType": "num",
- "forUnits": "minutes",
- "override_topic": false,
- "state_location": "payload",
- "override_payload": "msg",
- "entity_location": "data",
- "override_data": "msg",
- "x": 3720,
- "y": 1440,
- "wires": [
- [
- "5f87a72e61d1ba37"
- ]
- ]
- },
- {
- "id": "fb015ed93c604144",
- "type": "server-state-changed",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "outputs": 1,
- "exposeAsEntityConfig": "",
- "entityId": "light.credence",
- "entityIdType": "exact",
- "outputInitially": true,
- "stateType": "str",
- "ifState": "",
- "ifStateType": "str",
- "ifStateOperator": "is",
- "outputOnlyOnStateChange": false,
- "for": "0",
- "forType": "num",
- "forUnits": "minutes",
- "ignorePrevStateNull": false,
- "ignorePrevStateUnknown": false,
- "ignorePrevStateUnavailable": false,
- "ignoreCurrentStateUnknown": true,
- "ignoreCurrentStateUnavailable": true,
- "outputProperties": [
- {
- "property": "media",
- "propertyType": "msg",
- "value": "",
- "valueType": "eventData"
- }
- ],
- "x": 3940,
- "y": 960,
- "wires": [
- [
- "a01173b36556f6d3",
- "862dc0c9bdf581c8",
- "7823fe6957466610"
- ]
- ]
- },
- {
- "id": "862dc0c9bdf581c8",
- "type": "debug",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "media.new_state.attributes.color_temp",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 4310,
- "y": 980,
- "wires": []
- },
- {
- "id": "a01173b36556f6d3",
- "type": "change",
- "z": "7f86a26448c0ffe9",
- "name": "save Brightness and Temperature",
- "rules": [
- {
- "t": "set",
- "p": "Temp",
- "pt": "flow",
- "to": "media.new_state.attributes.color_temp",
- "tot": "msg"
- },
- {
- "t": "set",
- "p": "Bright",
- "pt": "flow",
- "to": "media.new_state.attributes.brightness",
- "tot": "msg"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 4280,
- "y": 1040,
- "wires": [
- [
- "60fa85e9cb5bdc68"
- ]
- ]
- },
- {
- "id": "7823fe6957466610",
- "type": "debug",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "media.new_state.attributes.brightness",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 4310,
- "y": 920,
- "wires": []
- },
- {
- "id": "60fa85e9cb5bdc68",
- "type": "debug",
- "z": "7f86a26448c0ffe9",
- "name": "debug 175",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "true",
- "targetType": "full",
- "statusVal": "",
- "statusType": "auto",
- "x": 4650,
- "y": 1040,
- "wires": []
- },
- {
- "id": "6b7db223d715b6b0",
- "type": "link out",
- "z": "7f86a26448c0ffe9",
- "name": "SelectMediaSource_Out",
- "mode": "link",
- "links": [
- "89ece9afab365c00"
- ],
- "x": 1170,
- "y": 760,
- "wires": [],
- "l": true,
- "info": "SelectMediaSource"
- },
- {
- "id": "89ece9afab365c00",
- "type": "link in",
- "z": "7f86a26448c0ffe9",
- "name": "SelectMediaSource_In",
- "links": [
- "6b7db223d715b6b0"
- ],
- "x": 2340,
- "y": 480,
- "wires": [
- [
- "2b1b6ed8be41b8e5"
- ]
- ],
- "l": true
- },
- {
- "id": "cc1dbb45af6098d8",
- "type": "comment",
- "z": "7f86a26448c0ffe9",
- "name": "MediaSource_Comment",
- "info": "",
- "x": 2470,
- "y": 240,
- "wires": []
- },
- {
- "id": "b4b80bfb0cbccb46",
- "type": "link out",
- "z": "7f86a26448c0ffe9",
- "name": "SelectTemperatureWarm_Out",
- "mode": "link",
- "links": [
- "abdef70d47659d0e"
- ],
- "x": 1130,
- "y": 1100,
- "wires": [],
- "l": true
- },
- {
- "id": "abdef70d47659d0e",
- "type": "link in",
- "z": "7f86a26448c0ffe9",
- "name": "SelectTemperatureWarm_In",
- "links": [
- "b4b80bfb0cbccb46"
- ],
- "x": 2820,
- "y": 1340,
- "wires": [
- [
- "3268c55095832389",
- "2775de41299ab7cf"
- ]
- ],
- "l": true
- },
- {
- "id": "687e1530f7385d10",
- "type": "change",
- "z": "7f86a26448c0ffe9",
- "d": true,
- "name": "",
- "rules": [
- {
- "t": "set",
- "p": "OLDexpectedrotation",
- "pt": "flow",
- "to": "0",
- "tot": "num"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 1840,
- "y": 2180,
- "wires": [
- [
- "4c759ad21fe28b89",
- "7445beb1f5f8513b"
- ]
- ]
- },
- {
- "id": "710aed7ac5039fb3",
- "type": "inject",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "",
- "payloadType": "date",
- "x": 3030,
- "y": 900,
- "wires": [
- [
- "27cff7c190fd8776"
- ]
- ]
- },
- {
- "id": "907bfd7886505516",
- "type": "inject",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "",
- "payloadType": "date",
- "x": 2750,
- "y": 180,
- "wires": [
- [
- "de8a985805195d5d"
- ]
- ]
- },
- {
- "id": "6ae624698bc53f1b",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "\"Mode Température\"",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "tts",
- "service": "google_say",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{\"message\":\"Mode {{ payload }}\",\"language\":\"fr\"}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [
- {
- "property": "meta",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 1880,
- "y": 1120,
- "wires": [
- []
- ]
- },
- {
- "id": "4064e2e1733df475",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "\"Mode Light Volume\"",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "tts",
- "service": "google_say",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{\"message\":\"Mode {{ payload }}\",\"language\":\"fr\"}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [
- {
- "property": "meta",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 1220,
- "y": 980,
- "wires": [
- []
- ]
- },
- {
- "id": "afd6122cd75b5305",
- "type": "inject",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "",
- "payloadType": "date",
- "x": 980,
- "y": 980,
- "wires": [
- [
- "4064e2e1733df475"
- ]
- ]
- },
- {
- "id": "e437398d25926a50",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "\"Playing Personal Flow Mix\"",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": true,
- "domain": "tts",
- "service": "google_say",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{\"message\":\"Flow Personnel\",\"language\":\"fr\"}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [
- {
- "property": "meta",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 3220,
- "y": 620,
- "wires": [
- [
- "85a6f85c2d9f9367"
- ]
- ]
- },
- {
- "id": "9cf82b52e7db03d2",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "\"Playing Discover Weekly on Spotify\"",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": true,
- "domain": "tts",
- "service": "google_say",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{\"message\":\"Radio {{ payload }}\",\"language\":\"fr\"}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [
- {
- "property": "meta",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 3350,
- "y": 520,
- "wires": [
- [
- "f9bf699dbec25482"
- ]
- ]
- },
- {
- "id": "50d81c3d72b3f558",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "media_player",
- "service": "shuffle_set",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{\"shuffle\": true}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 4150,
- "y": 340,
- "wires": [
- []
- ]
- },
- {
- "id": "22daf5dfe92c793c",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "\"Playing Regenbogen Radio\"",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": true,
- "domain": "tts",
- "service": "google_say",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{\"message\":\"Radio Regenbogen\",\"language\":\"fr\"}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [
- {
- "property": "meta",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 3200,
- "y": 740,
- "wires": [
- [
- "aed340ac587e957e"
- ]
- ]
- },
- {
- "id": "dadadfb7ce4a93c0",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "media_player",
- "service": "media_play",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 3990,
- "y": 740,
- "wires": [
- [
- "6e410ecf50642822"
- ]
- ]
- },
- {
- "id": "6e410ecf50642822",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "media_player",
- "service": "shuffle_set",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{\"shuffle\": true}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 4270,
- "y": 740,
- "wires": [
- []
- ]
- },
- {
- "id": "d5594ad8e8254ee0",
- "type": "sonos-manage-mysonos",
- "z": "7f86a26448c0ffe9",
- "confignode": "421ce7d478b2e9b1",
- "command": "mysonos.stream.item",
- "state": "",
- "stateType": "str",
- "avoidCheckPlayerAvailability": false,
- "name": "",
- "x": 3740,
- "y": 740,
- "wires": [
- [
- "dadadfb7ce4a93c0"
- ]
- ]
- },
- {
- "id": "aed340ac587e957e",
- "type": "change",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "Radio Regenbogen",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 3500,
- "y": 740,
- "wires": [
- [
- "d5594ad8e8254ee0"
- ]
- ]
- },
- {
- "id": "b2a08f633395fad5",
- "type": "change",
- "z": "7f86a26448c0ffe9",
- "name": "Modify To \"Nothing\"",
- "rules": [
- {
- "t": "set",
- "p": "lastplayed",
- "pt": "flow",
- "to": "Nothing",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 3170,
- "y": 700,
- "wires": [
- []
- ]
- },
- {
- "id": "4339f482a2975da3",
- "type": "subflow:26dc23f0398a79c2",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "x": 550,
- "y": 480,
- "wires": [
- [
- "f4fd5405872c666b"
- ],
- [
- "2df17518fd7542ed"
- ],
- [
- "1a94445325012d83"
- ],
- [
- "e1416af43cc79f22"
- ],
- []
- ]
- },
- {
- "id": "1a94445325012d83",
- "type": "change",
- "z": "7f86a26448c0ffe9",
- "name": "StopLight",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "StopLight",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 720,
- "y": 920,
- "wires": [
- [
- "b220b796f9f7c38e",
- "8e5d56100acb45a6"
- ]
- ]
- },
- {
- "id": "2df17518fd7542ed",
- "type": "change",
- "z": "7f86a26448c0ffe9",
- "name": "StopTemperature",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "StopTemperature",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 850,
- "y": 740,
- "wires": [
- [
- "8e5d56100acb45a6",
- "b220b796f9f7c38e"
- ]
- ]
- },
- {
- "id": "e1416af43cc79f22",
- "type": "cycle",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "outputs": 4,
- "x": 1050,
- "y": 360,
- "wires": [
- [
- "cde88e5d87fea5a6"
- ],
- [
- "0e7fa59138767a93"
- ],
- [
- "153d67a653c75ef2"
- ],
- [
- "4a564cc65af49da3"
- ]
- ]
- },
- {
- "id": "e361ffd3307d29d2",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "homeassistant",
- "service": "turn_on",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "scene.cuisine_all_on"
- ],
- "data": "",
- "dataType": "jsonata",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "x": 1520,
- "y": 220,
- "wires": [
- []
- ]
- },
- {
- "id": "dfd895fae80f7c76",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "homeassistant",
- "service": "turn_on",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "scene.ambiance_chaude"
- ],
- "data": "",
- "dataType": "jsonata",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "x": 1520,
- "y": 360,
- "wires": [
- []
- ]
- },
- {
- "id": "f4d380051b7769e8",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "homeassistant",
- "service": "turn_on",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "scene.ambiance_chaude_froide"
- ],
- "data": "",
- "dataType": "jsonata",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "x": 1520,
- "y": 280,
- "wires": [
- []
- ]
- },
- {
- "id": "0e7fa59138767a93",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "\"Ambiance Froide\"",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "tts",
- "service": "google_say",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{\"message\":\"Ambiance Froide\",\"language\":\"fr\"}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [
- {
- "property": "meta",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 1290,
- "y": 280,
- "wires": [
- [
- "f4d380051b7769e8"
- ]
- ]
- },
- {
- "id": "153d67a653c75ef2",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "\"Ambiance Chaude\"",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "tts",
- "service": "google_say",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{\"message\":\"Ambiance Chaude\",\"language\":\"fr\"}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [
- {
- "property": "meta",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 1300,
- "y": 360,
- "wires": [
- [
- "dfd895fae80f7c76"
- ]
- ]
- },
- {
- "id": "cde88e5d87fea5a6",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "\"Cuisine All On\"",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "tts",
- "service": "google_say",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{\"message\":\"Cuisine All On\",\"language\":\"en\"}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [
- {
- "property": "meta",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 1280,
- "y": 220,
- "wires": [
- [
- "e361ffd3307d29d2"
- ]
- ]
- },
- {
- "id": "3b5d76660b086464",
- "type": "subflow:26dc23f0398a79c2",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "x": 730,
- "y": 540,
- "wires": [
- [
- "561b3393c91a65ee"
- ],
- [],
- [],
- [
- "fae1ec289807d35a"
- ],
- []
- ]
- },
- {
- "id": "fae1ec289807d35a",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "\"Cuisine All Off\"",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "tts",
- "service": "google_say",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{\"message\":\"Cuisine All Off\",\"language\":\"en\"}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [
- {
- "property": "meta",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 1020,
- "y": 620,
- "wires": [
- [
- "9601db57694ee87e"
- ]
- ]
- },
- {
- "id": "9601db57694ee87e",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "homeassistant",
- "service": "turn_on",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "scene.cuisine_off"
- ],
- "data": "",
- "dataType": "jsonata",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "x": 1240,
- "y": 620,
- "wires": [
- []
- ]
- },
- {
- "id": "1dd33ddc2b8fb7ac",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "scene_presets",
- "service": "apply_preset",
- "areaId": [],
- "deviceId": [],
- "entityId": [],
- "data": "{\"preset_id\":\"a592fa63-4ba6-4399-a120-1c0b79ac832d\",\"targets\":{\"device_id\":[\"02035b35b4f1a86e0265d30e5c3e31b0\",\"16d5850afa14b5bac0fdf35a7ce590d1\"]},\"shuffle\":false,\"smart_shuffle\":false}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [],
- "queue": "none",
- "x": 1600,
- "y": 440,
- "wires": [
- []
- ]
- },
- {
- "id": "4a564cc65af49da3",
- "type": "api-call-service",
- "z": "7f86a26448c0ffe9",
- "name": "\"Ambiance Miami\"",
- "server": "92ab386eaaffa3ef",
- "version": 5,
- "debugenabled": false,
- "domain": "tts",
- "service": "google_say",
- "areaId": [],
- "deviceId": [],
- "entityId": [
- "media_player.move"
- ],
- "data": "{\"message\":\"Ambiance Miami\",\"language\":\"en\"}",
- "dataType": "json",
- "mergeContext": "",
- "mustacheAltTags": false,
- "outputProperties": [
- {
- "property": "meta",
- "propertyType": "msg",
- "value": "",
- "valueType": "data"
- }
- ],
- "queue": "none",
- "output_location": "",
- "output_location_type": "none",
- "x": 1290,
- "y": 420,
- "wires": [
- [
- "1dd33ddc2b8fb7ac"
- ]
- ]
- },
- {
- "id": "5f72208df073a15c",
- "type": "inject",
- "z": "7f86a26448c0ffe9",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "",
- "payloadType": "date",
- "x": 1060,
- "y": 440,
- "wires": [
- [
- "4a564cc65af49da3"
- ]
- ]
- },
- {
- "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
- },
- {
- "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": "421ce7d478b2e9b1",
- "type": "sonos-config",
- "name": "Move",
- "serialnum": "",
- "ipaddress": "192.168.1.24"
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement