Intro
Note: The Futurehome app does not support automations for music services, and you can therefore not make automations for Bose speakers from the Futurehome app. You can however make automations through Thingsplex flows.
To access Thingsplex, please follow the Thingsplex guide.
If you make a flow that works well for you, and you want to share it with the rest of the Futurehome community, please do so in the Forum.
Automation example
As an example we have created an automation to have your music start playing when there is motion, and stop playing x minutes after motion is no longer detected.
The source code is available at the bottom of this document. To make this flow work with your speakers, follow these steps:
- Copy the source code at the bottom of this document.
- Click on «import» in flows and paste the source code provided.
- Change the address of the sensor presence.
- Click on the trigger node.
- Under "Advanced service binding", change the address of your presence sensor. You can find the address of your device in the Futurehome app as shown below (go to settings, devices, find your motion sensor).
- Click on the trigger node.
- Change the address of the Bose speakers.
- Click on the action node.
- Under "Advanced service binding", change the address of your Bose speaker. You can find the address of your device in the Futurehome app as shown below (go to settings, devices, and find your Bose speaker).
- Click on the action node.
- Click "Save" in the lower left corner.
List of supported interfaces: https://github.com/thingsplex/bose-ad
Source code
-
{
"Id": "GjhFF8sIXyVZge2",
"ClassId": "GjhFF8sIXyVZge2",
"Author": "",
"Version": 0,
"CreatedAt": "2020-08-06T12:40:35.076238012+02:00",
"UpdatedAt": "2020-08-11T12:41:42.290449085+02:00",
"Name": "Bose test flow",
"Group": "bose",
"Description": "Bose test flow",
"Nodes": [
{
"Id": "1",
"Type": "trigger",
"Label": "sensor_presence",
"SuccessTransition": "2",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:evt/rt:dev/rn:zw/ad:1/sv:sensor_contact/ad:7_0",
"Service": "sensor_presence",
"ServiceInterface": "evt.presence.report",
"Config": {
"InputVariableType": "",
"IsValueFilterEnabled": true,
"LookupServiceNameAndLocation": false,
"PropFilterName": "",
"PropFilterValue": "",
"RegisterAsVirtualService": false,
"Timeout": 0,
"ValueFilter": {
"Value": true,
"ValueType": "bool"
},
"ValueJPath": "",
"ValueJPathResultType": "",
"VirtualServiceGroup": "",
"VirtualServiceProps": null
},
"Ui": {
"nodeType": "",
"x": 105,
"y": 267
}
},
{
"Id": "2",
"Type": "action",
"Label": "Play",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:cmd/rt:dev/rn:bose/ad:1/sv:media_player/ad:EC24B8EBB3A5",
"Service": "media_player",
"ServiceInterface": "cmd.playback.set",
"Config": {
"DefaultValue": {
"Value": "play",
"ValueType": "string"
},
"IsVariableGlobal": false,
"Props": {},
"RegisterAsVirtualService": false,
"ResponseToTopic": "",
"VariableName": "",
"VirtualServiceGroup": "",
"VirtualServiceProps": {}
},
"Ui": {
"nodeType": "",
"x": 127,
"y": 449
}
},
{
"Id": "6",
"Type": "action",
"Label": "Pause",
"SuccessTransition": "",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:cmd/rt:dev/rn:bose/ad:1/sv:media_player/ad:EC24B8EBB3A5",
"Service": "media_player",
"ServiceInterface": "cmd.playback.set",
"Config": {
"DefaultValue": {
"Value": "pause",
"ValueType": "string"
},
"IsVariableGlobal": false,
"Props": {},
"RegisterAsVirtualService": false,
"ResponseToTopic": "",
"VariableName": "",
"VirtualServiceGroup": "",
"VirtualServiceProps": {}
},
"Ui": {
"nodeType": "",
"x": 380,
"y": 450
}
},
{
"Id": "7",
"Type": "trigger",
"Label": "sensor_presence",
"SuccessTransition": "6",
"TimeoutTransition": "",
"ErrorTransition": "",
"Address": "pt:j1/mt:evt/rt:dev/rn:zw/ad:1/sv:sensor_contact/ad:7_0",
"Service": "sensor_presence",
"ServiceInterface": "evt.presence.report",
"Config": {
"InputVariableType": "",
"IsValueFilterEnabled": true,
"LookupServiceNameAndLocation": false,
"PropFilterName": "",
"PropFilterValue": "",
"RegisterAsVirtualService": false,
"Timeout": 0,
"ValueFilter": {
"Value": false,
"ValueType": "bool"
},
"ValueJPath": "",
"ValueJPathResultType": "",
"VirtualServiceGroup": "",
"VirtualServiceProps": null
},
"Ui": {
"nodeType": "",
"x": 357,
"y": 264
}
}
],
"Settings": null,
"IsDisabled": false,
"IsDefault": false,
"ParallelExecution": "parallel"
}
Comments
0 comments
Please sign in to leave a comment.