Bose SoundTouch dashboard remote control

This dashboard flow implements much of the SoundTouch control API. It sends GET and POST requests to your SoundTouch systems. It does not implement the WebSockets interface, but was specifically designed to work well without it.

Features:

  • Three volume settings (low, medium, and high) which can be configured per system.
  • Max volume level which can be configured per system.
  • System selection drop-down list.
  • Five preset buttons.
  • Mute, volume down, volume up, and three preset volume level buttons.
  • Previous track, next track, pause, play, and power buttons.
  • Shuffle settings.
  • Repeat settings.
  • Multi-room (zone) settings (very easy to setup).
  • Now playing (and other information) dialog.
  • Input link node to accept commands from other flows.

I've been using these controls for a while, and find it so much faster and easier to use than the Bose app. Obviously, you still need the Bose app to do some things such as setup your presets.

Setup:

You need to edit the "initialize" function node with the information for your Bose systems.

Sample initialize function node code -

flow.set('bose_soundtouch_systems', {"systems": []}, 'memory');
msg.payload = [
    {
        "name": "Master bedroom", 
        "ipAddress": "192.168.0.131",
        "macAddress": "EC24B883580B"
    },
    {
        "name": "Basement", 
        "ipAddress": "192.168.0.205",
        "macAddress": "08DF1F1055DD"
    },
    {
        "name": "Family room", 
        "ipAddress": "192.168.0.102",
        "macAddress": "000C8ADC90D7"
    }
];
return msg;

Multi-room notes:

Select a system to add from the multi-room drop-down list and press the add button. Then press the save button. The minus button can be used to remove some systems prior to saving. To disable the multi-room feature, press save without adding any systems first. Press the information button to verify the multi-room setup.

There is a "bose function" input link that you can link to from other flows. I use this to do my Google Assistant automation. You must send an array of json objects to the link because there is a split node downstream. In general, the format follows what you read in the SoundTouch API reference. The main addition is support for a delay object that delays the command by a specified number of milliseconds.

Sample json that could be sent to the link -

[
    {
        "name": "Bose master bedroom",
        "method": "POST",
        "function": "volume",
        "option": "set",
        "volume": "25"
    },
    {
        "name": "Bose master bedroom",
        "method": "POST",
        "function": "key",
        "keyState": "release",
        "key": "PRESET_1"
    },
    {
        "name": "Bose master bedroom",
        "method": "POST",
        "function": "key",
        "keyState": "press",
        "key": "PLAY"
    },
    {
        "name": "Bose master bedroom",
        "method": "POST",
        "function": "key",
        "key": "SHUFFLE_ON",
        "keyState": "press",
        "delay": "15000"
    },
    {
        "name": "Bose basement",
        "method": "POST",
        "function": "volume",
        "option": "set",
        "volume": "25"
    },
    {
        "name": "Bose basement",
        "method": "POST",
        "function": "key",
        "keyState": "release",
        "key": "PRESET_1"
    },
    {
        "name": "Bose basement",
        "method": "POST",
        "function": "key",
        "keyState": "press",
        "key": "PLAY"
    },
    {
        "name": "Bose basement",
        "method": "POST",
        "function": "key",
        "key": "SHUFFLE_ON",
        "keyState": "press",
        "delay": "15000"
    }
]

Seasonal preset node:

I have a custom "seasonal preset" node that allows me to send in commands from other flows without specifying a specific preset number. I can just pass in "PRESET", and this node converts that to either "PRESET_1" or "PRESET_2". You can leave this node as is and it won't do anything bad, or you can remove it, or you can modify it to suit your own purpose.

Future work:

No plans at the moment, but who knows what I'll think of. It would be great to get some user feedback.

