hklages / node-red-contrib-sonos-plus

A set of Node-RED nodes to control SONOS player in your local network.
MIT License
76 stars 14 forks source link

Add dashboard Example to Wiki #81

Closed maramend closed 4 years ago

maramend commented 4 years ago

Hi,

@hklages, I appreciate your work very much and have seen an image introducing a nice dashboard view (https://user-images.githubusercontent.com/17273119/68068183-0cc71f80-fd53-11e9-8c51-bfa1681c3646.png). Is there a chance that you add your flow for this dashboard implementation to the Wiki examples?

hklages commented 4 years ago

Hi. The image is part of my "app": dashboard, blinds, security, heating, lights, petrol, system and media:

dashboard

Let me check how I can separate the media flows - will take some days.

hklages commented 4 years ago

Hi. Here is the media flow. It is complex as the ui elements are on the media screen and on the above dashboard screen. Furthermore, there are 3 always on player (Wohnzimmer/living, Küche/kitchen, Bad/baht) and one sometimes on player (Errker/variable). And the stations and playlists are all in My Sonos and I select them via search string.

So it will not run in other environments.

Screenshot_20200703-201638_Edge

[{"id":"183b9a7.d0b0466","type":"subflow","name":"HandleErrors","info":"","category":"","in":[{"x":61,"y":79,"wires":[{"id":"af8ba970.31c4e8"}]}],"out":[],"env":[{"name":"Tabname","type":"str","value":"unknown","ui":{"type":"input","opts":{"types":["str"]},"label":{}}},{"name":"DebugToMobile","type":"bool","value":"false","ui":{"type":"input","opts":{"types":["bool"]},"label":{}}}],"color":"#E9967A","icon":"node-red/alert.svg"},{"id":"af8ba970.31c4e8","type":"function","z":"183b9a7.d0b0466","name":"define/send error message","func":"const unknown = 'unbekannt';\n\n let errorTab = env.get('Tabname');\n if (typeof errorTab === 'undefined' || errorTab === null || errorTab === '') {\n errorTab = unknown;\n node.warn('Tabname not defined');\n }\n\n let errorNodeName = unknown;\n let errorNodeType = unknown;\n let errorNodeId = unknown;\n let errorMessage = unknown;\n if (typeof msg.error === 'undefined' || msg.error === null || msg.error === '') {\n // no infos - use default text above\n } else {\n if (typeof msg.error.source === 'undefined' || msg.error.source === null || msg.error.source === '') {\n // no source infos - use default text above\n } else {\n if (typeof msg.error.source.name === 'undefined' || msg.error.source.name === null || msg.error.source.name === '') {\n // use default text above\n } else {\n errorNodeName = msg.error.source.name;\n }\n if (typeof msg.error.source.type === 'undefined' || msg.error.source.type === null || msg.error.source.type === '') {\n // use default text above\n } else {\n errorNodeType = msg.error.source.type;\n }\n if (typeof msg.error.source.id === 'undefined' || msg.error.source.id === null || msg.error.source.id === '') {\n // use default text\n } else {\n errorNodeId = msg.error.source.id;\n }\n }\n if (typeof msg.error.message === 'undefined' || msg.error.message === null || msg.error.message === '') {\n // no infos - use default text\n } else {\n errorMessage = msg.error.message;\n }\n }\n const fullMessage =Fehler in TAB: ${errorTab} NODENAME: ${errorNodeName} NODETYPE: ${errorNodeType} NODEID: ${errorNodeId} DETAIL: ${errorMessage};\n const msgUIandLog = { payload: fullMessage };\n\n let msgMobile;\n if (env.get('DebugToMobile')) {\n msgMobile = { payload: fullMessage };\n } else {\n msgMobile = null; // no message\n }\n return [msgMobile, msgUIandLog];","outputs":2,"noerr":0,"x":280,"y":80,"wires":[["c13e9404.3461f8"],["fcd266bb.210958"]],"outputLabels":["email data",""]},{"id":"fcd266bb.210958","type":"debug","z":"183b9a7.d0b0466","name":"","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","x":580,"y":120,"wires":[]},{"id":"c13e9404.3461f8","type":"pushover api","z":"183b9a7.d0b0466","keys":"415347ee.6f7f78","title":"NodeRED Error","name":"","x":560,"y":40,"wires":[]},{"id":"415347ee.6f7f78","type":"pushover-keys","z":"","name":""},{"id":"523513d8.f9f91c","type":"comment","z":"58702fde.02789","name":"DEFINE/ASSIGN FLOW VARIABLES","info":"","x":155,"y":34,"wires":[]},{"id":"f589228a.b6c4a","type":"inject","z":"58702fde.02789","name":"trigger","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":67,"wires":[["37aa2fef.7162"]]},{"id":"37aa2fef.7162","type":"change","z":"58702fde.02789","name":"set automation","rules":[{"t":"set","p":"automation","pt":"flow","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":244,"y":67,"wires":[[]]},{"id":"71941a93.e08054","type":"ui_switch","z":"58702fde.02789","name":"Automation","label":"Automation aus/ein","tooltip":"Die Sender werden automatisch umgeschaltet.","group":"c1bb7b0a.4c3738","order":2,"width":9,"height":1,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":270,"y":458,"wires":[["fa701e23.eb1a5"]]},{"id":"340d4984.199a76","type":"comment","z":"58702fde.02789","name":"FLOW RESTART ","info":"","x":85,"y":334,"wires":[]},{"id":"edee5d0a.4b629","type":"ui_dropdown","z":"58702fde.02789","name":"Secondary Station","label":"","tooltip":"","place":"Secondary Station","group":"c1bb7b0a.4c3738","order":4,"width":4,"height":1,"passthru":false,"multiple":false,"options":[],"payload":"","topic":"","x":468,"y":402,"wires":[["f52734ef.01da58"]]},{"id":"6387918e.5438b","type":"ui_dropdown","z":"58702fde.02789","name":"Primary Station","label":"","tooltip":"","place":"Primary Station","group":"c1bb7b0a.4c3738","order":3,"width":5,"height":1,"passthru":false,"multiple":false,"options":[],"payload":"","topic":"","x":458,"y":354,"wires":[["a92f2dc9.7aa7c"]]},{"id":"1b69db2a.e53725","type":"change","z":"58702fde.02789","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"stationList","tot":"flow"},{"t":"set","p":"payload","pt":"msg","to":"primaryStation","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":275,"y":354,"wires":[["6387918e.5438b"]]},{"id":"66cd388d.74a9b8","type":"inject","z":"58702fde.02789","name":"trigger","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":89,"y":377,"wires":[["2b73d8ed.c39918","1b69db2a.e53725","fa701e23.eb1a5"]]},{"id":"2b73d8ed.c39918","type":"change","z":"58702fde.02789","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"secondaryStation","tot":"flow"},{"t":"set","p":"options","pt":"msg","to":"stationList","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":274,"y":402,"wires":[["edee5d0a.4b629"]]},{"id":"a92f2dc9.7aa7c","type":"change","z":"58702fde.02789","name":"update primaryStation","rules":[{"t":"set","p":"primaryStation","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":685,"y":354,"wires":[[]]},{"id":"f52734ef.01da58","type":"change","z":"58702fde.02789","name":"update secondaryStation","rules":[{"t":"set","p":"secondaryStation","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":695,"y":402,"wires":[[]]},{"id":"bfd35177.867a1","type":"comment","z":"58702fde.02789","name":"Stations see flow.stationList","info":"","x":161,"y":780,"wires":[]},{"id":"7e560982.0f5de8","type":"ui_button","z":"58702fde.02789","name":"","group":"9b0ff41.669b608","order":2,"width":3,"height":1,"passthru":false,"label":"Arabella","tooltip":"","color":"","bgcolor":"#98B8F3","icon":"","payload":"Arabella","payloadType":"str","topic":"","x":101,"y":814,"wires":[["80b32f3a.ff37d"]]},{"id":"b46d2fc0.b9ebd","type":"ui_button","z":"58702fde.02789","name":"","group":"9b0ff41.669b608","order":7,"width":2,"height":1,"passthru":false,"label":"Love","tooltip":"","color":"","bgcolor":"#98B8F3","icon":"","payload":"Best Of Love","payloadType":"str","topic":"","x":90,"y":846,"wires":[["80b32f3a.ff37d"]]},{"id":"c0f8a847.181238","type":"ui_ui_control","z":"58702fde.02789","name":"","x":343,"y":209,"wires":[[]]},{"id":"a4bc43f8.3eff9","type":"comment","z":"58702fde.02789","name":"DASHBOARD TAB CUSTOMIZATION","info":"","x":155,"y":174,"wires":[]},{"id":"6771507.03f40b","type":"ui_template","z":"58702fde.02789","group":"d9d136c4.52cad8","name":"hkWidgetInGroupAddOn","order":2,"width":0,"height":0,"format":"<script id=\"hkWidgetInGroupAddOn\">\n// PURPOSE my side specific tab settings\n// ENVIRONEMENT NodeRED 0.20.5\n// AUTHOR Henning Klages\n// DATE 2019-06-28T2256\n// FUNCTIONS:\n// - click on title will load dashboard = Tab0\n// - buttons ans swidges vibrate\n// CALL Added to widget in group\n\n // put in widget group as scope not available in head\n var SCOPE = scope;\n \n (function() {\n const TAB0MSG = {payload:0}; // identifier 0 for dashboard\n const TITLE_TEXT = \"#nr-dashboard-toolbar > h1:nth-child(4)\"; // selector\n const ATTACHED = \"titleclick\";\n const VIBRATE_LEVEL = 100;\n \n $(function() {\n // PURPOSE add click listener (back to tab 0) \n // assign vibrate to class md-button\n var item = document.querySelector(TITLE_TEXT);\n // to avoid repeately adding listener\n if (item.getAttribute(ATTACHED) !== 'true') {\n item.addEventListener(\"click\", sendMessage.bind(null,TAB0MSG)); \n item.addEventListener(\"click\", vibrate.bind(null,VIBRATE_LEVEL));\n item.setAttribute(ATTACHED, 'true');\n };\n \n // vibrate for standard buttons and switches\n $('.md-button').on('click', vibrate.bind(null,VIBRATE_LEVEL));\n $('.nr-dashboard-switch').on('click', vibrate.bind(null,VIBRATE_LEVEL));\n \n });\n\n \n // Other functions\n function vibrate(level) {\n navigator.vibrate(level);\n };\n \n function sendMessage(message) {\n SCOPE.send(message)\n }; \n \n })();\n </script>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":151,"y":209,"wires":[["c0f8a847.181238"]]},{"id":"68f67838.3669c8","type":"subflow:183b9a7.d0b0466","z":"58702fde.02789","name":"","env":[{"name":"Tabname","value":"Media","type":"str"},{"name":"DebugToMobile","value":"true","type":"bool"}],"x":1190,"y":65,"wires":[]},{"id":"e7508783.260e28","type":"catch","z":"58702fde.02789","name":"","scope":null,"uncaught":true,"x":1020,"y":65,"wires":[["68f67838.3669c8"]]},{"id":"aafcafa4.58beb","type":"comment","z":"58702fde.02789","name":"Error handling","info":"","x":1010,"y":31,"wires":[]},{"id":"28a6ddbb.001052","type":"ui_button","z":"58702fde.02789","name":"TV off","group":"1ab5abdf.a593b4","order":6,"width":2,"height":1,"passthru":false,"label":"TV off","tooltip":"","color":"","bgcolor":"#98B8F3","icon":"","payload":"","payloadType":"date","topic":"","x":91,"y":672,"wires":[["7536b4a5.17a99c"]]},{"id":"c3d0aeef.10601","type":"ui_button","z":"58702fde.02789","name":"TV on","group":"1ab5abdf.a593b4","order":2,"width":2,"height":1,"passthru":false,"label":"TV on","tooltip":"","color":"","bgcolor":"#98B8F3","icon":"","payload":"","payloadType":"date","topic":"","x":91,"y":623,"wires":[["43094a2d.bae444"]]},{"id":"fb5bb563.ce2718","type":"ui_button","z":"58702fde.02789","name":"","group":"1ab5abdf.a593b4","order":3,"width":2,"height":1,"passthru":false,"label":"Neu in","tooltip":"","color":"","bgcolor":"#98B8F3","icon":"","payload":"Neu in Prime","payloadType":"str","topic":"","x":410,"y":816,"wires":[["80b32f3a.ff37d"]]},{"id":"1d01833.4d1767d","type":"ui_button","z":"58702fde.02789","name":"","group":"1ab5abdf.a593b4","order":5,"width":2,"height":1,"passthru":false,"label":"Best of","tooltip":"","color":"","bgcolor":"#98B8F3","icon":"","payload":"Best of Prime","payloadType":"str","topic":"","x":410,"y":848,"wires":[["80b32f3a.ff37d"]]},{"id":"9c8b0587.be23a8","type":"comment","z":"58702fde.02789","name":"COMMANDS STATIONS PLYLISTS","info":"","x":145,"y":591,"wires":[]},{"id":"de166415.f39188","type":"ui_button","z":"58702fde.02789","name":"","group":"9b0ff41.669b608","order":3,"width":2,"height":1,"passthru":false,"label":"B5","tooltip":"","color":"","bgcolor":"#98B8F3","icon":"","payload":"B 5","payloadType":"str","topic":"","x":90,"y":910,"wires":[["80b32f3a.ff37d"]]},{"id":"511fc321.64740c","type":"ui_button","z":"58702fde.02789","name":"","group":"9b0ff41.669b608","order":4,"width":2,"height":1,"passthru":false,"label":"NDR2","tooltip":"","color":"","bgcolor":"#98B8F3","icon":"","payload":"NDR 2","payloadType":"str","topic":"","x":248,"y":878,"wires":[["80b32f3a.ff37d"]]},{"id":"5c58eba7.45bd14","type":"ui_button","z":"58702fde.02789","name":"","group":"9b0ff41.669b608","order":5,"width":2,"height":1,"passthru":false,"label":"hr3","tooltip":"","color":"","bgcolor":"#98B8F3","icon":"","payload":"hr 3","payloadType":"str","topic":"","x":248,"y":814,"wires":[["80b32f3a.ff37d"]]},{"id":"da77908.2069e7","type":"ui_button","z":"58702fde.02789","name":"","group":"9b0ff41.669b608","order":6,"width":3,"height":1,"passthru":false,"label":"Relax","tooltip":"","color":"","bgcolor":"#98B8F3","icon":"","payload":"Relaxed","payloadType":"str","topic":"","x":90,"y":878,"wires":[["80b32f3a.ff37d"]]},{"id":"45d247fa.f00278","type":"ui_button","z":"58702fde.02789","name":"","group":"9b0ff41.669b608","order":9,"width":2,"height":1,"passthru":false,"label":"Oldies","tooltip":"","color":"","bgcolor":"#98B8F3","icon":"","payload":"Oldies","payloadType":"str","topic":"","x":248,"y":846,"wires":[["80b32f3a.ff37d"]]},{"id":"8c1013eb.2649","type":"inject","z":"58702fde.02789","name":"trigger","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":101,"wires":[["2c3db794.581a48"]]},{"id":"2c3db794.581a48","type":"change","z":"58702fde.02789","name":"set stationList, primary/secondaryStation","rules":[{"t":"set","p":"stationList","pt":"flow","to":"[{\"Arabella\":\"Arabella\"},{\"hr3\":\"hr 3\"},{\"NDR2\":\"NDR 2\"},{\"b5\":\"B 5\"},{\"Relaxed\":\"Entspannter\"},{\"Love\":\"Best Of Love\"},{\"Oldies\":\"Oldies\"},{\"SWR3\":\"SWR3\"}]","tot":"json"},{"t":"set","p":"primaryStation","pt":"flow","to":"Arabella","tot":"str"},{"t":"set","p":"secondaryStation","pt":"flow","to":"Pop-Hits","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":324,"y":101,"wires":[["6d7f3b05.1724f4"]],"info":"stationlist must be in sync with the buttons!\nExample: \"Hits\": \"Pop-Hits\"\nHits is the button lable\nPop-Hits a valid search string for My Sonos title\n\n"},{"id":"4785116d.a657f","type":"ui_button","z":"58702fde.02789","name":"","group":"9b0ff41.669b608","order":8,"width":2,"height":1,"passthru":false,"label":"SWR3","tooltip":"","color":"","bgcolor":"#98B8F3","icon":"","payload":"SWR3","payloadType":"str","topic":"","x":248,"y":910,"wires":[["80b32f3a.ff37d"]]},{"id":"212af195.f3bc8e","type":"ui_text","z":"58702fde.02789","group":"9b0ff41.669b608","order":1,"width":9,"height":1,"name":"","label":"<font color=cornflowerblue size=4><b>Stations</b></font>","format":"","layout":"row-spread","x":682,"y":238,"wires":[]},{"id":"660a0934.1bf4f8","type":"ui_text","z":"58702fde.02789","group":"c1bb7b0a.4c3738","order":1,"width":9,"height":1,"name":"","label":"<font color=cornflowerblue size=4><b>Automation - no ads</b></font>","format":"","layout":"row-spread","x":712,"y":270,"wires":[]},{"id":"472a281e.1e9748","type":"switch","z":"58702fde.02789","name":"IsAutomation","property":"automation","propertyType":"flow","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":490,"y":1087,"wires":[["9a025ded.1ad8"]]},{"id":"8549b545.f7bef8","type":"ui_button","z":"58702fde.02789","name":"Dashboard Music","group":"fe2642d9.76be7","order":2,"width":3,"height":1,"passthru":false,"label":"Music","tooltip":"","color":"","bgcolor":"#98B8F3","icon":"","payload":"secondaryStation","payloadType":"flow","topic":"","x":726,"y":998,"wires":[["63bbdb52.253c34"]]},{"id":"d2f96ae.5609298","type":"switch","z":"58702fde.02789","name":"is playing?","property":"payload.playbackstate","propertyType":"msg","rules":[{"t":"eq","v":"playing","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":330,"y":1087,"wires":[["472a281e.1e9748"]]},{"id":"1405d4a2.57e6eb","type":"comment","z":"58702fde.02789","name":"AUTOMATIC CHANGE / DASHBOARD","info":"","x":155,"y":1001,"wires":[]},{"id":"ad9b3511.00c598","type":"link in","z":"58702fde.02789","name":"Set Media Automation","links":["4675285f.552ed8"],"x":124,"y":507,"wires":[["fa701e23.eb1a5"]]},{"id":"63bbdb52.253c34","type":"sonos-manage-mysonos","z":"58702fde.02789","confignode":"d0057e63.a9c5","compatibilityMode":false,"command":"mysonos.export.item","state":"","stateType":"str","name":"","x":738,"y":1038,"wires":[["379ff660.4ac5ca"]]},{"id":"80b32f3a.ff37d","type":"sonos-manage-mysonos","z":"58702fde.02789","confignode":"d0057e63.a9c5","compatibilityMode":false,"command":"mysonos.export.item","state":"","stateType":"str","name":"","x":658,"y":851,"wires":[["c09dc6c.c120d38"]]},{"id":"a94e6717.cfec38","type":"link in","z":"58702fde.02789","name":"Set Music","links":["7e64446a.5e463c"],"x":357,"y":995,"wires":[["c391b460.00f7a8"]]},{"id":"c09dc6c.c120d38","type":"sonos-universal","z":"58702fde.02789","confignode":"d0057e63.a9c5","compatibilityMode":false,"command":"group.play.export","state":"","stateType":"str","name":"","x":672,"y":895,"wires":[["abcc9a14.6c2878"]]},{"id":"379ff660.4ac5ca","type":"sonos-universal","z":"58702fde.02789","confignode":"d0057e63.a9c5","compatibilityMode":false,"command":"group.play.export","state":"","stateType":"str","name":"","x":945,"y":1038,"wires":[["abcc9a14.6c2878"]]},{"id":"f4dd8451.c87538","type":"sonos-universal","z":"58702fde.02789","confignode":"d0057e63.a9c5","compatibilityMode":false,"command":"group.get.state","state":"","stateType":"str","name":"","x":304,"y":1038,"wires":[["d2f96ae.5609298"]]},{"id":"cb934be.b7dd3b8","type":"ui_text","z":"58702fde.02789","group":"1ab5abdf.a593b4","order":1,"width":9,"height":1,"name":"","label":"<font color=cornflowerblue size=4><b>Playlists</b></font>","format":"","layout":"row-spread","x":682,"y":206,"wires":[]},{"id":"ab85403d.76f71","type":"change","z":"58702fde.02789","name":"","rules":[{"t":"set","p":"snap","pt":"flow","to":"payload","tot":"msg"},{"t":"set","p":"automation","pt":"flow","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1300,"y":625,"wires":[[]]},{"id":"aee41489.914d08","type":"sonos-universal","z":"58702fde.02789","confignode":"d0057e63.a9c5","compatibilityMode":false,"command":"group.create.snap","state":"","stateType":"str","name":"","x":1110,"y":625,"wires":[["ab85403d.76f71"]]},{"id":"eb1db9dd.0ec228","type":"ui_button","z":"58702fde.02789","name":"","group":"1ab5abdf.a593b4","order":7,"width":2,"height":1,"passthru":false,"label":"SnapOn","tooltip":"","color":"","bgcolor":"#98B8F3","icon":"","payload":"","payloadType":"str","topic":"","x":720,"y":625,"wires":[["89670d8b.31dd8"]]},{"id":"cf5ca2f1.dc079","type":"ui_button","z":"58702fde.02789","name":"","group":"1ab5abdf.a593b4","order":11,"width":2,"height":1,"passthru":false,"label":"SnapOff","tooltip":"","color":"","bgcolor":"#98B8F3","icon":"","payload":"","payloadType":"str","topic":"","x":720,"y":676,"wires":[["5291dd97.1b8b24"]]},{"id":"5291dd97.1b8b24","type":"change","z":"58702fde.02789","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"snap","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":884,"y":676,"wires":[["3ab5378.0d926c8"]]},{"id":"89670d8b.31dd8","type":"change","z":"58702fde.02789","name":"","rules":[{"t":"set","p":"snapVolumes","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":900,"y":625,"wires":[["aee41489.914d08"]]},{"id":"3ab5378.0d926c8","type":"sonos-universal","z":"58702fde.02789","confignode":"d0057e63.a9c5","compatibilityMode":false,"command":"group.play.snap","state":"","stateType":"str","name":"","x":1061,"y":676,"wires":[["cd71d4f8.d74638"]]},{"id":"fa701e23.eb1a5","type":"change","z":"58702fde.02789","name":"","rules":[{"t":"set","p":"automation","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":272,"y":507,"wires":[["71941a93.e08054"]]},{"id":"cd71d4f8.d74638","type":"change","z":"58702fde.02789","name":"","rules":[{"t":"set","p":"automation","pt":"flow","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1252,"y":676,"wires":[[]]},{"id":"cd616a71.f72358","type":"ui_button","z":"58702fde.02789","name":"","group":"1ab5abdf.a593b4","order":8,"width":2,"height":1,"passthru":false,"label":"Tolle","tooltip":"","color":"","bgcolor":"#98B8F3","icon":"","payload":"Tolle","payloadType":"str","topic":"","x":410,"y":880,"wires":[["80b32f3a.ff37d"]]},{"id":"29b7942a.c9c7dc","type":"ui_button","z":"58702fde.02789","name":"","group":"1ab5abdf.a593b4","order":10,"width":2,"height":1,"passthru":false,"label":"Top Songs","tooltip":"","color":"","bgcolor":"#98B8F3","icon":"","payload":"Top Songs","payloadType":"str","topic":"","x":430,"y":912,"wires":[["80b32f3a.ff37d"]]},{"id":"44f0d914.bded88","type":"cronplus","z":"58702fde.02789","name":"05, 25, 35, 55","outputField":"primary","timeZone":"Europe/Berlin","persistDynamic":false,"commandResponseMsgOutput":"output1","outputs":1,"options":[{"name":"primary","topic":"primary","payloadType":"flow","payload":"primaryStation","expressionType":"cron","expression":"05,35 06-22 * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"},{"name":"secondary","topic":"secondary","payloadType":"flow","payload":"secondaryStation","expressionType":"cron","expression":"25,55 06-22 * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}],"x":120,"y":1038,"wires":[["f4dd8451.c87538"]]},{"id":"d70f7d4e.76fc3","type":"ui_button","z":"58702fde.02789","name":"volume down","group":"cfbd569b.da3b48","order":2,"width":2,"height":1,"passthru":false,"label":"","tooltip":"","color":"#98B8F3","bgcolor":"#EEEEEE","icon":"fa-1.5x fa-minus","payload":"-3","payloadType":"str","topic":"-3","x":526,"y":1245,"wires":[["3b7e086a.c28e18"]]},{"id":"b025738a.d3368","type":"ui_button","z":"58702fde.02789","name":"volume up","group":"cfbd569b.da3b48","order":4,"width":2,"height":1,"passthru":false,"label":"","tooltip":"","color":"#98B8F3","bgcolor":"#EEEEEE","icon":"fa-1.5x fa-plus","payload":"3","payloadType":"str","topic":"","x":527,"y":1298,"wires":[["3b7e086a.c28e18"]]},{"id":"3b7e086a.c28e18","type":"sonos-universal","z":"58702fde.02789","confignode":"d0057e63.a9c5","compatibilityMode":false,"command":"group.adjust.volume","state":"","stateType":"str","name":"","x":723,"y":1269,"wires":[["27228e83.cc6822"]]},{"id":"16fb1f7b.be32a1","type":"comment","z":"58702fde.02789","name":"Playlists / Queues","info":"","x":450,"y":782,"wires":[]},{"id":"c391b460.00f7a8","type":"change","z":"58702fde.02789","name":"primary/secondary","rules":[{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"bool","to":"secondaryStation","tot":"flow"},{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"primaryStation","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":488,"y":995,"wires":[["63bbdb52.253c34"]]},{"id":"abcc9a14.6c2878","type":"link out","z":"58702fde.02789","name":"Trigger Refresh with delay","links":["a23f5294.cef3b","60b59962.3d3758"],"x":1101,"y":895,"wires":[]},{"id":"9a025ded.1ad8","type":"change","z":"58702fde.02789","name":"payload","rules":[{"t":"set","p":"payload","pt":"msg","to":"primary","tot":"msg"},{"t":"delete","p":"primary","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":1038,"wires":[["63bbdb52.253c34"]]},{"id":"c8edb681.4aa078","type":"debug","z":"58702fde.02789","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":751,"y":100,"wires":[]},{"id":"6d7f3b05.1724f4","type":"change","z":"58702fde.02789","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"stationList","tot":"flow"},{"t":"set","p":"payload","pt":"msg","to":"$merge(msg.payload).NDR2\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":100,"wires":[["c8edb681.4aa078"]]},{"id":"db43c1b8.1e765","type":"comment","z":"58702fde.02789","name":"REFRESH UI","info":"","x":75,"y":1160,"wires":[]},{"id":"822be2df.79846","type":"ui_template","z":"58702fde.02789","group":"d9d136c4.52cad8","name":"station title artist","order":1,"width":9,"height":4,"format":"<div style=\"background-color:CornflowerBlue; color:Gainsboro;margin:5px;\"> \n<center>\n<br><b>{{msg.station}}<br><br>\n<strong><font size=\"4\" color=\"White\">{{msg.payload.title}}</font></strong><br><br>\n<font size=\"2\" color=\"White\">{{msg.payload.artist}}</font><br></b>&nbsp;\n</center>\n</div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":1399,"y":1925,"wires":[[]]},{"id":"44cc59e2.a00d78","type":"switch","z":"58702fde.02789","name":"is playing","property":"payload.playbackstate","propertyType":"msg","rules":[{"t":"eq","v":"playing","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":500,"y":1867,"wires":[["4e0e771.32d0588"],["3647b80a.81eb98"]]},{"id":"f4dc9233.1e3e8","type":"ui_switch","z":"58702fde.02789","name":"play/stop","label":"","tooltip":"","group":"cfbd569b.da3b48","order":7,"width":2,"height":2,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"fa-3x fa-play","oncolor":"CornflowerBlue ","offvalue":"false","offvalueType":"bool","officon":"fa-3x fa-stop","offcolor":"Silver","x":759,"y":1653,"wires":[["b58a9ca1.88ac9","ababf48f.ab1db8"]]},{"id":"836ea7bc.d2e8e8","type":"change","z":"58702fde.02789","name":"payload=volume","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.volume","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":521,"y":1203,"wires":[["a9af23b4.6192b"]]},{"id":"c5556166.0988c","type":"link in","z":"58702fde.02789","name":"MediaRefresh","links":["2dc98c2.cdeab74","a25aad23.7522a"],"x":134,"y":1629,"wires":[["bbf7868c.57c258"]]},{"id":"6392b04b.ef18c","type":"ui_switch","z":"58702fde.02789","name":"mutestate","label":"","tooltip":"","group":"cfbd569b.da3b48","order":5,"width":2,"height":1,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"on","onvalueType":"str","onicon":"volume_down","oncolor":"Silver","offvalue":"off","offvalueType":"str","officon":"volume_up","offcolor":"CornflowerBlue ","x":726,"y":2038,"wires":[["9b5642e7.a4c1b","4352b0a6.c0154"]]},{"id":"690d7ba0.2ce614","type":"ui_switch","z":"58702fde.02789","name":"group/ungroup","label":"","tooltip":"","group":"cfbd569b.da3b48","order":9,"width":2,"height":2,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"fa-3x fa-link ","oncolor":"CornflowerBlue ","offvalue":"false","offvalueType":"bool","officon":"fa-3x fa-chain-broken","offcolor":"Silver","x":818,"y":1461,"wires":[["7e43b74d.100e98","e59f2dde.1c278"]]},{"id":"e59f2dde.1c278","type":"change","z":"58702fde.02789","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"player.join.group","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"bool","to":"player.leave.group","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"payload","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"Küche","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1030,"y":1461,"wires":[["5a718e6c.a306c","a79430a8.ee34e","1c90a285.5e8dcd","fb0b0e71.84c8d"]]},{"id":"63ffeb75.059254","type":"inject","z":"58702fde.02789","name":"Flow Init","topic":"","payload":"media_IsPlaying","payloadType":"global","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":1420,"y":1557,"wires":[["2d16d1b5.ac307e"]]},{"id":"47739c03.fd1224","type":"ui_switch","z":"58702fde.02789","name":"Dashboard play/stop","label":"","tooltip":"","group":"fe2642d9.76be7","order":4,"width":2,"height":1,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"fa-2x fa-play","oncolor":"CornflowerBlue ","offvalue":"false","offvalueType":"bool","officon":"fa-2x fa-stop","offcolor":"Silver","x":774,"y":1740,"wires":[["b58a9ca1.88ac9","ababf48f.ab1db8"]]},{"id":"883249d5.57b1e8","type":"ui_button","z":"58702fde.02789","name":"dashboard default volume","group":"fe2642d9.76be7","order":5,"width":2,"height":1,"passthru":false,"label":"","tooltip":"","color":"#98B8F3","bgcolor":"#eeeeee","icon":"equalizer","payload":"","payloadType":"date","topic":"","x":1052,"y":1300,"wires":[["fb0b0e71.84c8d"]]},{"id":"ae79dec2.c25f4","type":"function","z":"58702fde.02789","name":"group on?","func":"// PURPOSE Verifies whether all players are grouped\n// RETURN true if all reachable players are in group\n// Hint PlayerOne is often switched off. \nlet playerOn = 3\nif (msg.payload){ // means 4th player is available\n playerOn = 4\n}\nmsg.payload = (playerOn === parseInt(msg.size))\nreturn msg;","outputs":1,"noerr":0,"x":552,"y":1461,"wires":[["690d7ba0.2ce614"]]},{"id":"9d2a6777.269c68","type":"comment","z":"58702fde.02789","name":"update group","info":"","x":510,"y":1343,"wires":[]},{"id":"e09f6da7.b8fbc","type":"comment","z":"58702fde.02789","name":"update mute state","info":"","x":526,"y":2004,"wires":[]},{"id":"bb0cfb8d.b89278","type":"comment","z":"58702fde.02789","name":"update volume","info":"","x":521,"y":1170,"wires":[]},{"id":"c3b28ba4.4ea7e8","type":"comment","z":"58702fde.02789","name":"update artist, title, station","info":"","x":550,"y":1828,"wires":[]},{"id":"a8dbc584.138318","type":"xml","z":"58702fde.02789","name":"convert","property":"payload.mediaData.CurrentURIMetaData","attr":"","chr":"","x":1115,"y":1858,"wires":[["eeb16f0b.c177f"]]},{"id":"eeb16f0b.c177f","type":"change","z":"58702fde.02789","name":"station","rules":[{"t":"set","p":"station","pt":"msg","to":"payload.mediaData.CurrentURIMetaData[\"DIDL-Lite\"].item[0][\"dc:title\"][0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1243,"y":1858,"wires":[["822be2df.79846"]]},{"id":"4b8bbe1c.76e37","type":"switch","z":"58702fde.02789","name":"","property":"payload.mediaData.CurrentURIMetaData","propertyType":"msg","rules":[{"t":"empty"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":970,"y":1823,"wires":[["8f4a1f90.55166"],["a8dbc584.138318"]]},{"id":"1e7de341.f0fc9d","type":"switch","z":"58702fde.02789","name":"","property":"payload.queueActivated","propertyType":"msg","rules":[{"t":"false"},{"t":"true"}],"checkall":"false","repair":false,"outputs":2,"x":840,"y":1860,"wires":[["4b8bbe1c.76e37"],["212933de.a21b2c"]]},{"id":"ce1a6562.22aa58","type":"link in","z":"58702fde.02789","name":"Set Group On/Off","links":["6f7c9ff2.cc33f","98b78a47.a75e78"],"x":995,"y":1421,"wires":[["e59f2dde.1c278"]]},{"id":"190aa849.80e018","type":"ui_button","z":"58702fde.02789","name":"default volume","group":"cfbd569b.da3b48","order":1,"width":2,"height":1,"passthru":false,"label":"","tooltip":"","color":"#98B8F3","bgcolor":"#EEEEEE","icon":"equalizer","payload":"","payloadType":"date","topic":"","x":1022,"y":1260,"wires":[["fb0b0e71.84c8d"]]},{"id":"4e0e771.32d0588","type":"sonos-universal","z":"58702fde.02789","confignode":"d0057e63.a9c5","compatibilityMode":false,"command":"group.get.trackplus","state":"","stateType":"str","name":"","x":680,"y":1861,"wires":[["1e7de341.f0fc9d"]]},{"id":"f91ec3c9.efe54","type":"inject","z":"58702fde.02789","name":"trigger","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":88,"y":1687,"wires":[["bbf7868c.57c258"]]},{"id":"bbf7868c.57c258","type":"sonos-universal","z":"58702fde.02789","confignode":"d0057e63.a9c5","compatibilityMode":false,"command":"group.get.state","state":"","stateType":"str","name":"","x":266,"y":1687,"wires":[["aba48dd2.f02f","836ea7bc.d2e8e8","c9b44156.39048","44cc59e2.a00d78","35396c18.7eeab4","95f2ae6f.d823c"]]},{"id":"aba48dd2.f02f","type":"change","z":"58702fde.02789","name":"muted?","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.muteState","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":496,"y":2038,"wires":[["6392b04b.ef18c"]]},{"id":"4352b0a6.c0154","type":"sonos-universal","z":"58702fde.02789","confignode":"d0057e63.a9c5","compatibilityMode":false,"command":"group.set.mutestate","state":"","stateType":"str","name":"","x":929,"y":2038,"wires":[["a25aad23.7522a"]]},{"id":"9b5642e7.a4c1b","type":"change","z":"58702fde.02789","name":"ud","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":722,"y":1998,"wires":[["6392b04b.ef18c"]]},{"id":"7e43b74d.100e98","type":"change","z":"58702fde.02789","name":"ud","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":817,"y":1420,"wires":[["690d7ba0.2ce614"]]},{"id":"b58a9ca1.88ac9","type":"change","z":"58702fde.02789","name":"ud","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":762,"y":1700,"wires":[["f4dc9233.1e3e8","47739c03.fd1224"]]},{"id":"c620261c.0cb048","type":"comment","z":"58702fde.02789","name":"update play button","info":"","x":530,"y":1652,"wires":[]},{"id":"a9af23b4.6192b","type":"ui_text","z":"58702fde.02789","group":"cfbd569b.da3b48","order":3,"width":1,"height":1,"name":"","label":"","format":"<font size=5 color=CornflowerBlue>{{msg.payload}}</font>","layout":"col-center","x":671,"y":1203,"wires":[]},{"id":"5a718e6c.a306c","type":"sonos-universal","z":"58702fde.02789","confignode":"35a9048e.475dec","compatibilityMode":false,"command":"message","state":"","stateType":"str","name":"Bad ","x":1298,"y":1460,"wires":[[]]},{"id":"a79430a8.ee34e","type":"sonos-universal","z":"58702fde.02789","confignode":"7b22c5e.f77cf3c","compatibilityMode":false,"command":"message","state":"","stateType":"str","name":"Wohnzimmer","x":1319,"y":1414,"wires":[[]]},{"id":"a54d98b1.ab63b8","type":"sonos-universal","z":"58702fde.02789","confignode":"d0057e63.a9c5","compatibilityMode":false,"command":"household.test.player","state":"Erker","stateType":"str","name":"","x":557,"y":1415,"wires":[["ae79dec2.c25f4"]]},{"id":"a25aad23.7522a","type":"link out","z":"58702fde.02789","name":"","links":["c5556166.0988c"],"x":1063,"y":2038,"wires":[]},{"id":"a8a87119.546e5","type":"change","z":"58702fde.02789","name":"set global ","rules":[{"t":"set","p":"media_IsPlaying","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1260,"y":1593,"wires":[["2d16d1b5.ac307e"]]},{"id":"5fd278aa.e17108","type":"link out","z":"58702fde.02789","name":"BigButtonMedia Set","links":["d12f1f1f.69e5a","bdc7aaa5.5370f8"],"x":1395,"y":1645,"wires":[]},{"id":"2d16d1b5.ac307e","type":"change","z":"58702fde.02789","name":"convert to on/off","rules":[{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"on","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"bool","to":"off","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"str","to":"on","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"str","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1436,"y":1594,"wires":[["5fd278aa.e17108"]]},{"id":"97d015ca.913b58","type":"sonos-universal","z":"58702fde.02789","confignode":"d0057e63.a9c5","compatibilityMode":false,"command":"group.play","state":"","stateType":"str","name":"","x":1115,"y":1659,"wires":[["a8a87119.546e5","3cf3acfe.931e94"]]},{"id":"7bd0f382.b1047c","type":"sonos-universal","z":"58702fde.02789","confignode":"d0057e63.a9c5","compatibilityMode":false,"command":"group.stop","state":"","stateType":"str","name":"","x":1115,"y":1710,"wires":[["a8a87119.546e5","3cf3acfe.931e94"]]},{"id":"ababf48f.ab1db8","type":"switch","z":"58702fde.02789","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":955,"y":1688,"wires":[["97d015ca.913b58"],["7bd0f382.b1047c"]]},{"id":"60b59962.3d3758","type":"link in","z":"58702fde.02789","name":"MediaRefresh with Delay","links":["2dc98c2.cdeab74","abcc9a14.6c2878","27228e83.cc6822","a9eb2d0e.9998e","3cf3acfe.931e94"],"x":181,"y":1770,"wires":[["c93f790.0f6be88"]]},{"id":"c93f790.0f6be88","type":"delay","z":"58702fde.02789","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":286,"y":1770,"wires":[["bbf7868c.57c258"]]},{"id":"1ab868d6.76b647","type":"sonos-universal","z":"58702fde.02789","confignode":"d0057e63.a9c5","compatibilityMode":false,"command":"message","state":"","stateType":"str","name":"Küche","x":1300,"y":1314,"wires":[[]]},{"id":"27228e83.cc6822","type":"link out","z":"58702fde.02789","name":"","links":["60b59962.3d3758"],"x":863,"y":1269,"wires":[]},{"id":"c9b44156.39048","type":"change","z":"58702fde.02789","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.playbackstate = \"playing\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":519,"y":1687,"wires":[["f4dc9233.1e3e8","47739c03.fd1224"]]},{"id":"35396c18.7eeab4","type":"change","z":"58702fde.02789","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.playbackstate = \"playing\"","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":1594,"wires":[["a8a87119.546e5"]]},{"id":"5241a881.455758","type":"comment","z":"58702fde.02789","name":"Update playing on global & dashboard","info":"","x":590,"y":1560,"wires":[]},{"id":"1c90a285.5e8dcd","type":"sonos-universal","z":"58702fde.02789","confignode":"204e08db.5f3af8","compatibilityMode":false,"command":"message","state":"","stateType":"str","name":"variable","x":1310,"y":1367,"wires":[[]]},{"id":"93216676.1c9a08","type":"catch","z":"58702fde.02789","name":"","scope":["1c90a285.5e8dcd"],"uncaught":false,"x":1400,"y":1367,"wires":[[]]},{"id":"434a5e2d.a6444","type":"link in","z":"58702fde.02789","name":"Set Gleichklang","links":["48df00ba.f3d97"],"x":955,"y":1360,"wires":[["fb0b0e71.84c8d"]]},{"id":"95f2ae6f.d823c","type":"change","z":"58702fde.02789","name":"","rules":[{"t":"set","p":"size","pt":"msg","to":"payload.size","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":511,"y":1376,"wires":[["a54d98b1.ab63b8"]]},{"id":"fb0b0e71.84c8d","type":"change","z":"58702fde.02789","name":"set volume 10","rules":[{"t":"set","p":"payload","pt":"msg","to":"10","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"player.set.volume","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1100,"y":1360,"wires":[["1ab868d6.76b647","1c90a285.5e8dcd","a79430a8.ee34e","5a718e6c.a306c"]]},{"id":"3647b80a.81eb98","type":"change","z":"58702fde.02789","name":"set title Radio aus","rules":[{"t":"set","p":"msg.station","pt":"msg","to":"","tot":"str"},{"t":"set","p":"msg.payload.artist","pt":"msg","to":"","tot":"str"},{"t":"set","p":"msg.payload.title","pt":"msg","to":"Radio ist aus","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":681,"y":1925,"wires":[["822be2df.79846"]]},{"id":"3cf3acfe.931e94","type":"link out","z":"58702fde.02789","name":"Trigger play/stop ","links":["60b59962.3d3758"],"x":1335,"y":1700,"wires":[]},{"id":"8f4a1f90.55166","type":"function","z":"58702fde.02789","name":"station: maybe amazon","func":"let station = ''\nconst curi = msg.payload.mediaData.CurrentURI\nif (curi.includes('sid=201')) { // amazon\n if (curi.includes('catalog%2fstations')) {\n station = 'Amazon station'\n }\n}\nmsg.station = station\nreturn msg;","outputs":1,"noerr":0,"x":1169,"y":1816,"wires":[["822be2df.79846"]]},{"id":"212933de.a21b2c","type":"function","z":"58702fde.02789","name":"queue maybe amazon","func":"let station = 'Queue'\nconst turi = msg.payload.positionData.TrackURI\nif (turi.includes('sid=201')) { // amazon\n if (turi.includes('primePlaylist')) {\n station = 'Queue: Amazon songs'\n }\n}\nmsg.station = station\nreturn msg;","outputs":1,"noerr":0,"x":1020,"y":1897,"wires":[["822be2df.79846"]]},{"id":"23eb7358.30d3bc","type":"sonos-universal","z":"58702fde.02789","confignode":"7b22c5e.f77cf3c","compatibilityMode":false,"command":"player.join.group","state":"Küche","stateType":"str","name":"Wohnzimmer: rejoin","x":509,"y":672,"wires":[[]]},{"id":"7536b4a5.17a99c","type":"sonos-universal","z":"58702fde.02789","confignode":"7b22c5e.f77cf3c","compatibilityMode":false,"command":"player.set.volume","state":"10","stateType":"str","name":"Wohnzimmer: volume","x":280,"y":672,"wires":[["23eb7358.30d3bc"]]},{"id":"7f8f3b92.bc5214","type":"sonos-universal","z":"58702fde.02789","confignode":"7b22c5e.f77cf3c","compatibilityMode":false,"command":"player.set.volume","state":"25","stateType":"str","name":"Wohnzimmer: volume","x":464,"y":623,"wires":[[]]},{"id":"c9f40012.31f1c","type":"inject","z":"58702fde.02789","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":920,"y":520,"wires":[["817f806d.518d8"]]},{"id":"817f806d.518d8","type":"sonos-universal","z":"58702fde.02789","confignode":"7b22c5e.f77cf3c","compatibilityMode":false,"command":"group.get.trackplus","state":"","stateType":"str","name":"Wohnzimmer: volume","x":1100,"y":520,"wires":[["7e5afe2f.decef"]]},{"id":"7e5afe2f.decef","type":"debug","z":"58702fde.02789","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1310,"y":520,"wires":[]},{"id":"43094a2d.bae444","type":"sonos-universal","z":"58702fde.02789","confignode":"7b22c5e.f77cf3c","compatibilityMode":false,"command":"player.play.avtransport","state":"x-sonos-htastream:RINCON_949F3EC13B9901400:spdif","stateType":"str","name":"Wohnzimmer: TV","x":250,"y":623,"wires":[["7f8f3b92.bc5214"]]},{"id":"c1bb7b0a.4c3738","type":"ui_group","z":"","name":"Automation ","tab":"d563c675.17f6d8","order":5,"disp":false,"width":9,"collapse":false},{"id":"9b0ff41.669b608","type":"ui_group","z":"","name":"Stations","tab":"d563c675.17f6d8","order":4,"disp":false,"width":9,"collapse":false},{"id":"d9d136c4.52cad8","type":"ui_group","z":"","name":"Playing","tab":"d563c675.17f6d8","order":1,"disp":false,"width":9,"collapse":false},{"id":"1ab5abdf.a593b4","type":"ui_group","z":"","name":"Queue & Playlists","tab":"d563c675.17f6d8","order":3,"disp":false,"width":"9","collapse":false},{"id":"fe2642d9.76be7","type":"ui_group","z":"","name":"Sonos","tab":"bf6344f5.596528","order":6,"disp":false,"width":9,"collapse":false},{"id":"d0057e63.a9c5","type":"sonos-config","z":"","name":"Küche","serialnum":"5C-AA-FD-00-22-36:1","ipaddress":"192.168.178.37"},{"id":"cfbd569b.da3b48","type":"ui_group","z":"","name":"Zone","tab":"d563c675.17f6d8","order":2,"disp":false,"width":9,"collapse":false},{"id":"35a9048e.475dec","type":"sonos-config","z":"","name":"Bad","serialnum":"00-0E-58-FE-3A-EA:5","ipaddress":"192.168.178.35"},{"id":"7b22c5e.f77cf3c","type":"sonos-config","z":"","name":"Wohnzimmer","serialnum":"94-9F-3E-C1-3B-99:8","ipaddress":"192.168.178.36"},{"id":"204e08db.5f3af8","type":"sonos-config","z":"","name":"variable","serialnum":"B8-E9-37-58-31-C0:A","ipaddress":"192.168.178.38"},{"id":"d563c675.17f6d8","type":"ui_tab","z":"","name":"Media","icon":"fa-music","order":6,"disabled":false,"hidden":false},{"id":"bf6344f5.596528","type":"ui_tab","z":"","name":"Übersicht","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

hklages commented 4 years ago

I close this issue now.

maramend commented 4 years ago

Thx @hklages. Indeed very helpful.

You might consider linking this into the Wiki, so that other profits from this is well?!

hklages commented 4 years ago

OK - I will do improvements and put it to the wiki (end of September, after vacation)