Hi
i have a node red flow that plays a radiostation stream. Whilst playing i created a extra commando, thats says something via google.translate as a information. The used media player is a Sonos ERA 100.
So the stream plays its radiostream from the radio browser and when the information triggers, the volume gets automaticly down, the google.translate say command works and after that the music stream continues with the old volume level again. This works without any extra programming somehow.
So i copied the whole flow, to work in another room. But somehow, it works complete different. Here the radiostream stops, that information was spoken and thats it. The stream is not playing again.
I have tried it with my old sonos play:1 play:3 and play:5.
Is this only supported by newer sonos-speakers? If yes, is there a possibility to have the same smooth behavior with the old sonos ones?
[{"id":"4e994db4b13653d5","type":"subflow","name":"Hue Tap Dial longpress","info":"","category":"","in":[{"x":180,"y":200,"wires":[{"id":"68fbdca716ada157"}]}],"out":[{"x":2120,"y":400,"wires":[{"id":"0bd68f511154ccc1","port":3}]},{"x":2130,"y":440,"wires":[{"id":"0bd68f511154ccc1","port":4}]},{"x":2130,"y":260,"wires":[{"id":"0bd68f511154ccc1","port":0}]},{"x":2130,"y":300,"wires":[{"id":"0bd68f511154ccc1","port":1}]},{"x":2130,"y":340,"wires":[{"id":"0bd68f511154ccc1","port":2}]},{"x":2140,"y":480,"wires":[{"id":"0bd68f511154ccc1","port":5}]},{"x":1050,"y":640,"wires":[{"id":"59b5d0e44c355dad","port":7}]}],"env":[],"meta":{},"color":"#C0DEED","inputLabels":["zha"],"outputLabels":["up","down","click","double","tripple","longpress","else"],"status":{"x":1280,"y":580,"wires":[{"id":"66b32dad9f5784b3","port":0}]}},{"id":"68fbdca716ada157","type":"function","z":"4e994db4b13653d5","name":"Reformat data","func":"Object.keys(msg.payload.event).forEach((key, index) => {\n msg.payload[key] = msg.payload.event[key];\n})\ndelete msg.payload[\"event\"];\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":440,"y":320,"wires":[["59b5d0e44c355dad"]]},{"id":"59b5d0e44c355dad","type":"switch","z":"4e994db4b13653d5","name":"Knob action","property":"msg","propertyType":"jsonata","rules":[{"t":"jsonata_exp","v":"payload.command = \"step_with_on_off\" and payload.params.step_mode = 0 and payload.params.transition_time = 4","vt":"jsonata"},{"t":"jsonata_exp","v":"payload.command = \"step_with_on_off\" and payload.params.step_mode = 1 and payload.params.transition_time = 4","vt":"jsonata"},{"t":"jsonata_exp","v":"payload.command = \"recall\" and payload.params.scene_id = 1","vt":"jsonata"},{"t":"jsonata_exp","v":"payload.command = \"recall\" and payload.params.scene_id = 0","vt":"jsonata"},{"t":"jsonata_exp","v":"payload.command = \"recall\" and payload.params.scene_id = 5","vt":"jsonata"},{"t":"jsonata_exp","v":"payload.command = \"recall\" and payload.params.scene_id = 4","vt":"jsonata"},{"t":"jsonata_exp","v":"payload.command = \"step_with_on_off\" and payload.params.transition_time = 8","vt":"jsonata"},{"t":"else"}],"checkall":"false","repair":false,"outputs":8,"x":670,"y":320,"wires":[["98993c23f8e6a409"],["5214626b1788a042"],["6091155c8c2f9ed7"],["a0964ec7c08edf2b"],["28ccde4ba1ea1972"],["ac951353ca516ebb"],["42a089976e19329d"],[]],"outputLabels":["up","down","scene1","scene2","scene3","scene4","longpress","else"]},{"id":"98993c23f8e6a409","type":"function","z":"4e994db4b13653d5","name":"Reformat","func":"msg.payload = {\n \"command\": \"up\",\n \"step_size\": msg.payload.params.step_size / 8,\n \"transition_time\": msg.payload.params.transition_time,\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":180,"wires":[["7e9d63211b95ace7"]]},{"id":"5214626b1788a042","type":"function","z":"4e994db4b13653d5","name":"Reformat","func":"msg.payload = {\n \"command\": \"down\",\n \"step_size\": msg.payload.params.step_size / 8,\n \"transition_time\": msg.payload.params.transition_time,\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":220,"wires":[["7e9d63211b95ace7"]]},{"id":"6091155c8c2f9ed7","type":"function","z":"4e994db4b13653d5","name":"Reformat","func":"msg.payload = {\n \"command\": \"click\",\n \"button\": msg.payload.params.scene_id,\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":260,"wires":[["7e9d63211b95ace7"]]},{"id":"a0964ec7c08edf2b","type":"function","z":"4e994db4b13653d5","name":"Reformat","func":"msg.payload = {\n \"command\": \"click\",\n \"button\": 2,\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":300,"wires":[["7e9d63211b95ace7"]]},{"id":"28ccde4ba1ea1972","type":"function","z":"4e994db4b13653d5","name":"Reformat","func":"msg.payload = {\n \"command\": \"click\",\n \"button\": 3,\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":340,"wires":[["7e9d63211b95ace7"]]},{"id":"ac951353ca516ebb","type":"function","z":"4e994db4b13653d5","name":"Reformat","func":"msg.payload = {\n \"command\": \"click\",\n \"button\": msg.payload.params.scene_id,\n}\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":380,"wires":[["7e9d63211b95ace7"]]},{"id":"252c28a0af3018ca","type":"trigger","z":"4e994db4b13653d5","name":"","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"300","extend":true,"overrideDelay":true,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":1400,"y":340,"wires":[["7e9d63211b95ace7"]]},{"id":"7e9d63211b95ace7","type":"function","z":"4e994db4b13653d5","name":"Process delayed taps","func":"var last = context.get(\"last_active\")\nvar current = {\n time: Date.now(),\n msg: msg\n};\n\nfunction fmt(msg) {\n if (msg.payload.command == \"click\" || msg.payload.command == \"doubleclick\" || msg.payload.command == \"tripleclick\") {\n return \"\" + msg.payload.command + \" of button \" + msg.payload.button + (msg.selection ? \" (mode \" + msg.selection + \")\" : \"\");\n }\n else if (msg.payload.command == \"up\" || msg.payload.command == \"down\") {\n return \"\" + msg.payload.command + \" of step size \" + msg.payload.step_size + (msg.selection ? \" (mode \" + msg.selection + \")\" : \"\");\n }\n return JSON.stringify(msg);\n}\n\nfunction status(msg, buffering) {\n node.status({ text: msg, fill: \"blue\", shape: buffering ? \"ring\" : \"dot\"});\n}\n\nif (current.msg.flush) {\n if (last !== undefined && last !== null) {\n context.set(\"last_active\", null);\n status(\"flushing \" + fmt(last.msg), false);\n return [[last.msg], null];\n }\n}\nelse if (current.msg.payload.command == \"click\") {\n if (last === undefined || last === null) {\n context.set(\"last_active\", current);\n status(\"buffering \" + fmt(current.msg), true);\n return [null, { flush: true }];\n } else {\n if (\n current.msg.payload.button == last.msg.payload.button\n ) {\n if (\n last.msg.payload.command == \"click\"\n ) {\n // Instead of queueing the current message,\n // update the last message.\n last.msg.payload.command = \"doubleclick\";\n status(\"rebuffering \" + fmt(last.msg), true);\n return [null, { flush: true }];\n }\n else if (\n last.msg.payload.command == \"doubleclick\"\n ) {\n last.msg.payload.command = \"tripleclick\";\n context.set(\"last_active\", null);\n status(\"flushing \" + fmt(last.msg), false);\n return [[last.msg], null];\n }\n else {\n // This is an error\n node.error({msg:\"Cannot be\", current: current, last: last})\n }\n } else { /* buttons don't match */\n context.set(\"last_active\", current);\n status(\"flushing \" + fmt(last.msg) + \" and buffering \" + fmt(current.msg), true);\n return [[last.msg], { flush: true }];\n }\n }\n}\nelse {\n if (last === undefined || last === null) {\n status(\"relaying \" + fmt(current.msg), false);\n return [current.msg];\n }\n else {\n context.set(\"last_active\", null);\n status(\"relaying previous \" + fmt(last.msg) + \" and current \" + fmt(current.msg), false);\n return [[last.msg, current.msg], null];\n }\n}\n","outputs":2,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1400,"y":240,"wires":[["705858de13af6112"],["252c28a0af3018ca"]],"outputLabels":["output","flush request"]},{"id":"0bd68f511154ccc1","type":"function","z":"4e994db4b13653d5","name":"switch","func":"if (msg.payload.command == \"click\") {\n return [msg, null, null, null, null];\n}\nif (msg.payload.command == \"doubleclick\") {\n return [null, msg, null, null, null];\n}\nif (msg.payload.command == \"tripleclick\") {\n return [null, null, msg, null, null];\n}\nif (msg.payload.command == \"up\") {\n return [null, null, null, msg, null];\n}\nif (msg.payload.command == \"down\") {\n return [null, null, null, null, msg];\n}\nif (msg.payload.command == \"longpress\") {\n return [null, null, null, null, msg];\n}\n","outputs":6,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1830,"y":320,"wires":[[],[],[],[],[],[]]},{"id":"66b32dad9f5784b3","type":"status","z":"4e994db4b13653d5","name":"","scope":["7e9d63211b95ace7"],"x":1060,"y":580,"wires":[[]]},{"id":"705858de13af6112","type":"function","z":"4e994db4b13653d5","name":"Selection func","func":"function getSelection() {\n return context.get(\"selection\");\n}\n\nfunction cloneWithSelection(oldm) {\n var m = RED.util.cloneMessage(oldm);\n var g = getSelection();\n if (g !== null && g !== undefined) {\n m.payload.last_clicked_button = g;\n }\n return m;\n}\n\nfunction setSelection(sel) {\n context.set(\"selection\", sel);\n}\n\nmsg = cloneWithSelection(msg);\n\nif (msg.payload.command == \"click\") {\n setSelection(msg.payload.button);\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1660,"y":260,"wires":[["0bd68f511154ccc1"]]},{"id":"42a089976e19329d","type":"function","z":"4e994db4b13653d5","name":"Reformat","func":"msg.payload = {\n \"command\": \"longpress\"\n }\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1060,"y":460,"wires":[["0bd68f511154ccc1"]]},{"id":"d08da5842faee3d9","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"290feb747cdebe69","type":"comment","z":"d08da5842faee3d9","name":"Philips Hue dial - music and light control","info":"https://flows.nodered.org/flow/c95d562d4858cbe1bf80fee95ba9815f?fbclid=IwAR3-tjjPPwWiTE-3W0XmurX5JN5mSCBqfY0aCg3RswcNnhLhnA-fgM-mgwk","x":410,"y":200,"wires":[]},{"id":"8d0e85015e917a2a","type":"switch","z":"d08da5842faee3d9","name":"last played?","property":"lastplayed","propertyType":"flow","rules":[{"t":"eq","v":"80s80s","vt":"str"},{"t":"eq","v":"NDR2","vt":"str"},{"t":"eq","v":"NDR1","vt":"str"},{"t":"eq","v":"Ostseewelle","vt":"str"},{"t":"eq","v":"Radio BOB","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":6,"x":1430,"y":1580,"wires":[[],[],[],["22de3ea6a10acdb7","73b8d83c2bfbf806"],[],["22de3ea6a10acdb7","73b8d83c2bfbf806"]]},{"id":"e52f60bfcd444360","type":"change","z":"d08da5842faee3d9","name":"","rules":[{"t":"set","p":"mode","pt":"flow","to":"music","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1520,"y":2000,"wires":[["bb848bb37deb80e2"]]},{"id":"97a6bffd88b6133f","type":"api-call-service","z":"d08da5842faee3d9","name":"","server":"3017df28.51603","version":5,"debugenabled":false,"domain":"media_player","service":"media_play_pause","areaId":[],"deviceId":[],"entityId":["media_player.sonos_buro"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","output_location":"","output_location_type":"none","x":1800,"y":1320,"wires":[["d4f3ef3689668fee"]]},{"id":"54e09d8e681f066c","type":"api-call-service","z":"d08da5842faee3d9","name":"","server":"3017df28.51603","version":5,"debugenabled":false,"domain":"media_player","service":"media_previous_track","areaId":[],"deviceId":[],"entityId":["media_player.sonos_buro"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","output_location":"","output_location_type":"none","x":1810,"y":1240,"wires":[["d4f3ef3689668fee"]]},{"id":"399957c94121f040","type":"api-call-service","z":"d08da5842faee3d9","name":"","server":"3017df28.51603","version":5,"debugenabled":false,"domain":"media_player","service":"media_next_track","areaId":[],"deviceId":[],"entityId":["media_player.sonos_buro"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","output_location":"","output_location_type":"none","x":1790,"y":1280,"wires":[["d4f3ef3689668fee"]]},{"id":"88f235ce2b6cab0e","type":"change","z":"d08da5842faee3d9","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":830,"y":540,"wires":[[]]},{"id":"e61aa5bd5049d367","type":"server-state-changed","z":"d08da5842faee3d9","name":"","server":"3017df28.51603","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"media_player.sonos_buro","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":420,"y":500,"wires":[["88f235ce2b6cab0e","5e36149fbeb82d68","1e29ea9663675bae","4e8c5d4acc161546"]]},{"id":"7654f330d407c511","type":"delay","z":"d08da5842faee3d9","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":1440,"y":1440,"wires":[["8b2879097e79f62f"]]},{"id":"5e36149fbeb82d68","type":"debug","z":"d08da5842faee3d9","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"media.new_state.attributes.volume_level","targetType":"msg","statusVal":"","statusType":"auto","x":880,"y":500,"wires":[]},{"id":"d4f3ef3689668fee","type":"debug","z":"d08da5842faee3d9","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload.service","targetType":"msg","statusVal":"","statusType":"auto","x":2180,"y":1270,"wires":[]},{"id":"cd59958e48e70e1d","type":"debug","z":"d08da5842faee3d9","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"meta.data.message","targetType":"msg","statusVal":"","statusType":"auto","x":2190,"y":1380,"wires":[]},{"id":"9d11f0b6c412f0a5","type":"comment","z":"d08da5842faee3d9","name":"link to latest version of the original flow","info":"Latest version of this flow can be found at \nhttps://flows.nodered.org/flow/c95d562d4858cbe1bf80fee95ba9815f#","x":950,"y":200,"wires":[]},{"id":"efb5d11f8e5e624e","type":"server-events","z":"d08da5842faee3d9","name":"","server":"3017df28.51603","version":3,"exposeAsEntityConfig":"","eventType":"zha_event","eventData":"{\"device_ieee\":\"00:17:88:01:0d:7c:2d:5a\"}","waitForRunning":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"$outputData(\"eventData\").event_type","valueType":"jsonata"}],"x":450,"y":1580,"wires":[["410d2143657a2c8e"]]},{"id":"2497e3174be5e54b","type":"switch","z":"d08da5842faee3d9","name":"","property":"payload.button","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"4","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1090,"y":1340,"wires":[["54e09d8e681f066c"],["399957c94121f040"],["97a6bffd88b6133f"],["58d17a894e71015b"]],"outputLabels":["1","2","3","4"]},{"id":"bff267eecfb81b10","type":"switch","z":"d08da5842faee3d9","name":"","property":"payload.button","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"4","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1090,"y":1900,"wires":[["03d2d016ad8fd256"],["ad599a5fd0a465c5"],[],["719b5aa157da1cb0"]],"outputLabels":["1","2","3","4"]},{"id":"410d2143657a2c8e","type":"subflow:4e994db4b13653d5","z":"d08da5842faee3d9","name":"","x":830,"y":1580,"wires":[[],[],["2497e3174be5e54b"],["bff267eecfb81b10"],[],[],[]]},{"id":"d9fc6425e63d8078","type":"inject","z":"d08da5842faee3d9","name":"Auto-reset source and volume","props":[],"repeat":"","crontab":"00 04 * * *","once":false,"onceDelay":0.1,"topic":"","x":390,"y":260,"wires":[["ac44d395fdad2092"]]},{"id":"c69432464c02cb9d","type":"api-call-service","z":"d08da5842faee3d9","name":"","server":"3017df28.51603","version":5,"debugenabled":false,"domain":"media_player","service":"volume_set","areaId":[],"deviceId":[],"entityId":["media_player.sonos_buro"],"data":"{\"volume_level\": 0.08}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":910,"y":260,"wires":[["20d2f08fb1a556f5"]]},{"id":"20d2f08fb1a556f5","type":"api-call-service","z":"d08da5842faee3d9","name":"","server":"3017df28.51603","version":5,"debugenabled":false,"domain":"media_player","service":"media_pause","areaId":[],"deviceId":[],"entityId":["media_player.sonos_buro"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":1160,"y":260,"wires":[["cd450f49547eaf70"]]},{"id":"ac44d395fdad2092","type":"api-call-service","z":"d08da5842faee3d9","name":"","server":"3017df28.51603","version":5,"debugenabled":false,"domain":"media_player","service":"select_source","areaId":[],"deviceId":[],"entityId":["media_player.sonos_buro"],"data":"{\"source\":\"Discover Weekly\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":660,"y":260,"wires":[["c69432464c02cb9d"]]},{"id":"cd450f49547eaf70","type":"change","z":"d08da5842faee3d9","name":"","rules":[{"t":"set","p":"lastplayed","pt":"flow","to":"80s80s","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1440,"y":260,"wires":[[]]},{"id":"8b2879097e79f62f","type":"change","z":"d08da5842faee3d9","name":"","rules":[{"t":"set","p":"mode","pt":"flow","to":"music","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1220,"y":1580,"wires":[["8d0e85015e917a2a"]]},{"id":"1e29ea9663675bae","type":"debug","z":"d08da5842faee3d9","name":"sonos","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1090,"y":540,"wires":[]},{"id":"03d2d016ad8fd256","type":"change","z":"d08da5842faee3d9","name":"setze global active room - Wozi -> Buero","rules":[{"t":"set","p":"room","pt":"global","to":"Buero","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1440,"y":1880,"wires":[["154bee7d20908d58"]]},{"id":"154bee7d20908d58","type":"api-call-service","z":"d08da5842faee3d9","name":"\"Büro\"","server":"3017df28.51603","version":5,"debugenabled":false,"domain":"tts","service":"google_translate_say","areaId":[],"deviceId":[],"entityId":["media_player.sonos_buro"],"data":"{\"message\":\"Büro\",\"language\":\"de\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"meta","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","output_location":"","output_location_type":"none","x":1710,"y":1880,"wires":[[]]},{"id":"4e8c5d4acc161546","type":"debug","z":"d08da5842faee3d9","name":"sonos 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"media.new_state.attributes","targetType":"msg","statusVal":"","statusType":"auto","x":1320,"y":540,"wires":[]},{"id":"22de3ea6a10acdb7","type":"api-call-service","z":"d08da5842faee3d9","name":"\"Playing Radio BOB\"","server":"3017df28.51603","version":5,"debugenabled":false,"domain":"tts","service":"google_translate_say","areaId":[],"deviceId":[],"entityId":["media_player.sonos_buro"],"data":"{\"message\":\"Radio BOB\",\"language\":\"de\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"meta","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","output_location":"","output_location_type":"none","x":1740,"y":1620,"wires":[["317bc24cac975e08"]]},{"id":"317bc24cac975e08","type":"delay","z":"d08da5842faee3d9","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1960,"y":1620,"wires":[["900d26738cf5ee41"]]},{"id":"73b8d83c2bfbf806","type":"change","z":"d08da5842faee3d9","name":"","rules":[{"t":"set","p":"lastplayed","pt":"flow","to":"Radio BOB","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1740,"y":1660,"wires":[[]]},{"id":"23458d818b579005","type":"change","z":"d08da5842faee3d9","name":"","rules":[{"t":"set","p":"mode","pt":"flow","to":"light","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1520,"y":1940,"wires":[["9b066eb383b0d525"]]},{"id":"ad599a5fd0a465c5","type":"switch","z":"d08da5842faee3d9","name":"mode","property":"mode","propertyType":"flow","rules":[{"t":"eq","v":"light","vt":"str"},{"t":"eq","v":"music","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":1330,"y":1940,"wires":[[],["23458d818b579005"],["23458d818b579005"]]},{"id":"719b5aa157da1cb0","type":"switch","z":"d08da5842faee3d9","name":"mode","property":"mode","propertyType":"flow","rules":[{"t":"eq","v":"light","vt":"str"},{"t":"eq","v":"music","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":1330,"y":2000,"wires":[["e52f60bfcd444360"],[],[]]},{"id":"9b066eb383b0d525","type":"api-call-service","z":"d08da5842faee3d9","name":"Licht","server":"3017df28.51603","version":5,"debugenabled":false,"domain":"tts","service":"google_translate_say","areaId":[],"deviceId":[],"entityId":["media_player.sonos_buro"],"data":"{\"message\":\"Lichtsteuerung\",\"language\":\"de\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"meta","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","output_location":"","output_location_type":"none","x":1710,"y":1940,"wires":[[]]},{"id":"58d17a894e71015b","type":"switch","z":"d08da5842faee3d9","name":"mode","property":"mode","propertyType":"flow","rules":[{"t":"eq","v":"light","vt":"str"},{"t":"eq","v":"music","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":1250,"y":1440,"wires":[[],["7654f330d407c511"],["7654f330d407c511"]]},{"id":"f74092bb87c2b318","type":"inject","z":"d08da5842faee3d9","name":"Auto-reset scenes","props":[],"repeat":"","crontab":"00 04 * * *","once":false,"onceDelay":0.1,"topic":"","x":360,"y":340,"wires":[["2ce6a56057dd1f49"]]},{"id":"2ce6a56057dd1f49","type":"change","z":"d08da5842faee3d9","name":"","rules":[{"t":"set","p":"lastscene","pt":"flow","to":"wz_spiel","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1440,"y":340,"wires":[[]]},{"id":"bb848bb37deb80e2","type":"api-call-service","z":"d08da5842faee3d9","name":"Musiksteuerung","server":"3017df28.51603","version":5,"debugenabled":false,"domain":"tts","service":"google_translate_say","areaId":[],"deviceId":[],"entityId":["media_player.sonos_buro"],"data":"{\"message\":\"Musiksteuerung\",\"language\":\"de\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"meta","propertyType":"msg","value":"","valueType":"data"}],"queue":"none","output_location":"","output_location_type":"none","x":1740,"y":2000,"wires":[[]]},{"id":"900d26738cf5ee41","type":"api-call-service","z":"d08da5842faee3d9","name":"Radio BOB! Livestream National","server":"3017df28.51603","version":5,"debugenabled":false,"domain":"media_player","service":"play_media","areaId":[],"deviceId":[],"entityId":["media_player.sonos_buro"],"data":"{\"media_content_id\":\"x-rincon-mp3radio://http://regiocast.streamabc.net/regc-radiobobnational5043365-mp3-192-2943705?sABC=66000257%230%23rnnrqoo8n8r8r3s7s8o73qs41388381n%23zrqvncynlre&aw_0_1st.playerid=mediaplayer&amsparams=playerid:mediaplayer;skey:1711276631\",\"media_content_type\":\"music\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2230,"y":1620,"wires":[[]]},{"id":"a8aa83229a98258d","type":"switch","z":"d08da5842faee3d9","name":"switch - global room","property":"room","propertyType":"global","rules":[{"t":"eq","v":"Buero","vt":"str"},{"t":"eq","v":"Kueche","vt":"str"},{"t":"eq","v":"Flur","vt":"str"},{"t":"eq","v":"Wozi","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":5,"x":620,"y":1400,"wires":[[],[],[],["410d2143657a2c8e"],[]]},{"id":"83f959cbeb4a11ec","type":"comment","z":"d08da5842faee3d9","name":"Hier erfolgt eine automatische drosselung der Lautstärke und nach der Sprachansage geht es danach weiter mit der aalten Lautstärke und SEnder ... eineinfachres overlay ... liegt es an der neueren SONOS ERA 100","info":"","x":2550,"y":1880,"wires":[]},{"id":"3017df28.51603","type":"server","name":"Home Assistant Hue Tap Dial","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","statusSeparator":"","enableGlobalContextStore":false}]
i have posted here the corredsponding nodes, maybe someone can give me a hint or help me somehow. I had to delete some nodes, to get this code into the post, but it should do its work nevertheless
thanks
this is only a part of my complex HUE TAP DIAL SWITCH - LIGHT AND MUSIC COMPLETE HOME CONTROL flow