[{"id":"27e94ab1.a717e6","type":"subflow","name":"1 s clear","info":"","category":"","in":[{"x":40,"y":40,"wires":[{"id":"1e9d1b9d.e58424"}]}],"out":[{"x":520,"y":40,"wires":[{"id":"27e94ab1.a717e6","port":0},{"id":"d2bd78d3.41f238","port":0}]}],"env":[],"icon":"node-red/timer.png"},{"id":"1e9d1b9d.e58424","type":"delay","z":"27e94ab1.a717e6","name":"1 s","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":190,"y":100,"wires":[["d2bd78d3.41f238"]]},{"id":"d2bd78d3.41f238","type":"change","z":"27e94ab1.a717e6","name":"clear notification","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":100,"wires":[[]]},{"id":"f44878c2.dd3d58","type":"tab","label":"Bose","disabled":false,"info":""},{"id":"1d6937a3.74fc58","type":"function","z":"f44878c2.dd3d58","name":"format","func":"var i, miscSettigns, artUrl;\nvar zoneMembers = '';\nvar groupMembers = '';\nvar bose = flow.get('bose_soundtouch_systems', 'memory');\n\nfunction getBoseName(ipaddress) {\n    var j, name;\n    for (j in bose.systems) {\n        if (ipaddress == bose.systems[j].ipAddress) {\n            name = bose.systems[j].name;\n            break;\n        }\n    }\n    return name;\n}\n\n// Misc settings\ntry {\n    miscSettings = msg.payload[0].nowPlaying.shuffleSetting[0] + '<br>' +\n    msg.payload[0].nowPlaying.repeatSetting[0] + '<br>';\n}\ncatch(err) {\n    miscSettings = '';\n}\n\n// Zone members\ntry {\n    for (i in msg.payload[1].zone.member) {\n        zoneMembers = zoneMembers + '&nbsp;&nbsp;' +\n        getBoseName(msg.payload[1].zone.member[i].$.ipaddress) + '<br>';\n    }\n    if (zoneMembers !== '') {\n        groupMembers = 'Group members:<br>' + zoneMembers; \n    } \n}\ncatch(err) { }\n\ntry {\n    artUrl = '<img src=\"' + msg.payload[0].nowPlaying.art[0]._ + '\" width=\"160\" height=\"160\" alt=\"' + msg.payload[0].nowPlaying.album[0] + '\">';\n}\ncatch(err) {\n    artUrl = 'N/A';\n}\n\ntry {\n    message = 'Title: \"' + msg.payload[0].nowPlaying.track[0] + '\"<br>' +\n    'Artist: ' + msg.payload[0].nowPlaying.artist[0] + '<br>' +\n    'Album: ' + msg.payload[0].nowPlaying.album[0] + '<br>' +\n    artUrl + '<br>' +\n    'Playlist: ' + msg.payload[0].nowPlaying.ContentItem[0].itemName[0] + '<br>' +\n    String(msg.payload[0].nowPlaying.$.source).replace(/_/g, ' ') + '<br>' +\n    miscSettings.replace(/_/g, ' ') +\n    String(msg.payload[0].nowPlaying.playStatus[0]).replace(/_/g, ' ') + '<br>' +\n    groupMembers;\n    node.status({fill: 'blue', shape: 'dot', text: String(msg.payload[0].nowPlaying.playStatus[0]).replace(/_/g, ' ')});\n}\ncatch(err) {\n    message = 'Not active...';\n    node.status({fill: 'blue', shape: 'dot', text: message});\n}\nmsg.payload = message;\ndelete msg.topic;\nreturn msg;\n","outputs":1,"noerr":0,"x":2550,"y":620,"wires":[["7251bb1b.a56054"]]},{"id":"e9914c4c.a1385","type":"function","z":"f44878c2.dd3d58","name":"set \"bose_name\"","func":"flow.set('bose_name', msg.payload);\nnode.status({fill: 'blue', shape: 'dot', text: '\"bose_name\" = ' + msg.payload});\n\nmsg.payload = [\n    {\n        \"name\": \"select\",\n        \"method\": \"GET\",\n        \"function\": \"volume\",\n        \"volumeNotification\": \"true\",\n        \"group\": {\n            \"hide\": [\n                \"Bose_Soundtouch_Shuffle\",\n                \"Bose_Soundtouch_Repeat\",\n                \"Bose_Soundtouch_Volume_presets\",\n                \"Bose_Soundtouch_Group\"\n            ]\n        }\n    }\n];\nreturn msg;","outputs":1,"noerr":0,"x":1410,"y":140,"wires":[["5db53d79.91e9d4"]]},{"id":"e7bd5426.a2edb8","type":"comment","z":"f44878c2.dd3d58","name":"buttons","info":"","x":150,"y":160,"wires":[]},{"id":"fdfc15e7.a21928","type":"function","z":"f44878c2.dd3d58","name":"setup http post request","func":"var volume = 0;\n\n// Setup http request parameters\nswitch (msg.bose.function) {\n    case 'key':\n        msg.payload = '<key state=' + msg.bose.keyState + ' sender=Gabbo>' + msg.bose.key + '</key>';\n        node.status({fill: 'blue', shape: 'dot', text: msg.bose.system.name + ' - Function: ' +\n            msg.bose.function + ', Key State: ' + msg.bose.keyState + ', Key: ' + msg.bose.key});\n        break;\n    case 'setZone':\n        msg.payload = msg.bose.option;\n        break;\n    case 'volume':\n        switch(msg.bose.volume) {\n            case 'low':\n                msg.bose.volume = msg.bose.system.lowVolume;\n                break;\n            case 'medium':\n                msg.bose.volume = msg.bose.system.mediumVolume;\n                break;\n            case 'high':\n                msg.bose.volume = msg.bose.system.highVolume;\n        }\n        switch(msg.bose.option) {\n            case 'set':\n                volume = msg.bose.volume;\n                break;\n            case 'offset':\n                volume = flow.get('bose_volume', 'memory') + msg.bose.volume;\n        }\n        if (volume > msg.bose.system.maxVolume) {\n            volume = msg.bose.system.maxVolume;\n        } else if (volume < 0) {\n            volume = 0;\n        }\n        msg.payload = '<volume>' + volume + '</volume>';\n        node.status({fill: 'blue', shape: 'dot', text: msg.bose.system.name + ' - Function.option: ' +\n            msg.bose.function + '.' + msg.bose.option + ', volume: ' + volume});\n}\nmsg.method = msg.bose.method;\nreturn msg;\n","outputs":1,"noerr":0,"x":1720,"y":720,"wires":[["63310c8e.0d1a24","636326f2.e17128"]]},{"id":"636326f2.e17128","type":"http request","z":"f44878c2.dd3d58","name":"post request","method":"use","ret":"txt","url":"","tls":"","x":1950,"y":720,"wires":[["dbbf1b81.fb1a78","392e367d.7d5a8a"]]},{"id":"c7c4e8b2.ef64f8","type":"switch","z":"f44878c2.dd3d58","name":"method","property":"bose.method","propertyType":"msg","rules":[{"t":"eq","v":"GET","vt":"str"},{"t":"eq","v":"POST","vt":"str"},{"t":"eq","v":"GROUP","vt":"str"},{"t":"eq","v":"VOLUME","vt":"str"}],"checkall":"false","repair":false,"outputs":4,"x":1460,"y":840,"wires":[["72baba9.c9a9e44"],["fdfc15e7.a21928"],["5f7e2a2a.eecd74"],["9c538a2.33b4e78"]],"outputLabels":["GET","POST","GROUP","VOLUME"]},{"id":"931775c.24a5788","type":"function","z":"f44878c2.dd3d58","name":"setup bose","func":"if (typeof msg.payload.method === 'string') {\n    var name = msg.payload.name;\n    \n    msg.bose = {\n        \"method\": msg.payload.method,\n        \"function\": msg.payload.function,\n        \"option\": msg.payload.option,\n        \"key\": msg.payload.key,\n        \"keyState\": msg.payload.keyState,\n        \"volume\": msg.payload.volume,\n        \"delay\": msg.payload.delay,\n        \"notification\": msg.payload.notification,\n        \"volumeNotification\": msg.payload.volumeNotification,\n        \"system\": {}\n    }\n    \n    if (name == 'select') {\n        name = flow.get('bose_name')\n    }\n    \n    msg.bose.system = flow.get(name.replace(/ /g, '_'));\n    \n    // Setup node status\n    switch (msg.bose.method) {\n        case 'GET':\n            node.status({fill: 'blue', shape: 'dot', text: name + ' - Function: ' +\n                msg.bose.function});\n            break;\n        case 'POST':\n            if (msg.bose.function == 'volume') {\n                node.status({fill: 'blue', shape: 'dot', text: name + ' - Function.option: ' +\n                    msg.bose.function + '.' +  msg.bose.option + ', volume: ' + msg.bose.volume});\n            } else {\n                node.status({fill: 'blue', shape: 'dot', text: name + ' - Function: ' +\n                    msg.bose.function + ', Key: ' + msg.bose.key});\n            }\n    }\n    \n    // Setup optional delay\n    if (typeof msg.payload.delay  !== 'undefined') {\n        msg.delay = msg.payload.delay;\n    } else {\n        msg.delay = 0;\n    }\n    \n    // Set url\n    msg.url = 'http://' + msg.bose.system.ipAddress + ':8090/' + msg.bose.function;\n    return msg;\n}","outputs":1,"noerr":0,"x":1090,"y":840,"wires":[["a9e5eb40.e11d48","4f79144b.a1c27c"]]},{"id":"12650dba.0f8542","type":"comment","z":"f44878c2.dd3d58","name":"post request","info":"","x":1690,"y":680,"wires":[]},{"id":"dbbf1b81.fb1a78","type":"function","z":"f44878c2.dd3d58","name":"optional get volume","func":"if (msg.bose.volumeNotification == 'true') {\n    msg.payload = [\n        {\n            \"name\": \"select\",\n            \"method\": \"GET\",\n            \"function\": \"volume\",\n            \"delay\": \"300\",\n            \"volumeNotification\": \"true\"\n        }\n    ];\n    return msg;\n}","outputs":1,"noerr":0,"x":2170,"y":720,"wires":[["52be23f7.b7367c"]]},{"id":"63310c8e.0d1a24","type":"debug","z":"f44878c2.dd3d58","name":"http request","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":1970,"y":640,"wires":[]},{"id":"66b04d57.7c15b4","type":"split","z":"f44878c2.dd3d58","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":690,"y":840,"wires":[["4c510c94.544e14","c6574cf3.2ef54"]]},{"id":"4c510c94.544e14","type":"function","z":"f44878c2.dd3d58","name":"seasonal preset","func":"if (msg.payload.key == 'PRESET') {\n    if (global.get('christmas_season') === true) {\n        msg.payload.key = 'PRESET_2';\n    } else {\n        msg.payload.key = 'PRESET_1';\n    }\n}\nreturn msg;","outputs":1,"noerr":0,"x":880,"y":840,"wires":[["931775c.24a5788","8063967b.b67508"]]},{"id":"2650b01a.3d78c","type":"comment","z":"f44878c2.dd3d58","name":"optional input from other flows","info":"","x":140,"y":100,"wires":[]},{"id":"4f79144b.a1c27c","type":"delay","z":"f44878c2.dd3d58","name":"optional delay","pauseType":"delayv","timeout":"0","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1300,"y":840,"wires":[["c7c4e8b2.ef64f8"]]},{"id":"6c21fe0a.a4bbb","type":"http request","z":"f44878c2.dd3d58","name":"get request","method":"use","ret":"txt","url":"","tls":"","x":1950,"y":560,"wires":[["4144cac4.f71d94"]]},{"id":"4144cac4.f71d94","type":"xml","z":"f44878c2.dd3d58","name":"xml","property":"payload","attr":"","chr":"","x":2090,"y":560,"wires":[["f3cb49e2.2b5db8"]]},{"id":"dcd9bfe3.9c615","type":"function","z":"f44878c2.dd3d58","name":"format","func":"var i;\nvar presetNames = [];\n\n// Presets\ntry {\n    var presets = msg.payload.presets.preset;\n    for (i in presets) {\n        var tooltipObj = {preset: 'x', tooltip: 'x'};\n        tooltipObj.preset = i;\n        tooltipObj.tooltip = presets[i].ContentItem[0].itemName[0];\n        presetNames.push(tooltipObj);\n    }\n}\ncatch(err) {}\n//node.warn(presetNames);\nmsg.payload = presetNames;\nreturn msg;\n","outputs":1,"noerr":0,"x":2390,"y":500,"wires":[["69e90e2a.08629"]]},{"id":"f9a1724.febfd9","type":"comment","z":"f44878c2.dd3d58","name":"get request","info":"","x":1680,"y":520,"wires":[]},{"id":"72baba9.c9a9e44","type":"function","z":"f44878c2.dd3d58","name":"setup http get request","func":"msg.method = msg.bose.method;\nnode.status({fill: 'blue', shape: 'dot', text: msg.bose.system.name + ' - Method: ' + msg.method + ', url: ' + msg.url});\nreturn msg;\n","outputs":1,"noerr":0,"x":1720,"y":560,"wires":[["6c21fe0a.a4bbb","63310c8e.0d1a24"]]},{"id":"7a7bbee6.1990a","type":"switch","z":"f44878c2.dd3d58","name":"tooltips","property":"payload.preset","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"5","vt":"str"}],"checkall":"false","repair":false,"outputs":6,"x":140,"y":260,"wires":[["b742e044.2d918"],["65235505.a7738c"],["fe2f0c58.9f715"],["d4e172d.76b979"],["e29f4224.19a28"],[]]},{"id":"69e90e2a.08629","type":"split","z":"f44878c2.dd3d58","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":2510,"y":500,"wires":[["7540a0d6.e6799"]]},{"id":"77847cc8.b60724","type":"link in","z":"f44878c2.dd3d58","name":"bose link 1","links":["7540a0d6.e6799"],"x":35,"y":260,"wires":[["7a7bbee6.1990a"]]},{"id":"7540a0d6.e6799","type":"link out","z":"f44878c2.dd3d58","name":"bose link 1","links":["77847cc8.b60724"],"x":2650,"y":500,"wires":[],"l":true},{"id":"f3cb49e2.2b5db8","type":"switch","z":"f44878c2.dd3d58","name":"function","property":"bose.function","propertyType":"msg","rules":[{"t":"eq","v":"presets","vt":"str"},{"t":"eq","v":"volume","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":3,"x":2220,"y":560,"wires":[["dcd9bfe3.9c615"],["5df119b7.9776d8"],["ef88bcb6.4ca6a"]],"outputLabels":["presets","volume","notification"]},{"id":"5df119b7.9776d8","type":"function","z":"f44878c2.dd3d58","name":"format","func":"var message = 'Update pending...';\ntry {\n    var mute = msg.payload.volume.muteenabled[0];\n    switch (mute) {\n        case 'true':\n            mute = 'On';\n            break;\n        default:\n            mute = 'Off';\n    }\n    message = 'Volume: ' + msg.payload.volume.actualvolume[0] + '%';\n    flow.set('bose_volume', Number(msg.payload.volume.actualvolume[0]), 'memory');\n}\ncatch(err) {}\nnode.status({fill: 'blue', shape: 'dot', text: message});\nmsg.payload = message;\ndelete msg.topic;\nreturn msg;","outputs":1,"noerr":0,"x":2390,"y":560,"wires":[["e628d280.d445"]]},{"id":"f4cb94b5.ee5c38","type":"link in","z":"f44878c2.dd3d58","name":"bose function","links":["6650fcc8.47cb04","5db53d79.91e9d4","f83dbef6.5d5d3","52be23f7.b7367c","c8b51082.012ab","d4ac1154.4e2c9","cdb6865b.1e0bf8","96a878d8.a150e8"],"x":350,"y":100,"wires":[["66b04d57.7c15b4"]],"l":true},{"id":"52be23f7.b7367c","type":"link out","z":"f44878c2.dd3d58","name":"bose function","links":["f4cb94b5.ee5c38"],"x":2350,"y":720,"wires":[],"l":true},{"id":"e628d280.d445","type":"switch","z":"f44878c2.dd3d58","name":"notification?","property":"bose.volumeNotification","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":2530,"y":560,"wires":[["caea0239.8f429"]],"outputLabels":["yes"]},{"id":"ef88bcb6.4ca6a","type":"join","z":"f44878c2.dd3d58","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":2390,"y":620,"wires":[["1d6937a3.74fc58"]]},{"id":"a9e5eb40.e11d48","type":"debug","z":"f44878c2.dd3d58","name":"post setup","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":1290,"y":780,"wires":[]},{"id":"de9ea532.090508","type":"function","z":"f44878c2.dd3d58","name":"setup dropdown","func":"var bose = flow.get('bose_soundtouch_systems', 'memory');\nvar name = flow.get('bose_name');\nvar nameArray = ['All'];\n\n// Setup names for dropdown list\nfor (var i in bose.systems) { \n    if (name != bose.systems[i].name) {\n        nameArray.push(bose.systems[i].name);\n    }\n}\n\nflow.set('bose_group_members', [], 'memory');\nflow.set('bose_group_name', '', 'memory');\n\nmsg.options = nameArray;\nmsg.payload = '';\nreturn msg;","outputs":1,"noerr":0,"x":1900,"y":880,"wires":[["88d5c3b1.13d51","32a613e3.04d12c","e1a5b234.697c5"]]},{"id":"94c78fc7.e52ce","type":"comment","z":"f44878c2.dd3d58","name":"group request","info":"","x":1690,"y":900,"wires":[]},{"id":"5f7e2a2a.eecd74","type":"switch","z":"f44878c2.dd3d58","name":"function","property":"bose.function","propertyType":"msg","rules":[{"t":"eq","v":"setup","vt":"str"},{"t":"eq","v":"add","vt":"str"},{"t":"eq","v":"remove","vt":"str"},{"t":"eq","v":"save","vt":"str"}],"checkall":"false","repair":false,"outputs":4,"x":1680,"y":960,"wires":[["de9ea532.090508"],["4faad308.d67b7c"],["c6d2280c.ac4ea8"],["45c51a19.667684"]],"outputLabels":["setup","add","remove","save"]},{"id":"4faad308.d67b7c","type":"function","z":"f44878c2.dd3d58","name":"add member","func":"var i;\nvar bose = flow.get('bose_soundtouch_systems', 'memory');\nvar name = flow.get('bose_name');\nvar addName = flow.get('bose_group_name', 'memory');\nvar groupMembers = flow.get('bose_group_members', 'memory');\n\nif (addName == 'All') {\n    groupMembers = [];\n    for (i in bose.systems) { \n        if (name != bose.systems[i].name) {\n            groupMembers.push(bose.systems[i].name);\n        }\n    }\n} else if (groupMembers.indexOf(addName) < 0) {\n    groupMembers.push(addName);\n}\n\nflow.set('bose_group_members', groupMembers, 'memory');\n\nmsg.payload = '';\nfor (i in groupMembers) {\n    msg.payload = msg.payload + groupMembers[i] + '<br>';\n}\nreturn msg;","outputs":1,"noerr":0,"x":1890,"y":940,"wires":[["32a613e3.04d12c"]]},{"id":"8f410b3f.9cb3b8","type":"function","z":"f44878c2.dd3d58","name":"set \"bose_group_name\"","func":"if (msg.payload !== '') {\n    flow.set('bose_group_name', msg.payload, 'memory');\n}\nnode.status({fill: 'blue', shape: 'dot', text: '\"bose_group_name\" = ' + msg.payload});\nmsg.payload = false;\nreturn msg;","outputs":1,"noerr":0,"x":2370,"y":860,"wires":[["e0558585.7c9e08"]]},{"id":"c6d2280c.ac4ea8","type":"function","z":"f44878c2.dd3d58","name":"remove member","func":"var i;\nvar removeName = flow.get('bose_group_name', 'memory');\nvar groupMembers = flow.get('bose_group_members', 'memory');\n\nif (removeName == 'All') {\n     groupMembers = [];\n} else if (groupMembers.indexOf(removeName) >= 0) {\n    groupMembers.splice(groupMembers.indexOf(removeName), 1);\n}\n\nflow.set('bose_group_members', groupMembers, 'memory');\n\nmsg.payload = '';\nfor (i in groupMembers) {\n    msg.payload = msg.payload + groupMembers[i] + '<br>';\n}\nreturn msg;\n","outputs":1,"noerr":0,"x":1900,"y":1000,"wires":[["32a613e3.04d12c"]]},{"id":"45c51a19.667684","type":"function","z":"f44878c2.dd3d58","name":"save","func":"var i, j;\nvar bose = flow.get('bose_soundtouch_systems', 'memory');\nvar name = flow.get('bose_name');\nvar groupMembers = flow.get('bose_group_members', 'memory');\n\nmsg.payload = [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"setZone\",\n        \"option\": \"\",\n        \"notification\": \"Group saved\"\n    }\n];\n\nfor (var j in bose.systems) { \n    if (name == bose.systems[j].name) {\n        msg.payload[0].option = '<zone master=\"' + bose.systems[j].deviceID + '\">\\n';\n        break;\n    }\n}\n\nfor (var i in groupMembers) { \n    for (var j in bose.systems) { \n        if (groupMembers[i] == bose.systems[j].name) {\n            msg.payload[0].option = msg.payload[0].option +\n            '  <member ipaddress=\"' + bose.systems[j].ipAddress + '\">' + bose.systems[j].deviceID + '</member>\\n';\n            break;\n        }\n    }\n}\nmsg.payload[0].option = msg.payload[0].option + '</zone>';\n\nreturn msg;","outputs":1,"noerr":0,"x":1870,"y":1060,"wires":[["f83dbef6.5d5d3"]]},{"id":"f83dbef6.5d5d3","type":"link out","z":"f44878c2.dd3d58","name":"bose function","links":["f4cb94b5.ee5c38"],"x":2010,"y":1060,"wires":[],"l":true},{"id":"8063967b.b67508","type":"debug","z":"f44878c2.dd3d58","name":"pre setup","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":1080,"y":780,"wires":[]},{"id":"8716e7ff.0ad008","type":"function","z":"f44878c2.dd3d58","name":"connect/lost/change","func":"switch (msg.payload) {\n    case 'connect':\n    case 'lost':\n        break;\n    case 'change':\n        if (msg.name == 'Bose Soundtouch') {\n            msg.payload = [\n                {\n                    \"group\": {\n                        \"hide\": [\n                            \"Bose_Soundtouch_Shuffle\",\n                            \"Bose_Soundtouch_Repeat\",\n                            \"Bose_Soundtouch_Volume_presets\",\n                            \"Bose_Soundtouch_Group\"\n                        ]\n                    }\n                },\n                {\n                    \"name\": \"select\",\n                    \"method\": \"GET\",\n                    \"function\": \"presets\"\n                }\n            ]\n        }\n}\n\nreturn msg;\n","outputs":1,"noerr":0,"x":880,"y":440,"wires":[["cdb6865b.1e0bf8"]]},{"id":"392e367d.7d5a8a","type":"function","z":"f44878c2.dd3d58","name":"optional notification","func":"if (typeof msg.bose.notification !== 'undefined') {\n    msg.payload = msg.bose.notification;\n    delete msg.topic;\n    return msg;\n}","outputs":1,"noerr":0,"x":2170,"y":780,"wires":[["5a135e9.64844a"]]},{"id":"1bd5db4c.bed5d5","type":"link in","z":"f44878c2.dd3d58","name":"bose link 3","links":["e0558585.7c9e08"],"x":180,"y":1380,"wires":[["90588a9d.4dcbe8","f9e8cb2.0104c38"]],"l":true},{"id":"e0558585.7c9e08","type":"link out","z":"f44878c2.dd3d58","name":"bose link 3","links":["1bd5db4c.bed5d5"],"x":2630,"y":940,"wires":[],"l":true},{"id":"e1a5b234.697c5","type":"function","z":"f44878c2.dd3d58","name":"disable add/remove","func":"msg.payload = true;\nreturn msg;","outputs":1,"noerr":0,"x":2150,"y":940,"wires":[["e0558585.7c9e08"]]},{"id":"d35fb5a5.8ba5e8","type":"inject","z":"f44878c2.dd3d58","name":"100 ms","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":660,"y":140,"wires":[["f6248d89.c7021"]]},{"id":"f6248d89.c7021","type":"function","z":"f44878c2.dd3d58","name":"initialize","func":"flow.set('bose_soundtouch_systems', {\"systems\": []}, 'memory');\nmsg.payload = [\n    {\n        \"name\": \"Master bedroom\", \n        \"ipAddress\": \"192.168.0.131\",\n        \"macAddress\": \"EC24B883580B\"\n    },\n    {\n        \"name\": \"Basement\", \n        \"ipAddress\": \"192.168.0.205\",\n        \"macAddress\": \"08DF1F1055DD\"\n    },\n    {\n        \"name\": \"Family room\", \n        \"ipAddress\": \"192.168.0.102\",\n        \"macAddress\": \"000C8ADC90D7\"\n    }\n];\nreturn msg;\n","outputs":1,"noerr":0,"x":800,"y":140,"wires":[["31836eb7.dc7d42"]]},{"id":"f6f0c1a7.20e55","type":"comment","z":"f44878c2.dd3d58","name":"initial setup","info":"","x":640,"y":100,"wires":[]},{"id":"2d6ef25c.480d4e","type":"function","z":"f44878c2.dd3d58","name":"save","func":"var name = flow.get('bose_name');\nvar tempSystem = flow.get('temp_system', 'memory');\nvar system = Object.assign({}, tempSystem);\nflow.set(name.replace(/ /g, '_'), system);\nmsg.payload = 'Volume presets saved';\nmsg.bose.notification = 'true';\nreturn msg;","outputs":1,"noerr":0,"x":1870,"y":1220,"wires":[["3b7e5dd1.6e0a92"]]},{"id":"74355b5f.e1d564","type":"comment","z":"f44878c2.dd3d58","name":"volume request","info":"","x":1700,"y":1140,"wires":[]},{"id":"9c538a2.33b4e78","type":"switch","z":"f44878c2.dd3d58","name":"function","property":"bose.function","propertyType":"msg","rules":[{"t":"eq","v":"setup","vt":"str"},{"t":"eq","v":"save","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":1680,"y":1180,"wires":[["ca26836f.e3965"],["2d6ef25c.480d4e"]],"outputLabels":["setup","save"]},{"id":"ca26836f.e3965","type":"function","z":"f44878c2.dd3d58","name":"setup values","func":"var name = flow.get('bose_name');\nvar system = flow.get(name.replace(/ /g, '_'));\nvar tempSystem = Object.assign({}, system);\nflow.set('temp_system', tempSystem, 'memory');\n\nmsg.payload = [\n    {\n       value: system.lowVolume,\n       \"topic\": \"lowVolume\"\n    },\n    {\n       value: system.mediumVolume,\n       \"topic\": \"mediumVolume\"\n    },\n    {\n       value: system.highVolume,\n       \"topic\": \"highVolume\"\n    },\n    {\n       value: system.maxVolume,\n       \"topic\": \"maxVolume\"\n    }\n]\nreturn msg;","outputs":1,"noerr":0,"x":1890,"y":1160,"wires":[["cd1c37eb.166998"]]},{"id":"f24b6a63.5f1568","type":"switch","z":"f44878c2.dd3d58","name":"topic","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"lowVolume","vt":"str"},{"t":"eq","v":"mediumVolume","vt":"str"},{"t":"eq","v":"highVolume","vt":"str"},{"t":"eq","v":"maxVolume","vt":"str"}],"checkall":"false","repair":false,"outputs":4,"x":2290,"y":1160,"wires":[["3bdfdeb8.eb5a22"],["41f797e6.b9af28"],["2b669ea3.726f52"],["e8db5704.abfaa8"]],"outputLabels":["low","medium","high","max"]},{"id":"cd1c37eb.166998","type":"split","z":"f44878c2.dd3d58","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":2030,"y":1160,"wires":[["22a6323c.c03a1e"]]},{"id":"22a6323c.c03a1e","type":"function","z":"f44878c2.dd3d58","name":"set topic","func":"msg.topic = msg.payload.topic;\nmsg.payload = msg.payload.value;\nreturn msg;","outputs":1,"noerr":0,"x":2160,"y":1160,"wires":[["f24b6a63.5f1568"]]},{"id":"3f1147a2.1759f8","type":"function","z":"f44878c2.dd3d58","name":"set context","func":"var tempSystem = flow.get('temp_system', 'memory');\ntempSystem[msg.topic] = msg.payload;\nflow.set('temp_system', tempSystem, 'memory');\nreturn msg;","outputs":1,"noerr":0,"x":2710,"y":1160,"wires":[[]]},{"id":"ded3c586.eaa9c8","type":"function","z":"f44878c2.dd3d58","name":"bose add systems","func":"// Uncomment line below to initialize context for named system\n//flow.set(msg.payload.name.replace(/ /g, '_'));\nvar bose = flow.get('bose_soundtouch_systems', 'memory');\nvar system = flow.get(msg.payload.name.replace(/ /g, '_'));\nvar name = flow.get('bose_name');\nvar nameArray = [];\nvar i;\n\nvar newSystem = {\n    \"name\": msg.payload.name,\n    \"ipAddress\": msg.payload.ipAddress,\n    \"deviceID\": msg.payload.macAddress\n};\nif (typeof system === 'undefined') {\n    system = newSystem;\n    system.lowVolume = 5;\n    system.mediumVolume = 10;\n    system.highVolume = 15;\n    system.maxVolume = 50;\n} else {\n    system.ipAddress = newSystem.ipAddress;\n    system.deviceID = newSystem.deviceID;\n}\n\nflow.set(system.name.replace(/ /g, '_'), system);\nbose.systems.push(newSystem);\nflow.set('bose_soundtouch_systems', bose, 'memory');\n\nif ((typeof name !== 'string') || (name.length === 0)) {\n    name = bose.systems[0].name;\n    flow.set('bose_name', name);\n    node.warn('bose_name set to: ' + name);\n}\n\n// Setup names for dropdown list\nfor (i in bose.systems) { \n    nameArray.push(bose.systems[i].name);\n}\n\nmsg.options = nameArray.sort();\nmsg.payload = name;\nnode.status({fill: 'blue', shape: 'dot', text: bose.systems.length + ' systems added'});\nreturn msg;\n","outputs":1,"noerr":0,"x":1030,"y":140,"wires":[["ef19b3cb.67262"]]},{"id":"5db53d79.91e9d4","type":"link out","z":"f44878c2.dd3d58","name":"bose function","links":["f4cb94b5.ee5c38"],"x":1590,"y":140,"wires":[],"l":true},{"id":"1bdf7932.57a157","type":"comment","z":"f44878c2.dd3d58","name":"ui refresh","info":"","x":660,"y":400,"wires":[]},{"id":"d2321928.deca88","type":"function","z":"f44878c2.dd3d58","name":"clear flow context","func":"flow.set('bose_name');\nflow.set('bose_volume', null, 'memory');\nflow.set('bose_group_name', null, 'memory');\nflow.set('bose_group_members', null, 'memory');\nflow.set('bose_soundtouch_systems', null, 'memory');\nflow.set('temp_system', null, 'memory');\n","outputs":1,"noerr":0,"x":1490,"y":440,"wires":[[]]},{"id":"53f40f34.de23c","type":"inject","z":"f44878c2.dd3d58","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":1320,"y":440,"wires":[["d2321928.deca88"]]},{"id":"b3371866.2f65f8","type":"comment","z":"f44878c2.dd3d58","name":"manually clear flow context","info":"","x":1350,"y":400,"wires":[]},{"id":"cdb6865b.1e0bf8","type":"link out","z":"f44878c2.dd3d58","name":"bose function","links":["f4cb94b5.ee5c38"],"x":1070,"y":440,"wires":[],"l":true},{"id":"cf878d62.3cd0c","type":"debug","z":"f44878c2.dd3d58","name":"bose ui refresh","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":860,"y":500,"wires":[]},{"id":"19c0f238.ca2f4e","type":"link in","z":"f44878c2.dd3d58","name":"bose function post split","links":["a782d7d9.24b048"],"x":740,"y":900,"wires":[["4c510c94.544e14"]],"l":true},{"id":"caea0239.8f429","type":"subflow:27e94ab1.a717e6","z":"f44878c2.dd3d58","name":"","x":2680,"y":560,"wires":[["cd7c0e2e.34d3e"]]},{"id":"3b7e5dd1.6e0a92","type":"subflow:27e94ab1.a717e6","z":"f44878c2.dd3d58","name":"","x":2000,"y":1220,"wires":[["e4cd5f2a.42268"]]},{"id":"5a135e9.64844a","type":"subflow:27e94ab1.a717e6","z":"f44878c2.dd3d58","name":"","x":2340,"y":780,"wires":[["a305dec2.8c528"]]},{"id":"570152d4.6549ac","type":"catch","z":"f44878c2.dd3d58","name":"","scope":null,"uncaught":true,"x":100,"y":40,"wires":[["26df4ce9.d725d4"]]},{"id":"26df4ce9.d725d4","type":"debug","z":"f44878c2.dd3d58","name":"bose exceptions","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":280,"y":40,"wires":[]},{"id":"e4cd5f2a.42268","type":"link out","z":"f44878c2.dd3d58","name":"bose link 2","links":["c901851d.c94ce8"],"x":2150,"y":1220,"wires":[],"l":true},{"id":"a305dec2.8c528","type":"link out","z":"f44878c2.dd3d58","name":"bose link 2","links":["c901851d.c94ce8"],"x":2490,"y":780,"wires":[],"l":true},{"id":"c901851d.c94ce8","type":"link in","z":"f44878c2.dd3d58","name":"bose link 2","links":["e4cd5f2a.42268","a305dec2.8c528"],"x":2660,"y":460,"wires":[["cd7c0e2e.34d3e"]],"l":true},{"id":"31836eb7.dc7d42","type":"split","z":"f44878c2.dd3d58","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":895,"y":140,"wires":[["ded3c586.eaa9c8"]],"l":false},{"id":"ef19b3cb.67262","type":"ui_dropdown","z":"f44878c2.dd3d58","name":"bose systems","label":"","tooltip":"","place":"Select system to control","group":"68d1b9a.924e348","order":1,"width":0,"height":0,"passthru":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"","x":1220,"y":140,"wires":[["e9914c4c.a1385"]]},{"id":"88d5c3b1.13d51","type":"ui_dropdown","z":"f44878c2.dd3d58","name":"group members","label":"","tooltip":"","place":"Select system to add or remove","group":"b6492d1d.e439","order":1,"width":"0","height":"0","passthru":false,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"","x":2140,"y":880,"wires":[["8f410b3f.9cb3b8"]]},{"id":"3bdfdeb8.eb5a22","type":"ui_numeric","z":"f44878c2.dd3d58","name":"low volume","label":"Low","tooltip":"","group":"29d31533.0524da","order":1,"width":"3","height":"1","passthru":false,"topic":"lowVolume","format":"{{value}}","min":0,"max":"100","step":1,"x":2490,"y":1080,"wires":[["3f1147a2.1759f8"]]},{"id":"41f797e6.b9af28","type":"ui_numeric","z":"f44878c2.dd3d58","name":"medium volume","label":"Med","tooltip":"","group":"29d31533.0524da","order":3,"width":"3","height":"1","passthru":false,"topic":"mediumVolume","format":"{{value}}","min":0,"max":"100","step":1,"x":2500,"y":1140,"wires":[["3f1147a2.1759f8"]]},{"id":"2b669ea3.726f52","type":"ui_numeric","z":"f44878c2.dd3d58","name":"high volume","label":"High","tooltip":"","group":"29d31533.0524da","order":2,"width":"3","height":"1","passthru":false,"topic":"highVolume","format":"{{value}}","min":0,"max":"100","step":1,"x":2490,"y":1200,"wires":[["3f1147a2.1759f8"]]},{"id":"e8db5704.abfaa8","type":"ui_numeric","z":"f44878c2.dd3d58","name":"max volume","label":"Max","tooltip":"","group":"29d31533.0524da","order":4,"width":"3","height":"1","passthru":false,"topic":"maxVolume","format":"{{value}}","min":0,"max":"100","step":1,"x":2490,"y":1260,"wires":[["3f1147a2.1759f8"]]},{"id":"32a613e3.04d12c","type":"ui_text","z":"f44878c2.dd3d58","group":"b6492d1d.e439","order":3,"width":"6","height":"3","name":"","label":"","format":"{{msg.payload}}","layout":"row-left","x":2075,"y":1000,"wires":[],"l":false},{"id":"cd7c0e2e.34d3e","type":"ui_text","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","order":27,"width":"5","height":"1","name":"","label":"","format":"{{msg.payload}}","layout":"row-left","x":2815,"y":560,"wires":[],"l":false},{"id":"7251bb1b.a56054","type":"ui_toast","z":"f44878c2.dd3d58","position":"dialog","displayTime":"3","highlight":"","outputs":1,"ok":"OK","cancel":"","topic":"","name":"ok notification","x":2700,"y":620,"wires":[[]]},{"id":"c6574cf3.2ef54","type":"ui_ui_control","z":"f44878c2.dd3d58","name":"","x":860,"y":780,"wires":[[]]},{"id":"50e78dca.715894","type":"ui_ui_control","z":"f44878c2.dd3d58","name":"","x":660,"y":440,"wires":[["8716e7ff.0ad008","cf878d62.3cd0c"]]},{"id":"b742e044.2d918","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"preset 1","order":2,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"release\",\n        \"key\": \"PRESET_1\",\n        \"volumeNotification\": \"true\"\n    },\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"press\",\n        \"key\": \"PLAY\"\n    }\n]\n})'><md-tooltip md-direction=\"top\">{{msg.payload.tooltip}}</md-tooltip>1</md-button>","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":340,"y":160,"wires":[["66b04d57.7c15b4"]]},{"id":"65235505.a7738c","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"preset 2","order":3,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"release\",\n        \"key\": \"PRESET_2\",\n        \"volumeNotification\": \"true\"\n    },\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"press\",\n        \"key\": \"PLAY\"\n    }\n]\n})'><md-tooltip md-direction=\"top\">{{msg.payload.tooltip}}</md-tooltip>2</md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":340,"y":200,"wires":[["66b04d57.7c15b4"]]},{"id":"fe2f0c58.9f715","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"preset 3","order":4,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"release\",\n        \"key\": \"PRESET_3\",\n        \"volumeNotification\": \"true\"\n    },\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"press\",\n        \"key\": \"PLAY\"\n    }\n]\n})'><md-tooltip md-direction=\"top\">{{msg.payload.tooltip}}</md-tooltip>3</md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":340,"y":240,"wires":[["66b04d57.7c15b4"]]},{"id":"d4e172d.76b979","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"preset 4","order":5,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"release\",\n        \"key\": \"PRESET_4\",\n        \"volumeNotification\": \"true\"\n    },\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"press\",\n        \"key\": \"PLAY\"\n    }\n]\n})'><md-tooltip md-direction=\"top\">{{msg.payload.tooltip}}</md-tooltip>4</md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":340,"y":280,"wires":[["66b04d57.7c15b4"]]},{"id":"e29f4224.19a28","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"preset 5","order":6,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"release\",\n        \"key\": \"PRESET_5\",\n        \"volumeNotification\": \"true\"\n    },\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"press\",\n        \"key\": \"PLAY\"\n    }\n]\n})'><md-tooltip md-direction=\"top\">{{msg.payload.tooltip}}</md-tooltip>5</md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":340,"y":320,"wires":[["66b04d57.7c15b4"]]},{"id":"dddf5e64.3f1a1","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"volume low","order":10,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"volume\",\n        \"option\": \"set\",\n        \"volume\": \"low\",\n        \"volumeNotification\": \"true\"\n    }\n]\n})'>L</md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":350,"y":720,"wires":[["66b04d57.7c15b4"]]},{"id":"c30c067.d5569f8","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"volume medium","order":11,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"volume\",\n        \"option\": \"set\",\n        \"volume\": \"medium\",\n        \"volumeNotification\": \"true\"\n    }\n]\n})'>M</md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":360,"y":760,"wires":[["66b04d57.7c15b4"]]},{"id":"eb50ec75.92e41","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"volume high","order":12,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"volume\",\n        \"option\": \"set\",\n        \"volume\": \"high\",\n        \"volumeNotification\": \"true\"\n    }\n]\n})'>H</md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":350,"y":800,"wires":[["66b04d57.7c15b4"]]},{"id":"5a8cbd7c.7f3904","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"pause","order":15,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text fa fa-pause\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"press\",\n        \"key\": \"PAUSE\",\n        \"notification\": \"Paused\"\n    }\n]\n})'></md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":330,"y":480,"wires":[["66b04d57.7c15b4"]]},{"id":"6d81dbb9.4e22b4","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"previous","order":14,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text fa fa-step-backward\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"press\",\n        \"key\": \"PREV_TRACK\",\n        \"notification\": \"Previous track\"\n    },\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"press\",\n        \"key\": \"PLAY\"\n    }\n]\n})'></md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":340,"y":520,"wires":[["66b04d57.7c15b4"]]},{"id":"a24ca12a.e16c4","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"next","order":17,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text fa fa-step-forward\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"press\",\n        \"key\": \"NEXT_TRACK\",\n        \"notification\": \"Next track\"\n    },\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"press\",\n        \"key\": \"PLAY\"\n    }\n]\n})'></md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":330,"y":560,"wires":[["66b04d57.7c15b4"]]},{"id":"ea86d04a.ad135","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"volume down","order":9,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text fa fa-volume-down\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"GET\",\n        \"function\": \"volume\"\n    },\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"volume\",\n        \"option\": \"offset\",\n        \"volume\": -1,\n        \"delay\": \"300\",\n        \"volumeNotification\": \"true\"\n    }\n]\n})'></md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":350,"y":600,"wires":[["66b04d57.7c15b4"]]},{"id":"910b11b3.f17e","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"volume up","order":13,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text fa fa-volume-up\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"GET\",\n        \"function\": \"volume\"\n    },\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"volume\",\n        \"option\": \"offset\",\n        \"volume\": 1,\n        \"delay\": \"300\",\n        \"volumeNotification\": \"true\"\n    }\n]\n})'></md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":350,"y":640,"wires":[["66b04d57.7c15b4"]]},{"id":"d50d915d.2bccf","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"now playing","order":20,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text fa fa-info-circle\" aria-label=\"Settings\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"GET\",\n        \"function\": \"now_playing\"\n    },\n    {\n        \"name\": \"select\",\n        \"method\": \"GET\",\n        \"function\": \"getZone\"\n    }\n]\n})'></md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":350,"y":840,"wires":[["66b04d57.7c15b4"]]},{"id":"cacf8f1d.c78bf","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"play","order":16,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text fa fa-play\" ng-click='send({\npayload : [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"press\",\n        \"key\": \"PLAY\",\n        \"volumeNotification\": \"true\"\n    }\n]\n})'></md-button> ","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":330,"y":400,"wires":[["66b04d57.7c15b4"]]},{"id":"36f043a.56bc4bc","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"shuffle control","order":22,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text fa fa-random\" ng-click='send({\npayload: [\n    {\n        \"group\": {\n            \"show\": [\n                \"Bose_Soundtouch_Shuffle\"\n            ],\n            \"focus\": \"true\"\n        }\n    }\n]\n})'></md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":360,"y":880,"wires":[["66b04d57.7c15b4"]]},{"id":"cb36ca05.611518","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"repeat control","order":23,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text fa fa-repeat\" ng-click='send({\npayload: [\n    {\n        \"group\": {\n            \"show\": [\n                \"Bose_Soundtouch_Repeat\"\n            ],\n            \"focus\": \"true\"\n        }\n    }\n]\n})'></md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":360,"y":1040,"wires":[["66b04d57.7c15b4"]]},{"id":"19798ba3.26c974","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"button css","order":26,"width":0,"height":0,"format":"<style>\n\n  .md-button.black-text {\n    color: black;\n  }\n\n  /* Metal ------------------------- */\n  \n  .metal {\n    position: relative;\n    margin: auto;\n    \n    text-align: center;\n    color: hsla(0,0%,20%,1);\n    text-shadow:\n      hsla(0,0%,40%,.5) 0 -1px 0,\n      hsla(0,0%,100%,.6) 0 2px 1px;\n    \n    background-color: hsl(0,0%,90%);\n    box-shadow:\n      inset hsla(0,0%,15%,  1) 0  0px 0px 2px, /* border */\n      inset hsla(0,0%,15%, .8) 0 -1px 3px 2px, /* soft SD */\n      inset hsla(0,0%,0%, .25) 0 -1px 0px 3px, /* bottom SD */\n      inset hsla(0,0%,100%,.7) 0  2px 1px 3px, /* top HL */\n      \n      hsla(0,0%, 0%,.15) 0 -2px 3px 2px, /* outer SD */\n      hsla(0,0%,100%,.5) 0  2px 3px 2px; /* outer HL */ \n\n    transition: color .2s;\n  }\n  \n  /* Linear ------------------------- */\n\n  .metal.linear {\n    width: 40px;\n    height: 40px;\n    font-size: 1.2em;\n    border-radius: .5em;\n    background-image:\n      -webkit-repeating-linear-gradient(left, hsla(0,0%,100%,0) 0%, hsla(0,0%,100%,0)   6%, hsla(0,0%,100%, .1) 7.5%),\n      -webkit-repeating-linear-gradient(left, hsla(0,0%,  0%,0) 0%, hsla(0,0%,  0%,0)   4%, hsla(0,0%,  0%,.03) 4.5%),\n      -webkit-repeating-linear-gradient(left, hsla(0,0%,100%,0) 0%, hsla(0,0%,100%,0) 1.2%, hsla(0,0%,100%,.15) 2.2%),\n      \n      linear-gradient(180deg,\n      hsl(0,0%,78%)  0%, \n      hsl(0,0%,90%) 47%, \n      hsl(0,0%,78%) 53%,\n      hsl(0,0%,70%)100%);\n  }\n    \n  /* Wide ------------------------- */\n\n  .metal.wide {\n    width: 90px;\n    height: 40px;\n  }\n\n  /* active ------------------------- */\n\n  .metal:active {\n    color: hsl(210, 100%, 40%);\n    text-shadow:\n      hsla(210,100%,20%,.3) 0 -1px 0,\n      hsl(210,100%,85%) 0 2px 1px,\n      hsla(200,100%,80%,1) 0 0 5px,\n      hsla(210,100%,50%,.6) 0 0 20px;\n    box-shadow: \n      inset hsla(210,100%,30%,  1) 0  0px 0px 2px, /* border */\n      inset hsla(210,100%,15%, .4) 0 -1px 3px 2px, /* soft SD */\n      inset hsla(210,100%,20%,.25) 0 -1px 0px 3px, /* bottom SD */\n      inset hsla(210,100%,100%,.7) 0  2px 1px 3px, /* top HL */\n      \n      hsla(210,100%,75%, .8) 0  0px 3px 2px, /* outer SD */\n      hsla(210,50%,40%, .25) 0 -2px 3px 2px, /* outer SD */\n      hsla(210,80%,95%,   1) 0  2px 3px 2px; /* outer HL */\n  }   \n\n</style>\n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":130,"y":380,"wires":[[]]},{"id":"c74e7c2a.3b5ad","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"group control","order":25,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text fa fa-rss\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"GROUP\",\n        \"function\": \"setup\",\n        \"group\": {\n            \"show\": [\n                \"Bose_Soundtouch_Group\"\n            ],\n            \"focus\": \"true\"\n        }\n    }\n]\n})'></md-button>","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":350,"y":1240,"wires":[["66b04d57.7c15b4"]]},{"id":"90588a9d.4dcbe8","type":"ui_template","z":"f44878c2.dd3d58","group":"b6492d1d.e439","name":"+ group","order":2,"width":"1","height":"1","format":"<md-button ng-disabled=\"msg.payload\" class=\"metal linear black-text fa fa-plus\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"GROUP\",\n        \"function\": \"add\",\n    }\n]\n})'></md-button>","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":340,"y":1360,"wires":[["66b04d57.7c15b4"]]},{"id":"f9e8cb2.0104c38","type":"ui_template","z":"f44878c2.dd3d58","group":"b6492d1d.e439","name":"- group","order":3,"width":"1","height":"1","format":"<md-button ng-disabled=\"msg.payload\" class=\"metal linear black-text fa fa-minus\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"GROUP\",\n        \"function\": \"remove\"\n    }\n]\n})'></md-button>","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":340,"y":1400,"wires":[["66b04d57.7c15b4"]]},{"id":"d8f2288e.8fd058","type":"ui_template","z":"f44878c2.dd3d58","group":"b6492d1d.e439","name":"cancel group","order":4,"width":"2","height":"1","format":"<md-button class=\"metal linear wide black-text\" ng-click='send({\npayload: [\n    {\n        \"group\": {\n            \"hide\": [\n                \"Bose_Soundtouch_Group\"\n            ]\n        }\n    }\n]\n})'>Cancel</md-button>","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":350,"y":1280,"wires":[["66b04d57.7c15b4"]]},{"id":"1195958e.e11eca","type":"ui_template","z":"f44878c2.dd3d58","group":"5609d593.d13b1c","name":"shuffle on","order":1,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text fa fa-toggle-on\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"press\",\n        \"key\": \"SHUFFLE_ON\",\n        \"notification\": \"Shuffle on\",\n        \"group\": {\n            \"hide\": [\n                \"Bose_Soundtouch_Shuffle\"\n            ]\n        }\n    }\n]\n})'></md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":340,"y":920,"wires":[["66b04d57.7c15b4"]]},{"id":"71127d71.7a3704","type":"ui_template","z":"f44878c2.dd3d58","group":"5609d593.d13b1c","name":"shuffle off","order":2,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text fa fa-toggle-off\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"press\",\n        \"key\": \"SHUFFLE_OFF\",\n        \"notification\": \"Shuffle off\",\n        \"group\": {\n            \"hide\": [\n                \"Bose_Soundtouch_Shuffle\"\n            ]\n        }\n    }\n]\n})'></md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":340,"y":960,"wires":[["66b04d57.7c15b4"]]},{"id":"cbe30156.fdd0e","type":"ui_template","z":"f44878c2.dd3d58","group":"75b50a15.6a3584","name":"repeat one","order":1,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text \" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"press\",\n        \"key\": \"REPEAT_ONE\",\n        \"notification\": \"Repeat one\",\n        \"group\": {\n            \"hide\": [\n                \"Bose_Soundtouch_Repeat\"\n            ]\n        }\n    }\n]\n})'>1</md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":350,"y":1080,"wires":[["66b04d57.7c15b4"]]},{"id":"8a96765.a7e2a88","type":"ui_template","z":"f44878c2.dd3d58","group":"75b50a15.6a3584","name":"repeat all","order":2,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text fa fa-toggle-on\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"press\",\n        \"key\": \"REPEAT_ALL\",\n        \"notification\": \"Repeat all\",\n        \"group\": {\n            \"hide\": [\n                \"Bose_Soundtouch_Repeat\"\n            ]\n        }\n    }\n]\n})'></md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":340,"y":1120,"wires":[["66b04d57.7c15b4"]]},{"id":"2bfd91d2.432eee","type":"ui_template","z":"f44878c2.dd3d58","group":"75b50a15.6a3584","name":"repeat off","order":3,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text fa fa-toggle-off\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"press\",\n        \"key\": \"REPEAT_OFF\",\n        \"notification\": \"Repeat off\",\n        \"group\": {\n            \"hide\": [\n                \"Bose_Soundtouch_Repeat\"\n            ]\n        }\n    }\n]\n})'></md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":340,"y":1160,"wires":[["66b04d57.7c15b4"]]},{"id":"38e08038.2fedc","type":"ui_template","z":"f44878c2.dd3d58","group":"5609d593.d13b1c","name":"cancel shuffle","order":3,"width":"2","height":"1","format":"<md-button class=\"metal linear wide black-text\" ng-click='send({\npayload: [\n    {\n        \"group\": {\n            \"hide\": [\n                \"Bose_Soundtouch_Shuffle\"\n            ]\n        }\n    }\n]\n})'>Cancel</md-button>","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":360,"y":1000,"wires":[["66b04d57.7c15b4"]]},{"id":"464e60ab.60a33","type":"ui_template","z":"f44878c2.dd3d58","group":"75b50a15.6a3584","name":"cancel repeat","order":4,"width":"2","height":"1","format":"<md-button class=\"metal linear wide black-text\" ng-click='send({\npayload: [\n    {\n        \"group\": {\n            \"hide\": [\n                \"Bose_Soundtouch_Repeat\"\n            ]\n        }\n    }\n]\n})'>Cancel</md-button>","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":360,"y":1200,"wires":[["66b04d57.7c15b4"]]},{"id":"8c3baed.d206a5","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"power","order":19,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text fa fa-power-off\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"press\",\n        \"key\": \"POWER\"\n    },\n    {\n        \"name\": \"select\",\n        \"method\": \"POST\",\n        \"function\": \"key\",\n        \"keyState\": \"release\",\n        \"key\": \"POWER\",\n        \"notification\": \"Power off\"\n    }\n]\n})'></md-button> \n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":330,"y":440,"wires":[["66b04d57.7c15b4"]]},{"id":"caad1708.7726f8","type":"ui_template","z":"f44878c2.dd3d58","group":"b6492d1d.e439","name":"save group","order":5,"width":"2","height":"1","format":"<md-button class=\"metal linear wide black-text\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"GROUP\",\n        \"function\": \"save\",\n        \"group\": {\n            \"hide\": [\n                \"Bose_Soundtouch_Group\"\n            ]\n        }\n    }\n]\n})'>Save</md-button>","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":350,"y":1320,"wires":[["66b04d57.7c15b4"]]},{"id":"76091969.59a1f8","type":"ui_template","z":"f44878c2.dd3d58","group":"68d1b9a.924e348","name":"volume presets","order":24,"width":"1","height":"1","format":"<md-button class=\"metal linear black-text fa fa-sliders\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"VOLUME\",\n        \"function\": \"setup\",\n        \"group\": {\n            \"show\": [\n                \"Bose_Soundtouch_Volume_presets\"\n            ],\n            \"focus\": \"true\"\n        }\n    }\n]\n})'></md-button>","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":360,"y":1440,"wires":[["66b04d57.7c15b4"]]},{"id":"188a4749.43a479","type":"ui_template","z":"f44878c2.dd3d58","group":"29d31533.0524da","name":"cancel volume","order":6,"width":"2","height":"1","format":"<md-button class=\"metal linear wide black-text\" ng-click='send({\npayload: [\n    {\n        \"group\": {\n            \"hide\": [\n                \"Bose_Soundtouch_Volume_presets\"\n            ]\n        }\n    }\n]\n})'>Cancel</md-button>","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":360,"y":1480,"wires":[["66b04d57.7c15b4"]]},{"id":"3e407aa2.47e706","type":"ui_template","z":"f44878c2.dd3d58","group":"29d31533.0524da","name":"save volume","order":7,"width":"2","height":"1","format":"<md-button class=\"metal linear wide black-text\" ng-click='send({\npayload: [\n    {\n        \"name\": \"select\",\n        \"method\": \"VOLUME\",\n        \"function\": \"save\",\n        \"group\": {\n            \"hide\": [\n                \"Bose_Soundtouch_Volume_presets\"\n            ]\n        }\n    }\n]\n})'>Save</md-button>","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":350,"y":1520,"wires":[["66b04d57.7c15b4"]]},{"id":"b106241c.6e7a38","type":"http in","z":"f44878c2.dd3d58","name":"","url":"/now_playing","method":"get","upload":false,"swaggerDoc":"","x":1710,"y":380,"wires":[["fc3c9f5c.4b2c3"]]},{"id":"622a084f.f61ad8","type":"http response","z":"f44878c2.dd3d58","name":"","statusCode":"","headers":{},"x":2970,"y":680,"wires":[]},{"id":"fc3c9f5c.4b2c3","type":"function","z":"f44878c2.dd3d58","name":"now playing","func":"msg.payload =\n[\n    {\n        \"name\": \"select\",\n        \"method\": \"GET\",\n        \"function\": \"now_playing\"\n    }\n];\n\nreturn msg;","outputs":1,"noerr":0,"x":1910,"y":380,"wires":[[]]},{"id":"96a878d8.a150e8","type":"link out","z":"f44878c2.dd3d58","name":"bose function","links":["f4cb94b5.ee5c38"],"x":2090,"y":380,"wires":[],"l":true},{"id":"1b9eb924.2496c7","type":"function","z":"f44878c2.dd3d58","name":"format","func":"var i;\nvar bose = flow.get('bose_soundtouch_systems', 'memory');\n\nfunction getBoseName(ipaddress) {\n    var j, name;\n    for (j in bose.systems) {\n        if (ipaddress == bose.systems[j].ipAddress) {\n            name = bose.systems[j].name;\n            break;\n        }\n    }\n    return name;\n}\n\ntry {\n    message = msg.payload[0].nowPlaying.track[0] + '  ' + msg.payload[0].nowPlaying.artist[0];\n}\ncatch(err) {\n    message = 'Not active...';\n    node.status({fill: 'blue', shape: 'dot', text: message});\n}\nmsg.payload = message;\ndelete msg.topic;\nreturn msg;\n","outputs":1,"noerr":0,"x":2550,"y":680,"wires":[["a0070524.f92dc8"]]},{"id":"b62cfae4.5cad08","type":"comment","z":"f44878c2.dd3d58","name":"now_playing request","info":"","x":1710,"y":340,"wires":[]},{"id":"a0070524.f92dc8","type":"google-tts","z":"f44878c2.dd3d58","name":"","inputField":"payload","inputFieldType":"msg","outputField":"payload","outputFieldType":"msg","languageField":"en","languageFieldType":"str","speedField":"1","speedFieldType":"num","x":2680,"y":680,"wires":[["5c44b823.ce2c08"]]},{"id":"5c44b823.ce2c08","type":"function","z":"f44878c2.dd3d58","name":"https -> http","func":"msg.payload = msg.payload.replace(\"https\", \"http\");\nreturn msg;","outputs":1,"noerr":0,"x":2830,"y":680,"wires":[["622a084f.f61ad8"]]},{"id":"68d1b9a.924e348","type":"ui_group","z":"","name":"Soundtouch","tab":"a5aa690c.87a428","disp":true,"width":"5","collapse":false},{"id":"b6492d1d.e439","type":"ui_group","z":"","name":"Group","tab":"a5aa690c.87a428","disp":true,"width":"6","collapse":false},{"id":"29d31533.0524da","type":"ui_group","z":"","name":"Volume presets","tab":"a5aa690c.87a428","disp":true,"width":"6","collapse":false},{"id":"5609d593.d13b1c","type":"ui_group","z":"","name":"Shuffle","tab":"a5aa690c.87a428","disp":true,"width":"6","collapse":false},{"id":"75b50a15.6a3584","type":"ui_group","z":"","name":"Repeat","tab":"a5aa690c.87a428","disp":true,"width":"6","collapse":false},{"id":"a5aa690c.87a428","type":"ui_tab","z":"","name":"Bose Soundtouch","icon":"fa-music","disabled":false,"hidden":false}]

Flow Info

Created 5 years, 7 months ago
Updated 4 years, 3 months ago
Rating: 5 1

Owner

Actions

Rate:

Node Types

Core
  • catch (x1)
  • change (x1)
  • comment (x10)
  • debug (x5)
  • delay (x2)
  • function (x27)
  • http in (x1)
  • http request (x2)
  • http response (x1)
  • inject (x2)
  • join (x1)
  • link in (x5)
  • link out (x9)
  • split (x4)
  • switch (x7)
  • xml (x1)
Other
  • google-tts (x1)
  • subflow (x1)
  • subflow:27e94ab1.a717e6 (x3)
  • tab (x1)
  • ui_dropdown (x2)
  • ui_group (x5)
  • ui_numeric (x4)
  • ui_tab (x1)
  • ui_template (x34)
  • ui_text (x2)
  • ui_toast (x1)
  • ui_ui_control (x2)

Tags

  • bose
  • soundtouch
  • musicplayer
  • dashboard
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option