|
[ |
|
{ |
|
"id": "2aa9bdb.8d58742", |
|
"type": "api-call-service", |
|
"z": "84be3fba.588ae", |
|
"name": "ScreenShot", |
|
"server": "4b87e078.1ca048", |
|
"version": 1, |
|
"debugenabled": false, |
|
"service_domain": "androidtv", |
|
"service": "adb_command", |
|
"entityId": "", |
|
"data": "{\"entity_id\":\"media_player.nvidia_shield\",\"command\":\"screencap -p > /sdcard/temp/screen.png\"}", |
|
"dataType": "json", |
|
"mergecontext": "", |
|
"output_location": "", |
|
"output_location_type": "none", |
|
"mustacheAltTags": false, |
|
"x": 1150, |
|
"y": 40, |
|
"wires": [ |
|
[ |
|
"2a0ef006.11c5f" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "2a0ef006.11c5f", |
|
"type": "api-call-service", |
|
"z": "84be3fba.588ae", |
|
"name": "Download ScreenShot", |
|
"server": "4b87e078.1ca048", |
|
"version": 1, |
|
"debugenabled": false, |
|
"service_domain": "androidtv", |
|
"service": "download", |
|
"entityId": "", |
|
"data": "{\"entity_id\":\"media_player.nvidia_shield\",\"device_path\":\"/sdcard/temp/screen.png\",\"local_path\":\"/config/www/nvidia_screen.png\"}", |
|
"dataType": "json", |
|
"mergecontext": "", |
|
"output_location": "", |
|
"output_location_type": "none", |
|
"mustacheAltTags": false, |
|
"x": 1360, |
|
"y": 40, |
|
"wires": [ |
|
[] |
|
] |
|
}, |
|
{ |
|
"id": "2c1f5dec.367082", |
|
"type": "server-state-changed", |
|
"z": "84be3fba.588ae", |
|
"name": "", |
|
"server": "4b87e078.1ca048", |
|
"version": 1, |
|
"exposeToHomeAssistant": false, |
|
"haConfig": [ |
|
{ |
|
"property": "name", |
|
"value": "" |
|
}, |
|
{ |
|
"property": "icon", |
|
"value": "" |
|
} |
|
], |
|
"entityidfilter": "media_player.nvidia_shield", |
|
"entityidfiltertype": "exact", |
|
"outputinitially": false, |
|
"state_type": "str", |
|
"haltifstate": "playing", |
|
"halt_if_type": "str", |
|
"halt_if_compare": "is", |
|
"outputs": 2, |
|
"output_only_on_state_change": true, |
|
"x": 200, |
|
"y": 40, |
|
"wires": [ |
|
[ |
|
"fec41315.ec7d7" |
|
], |
|
[ |
|
"fec41315.ec7d7" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "fec41315.ec7d7", |
|
"type": "api-render-template", |
|
"z": "84be3fba.588ae", |
|
"name": "Playing... but not Netflix, Disney, etc", |
|
"server": "4b87e078.1ca048", |
|
"template": "{{ \nis_state('media_player.nvidia_shield', 'playing') \nand \n(\n is_state_attr('media_player.nvidia_shield', 'source', 'com.plexapp.android')\n or \n is_state_attr('media_player.nvidia_shield', 'source', 'Netflix') \n)\n}}", |
|
"resultsLocation": "payload", |
|
"resultsLocationType": "msg", |
|
"templateLocation": "template", |
|
"templateLocationType": "msg", |
|
"x": 540, |
|
"y": 40, |
|
"wires": [ |
|
[ |
|
"1813a110.36d25f" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "1813a110.36d25f", |
|
"type": "switch", |
|
"z": "84be3fba.588ae", |
|
"name": "", |
|
"property": "payload", |
|
"propertyType": "msg", |
|
"rules": [ |
|
{ |
|
"t": "eq", |
|
"v": "True", |
|
"vt": "str" |
|
}, |
|
{ |
|
"t": "eq", |
|
"v": "False", |
|
"vt": "str" |
|
} |
|
], |
|
"checkall": "true", |
|
"repair": false, |
|
"outputs": 2, |
|
"x": 750, |
|
"y": 40, |
|
"wires": [ |
|
[ |
|
"dc4cc96b.854978" |
|
], |
|
[ |
|
"7ba55ef1.565b6" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "dc4cc96b.854978", |
|
"type": "looptimer", |
|
"z": "84be3fba.588ae", |
|
"duration": "30", |
|
"units": "Second", |
|
"maxloops": "10000", |
|
"maxtimeout": "2", |
|
"maxtimeoutunits": "Hour", |
|
"name": "", |
|
"x": 960, |
|
"y": 40, |
|
"wires": [ |
|
[ |
|
"2aa9bdb.8d58742" |
|
], |
|
[] |
|
] |
|
}, |
|
{ |
|
"id": "7ba55ef1.565b6", |
|
"type": "template", |
|
"z": "84be3fba.588ae", |
|
"name": "STOP", |
|
"field": "Payload", |
|
"fieldType": "msg", |
|
"format": "handlebars", |
|
"syntax": "plain", |
|
"template": "STOP", |
|
"output": "str", |
|
"x": 870, |
|
"y": 100, |
|
"wires": [ |
|
[ |
|
"dc4cc96b.854978" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "4b87e078.1ca048", |
|
"type": "server", |
|
"z": "", |
|
"name": "hassio", |
|
"legacy": false, |
|
"hassio": true, |
|
"rejectUnauthorizedCerts": true, |
|
"ha_boolean": "y|yes|true|on|home|open", |
|
"connectionDelay": true |
|
} |
|
][ |
|
{ |
|
"id": "2aa9bdb.8d58742", |
|
"type": "api-call-service", |
|
"z": "84be3fba.588ae", |
|
"name": "ScreenShot", |
|
"server": "4b87e078.1ca048", |
|
"version": 1, |
|
"debugenabled": false, |
|
"service_domain": "androidtv", |
|
"service": "adb_command", |
|
"entityId": "", |
|
"data": "{\"entity_id\":\"media_player.nvidia_shield\",\"command\":\"screencap -p > /sdcard/temp/screen.png\"}", |
|
"dataType": "json", |
|
"mergecontext": "", |
|
"output_location": "", |
|
"output_location_type": "none", |
|
"mustacheAltTags": false, |
|
"x": 1150, |
|
"y": 40, |
|
"wires": [ |
|
[ |
|
"2a0ef006.11c5f" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "2a0ef006.11c5f", |
|
"type": "api-call-service", |
|
"z": "84be3fba.588ae", |
|
"name": "Download ScreenShot", |
|
"server": "4b87e078.1ca048", |
|
"version": 1, |
|
"debugenabled": false, |
|
"service_domain": "androidtv", |
|
"service": "download", |
|
"entityId": "", |
|
"data": "{\"entity_id\":\"media_player.nvidia_shield\",\"device_path\":\"/sdcard/temp/screen.png\",\"local_path\":\"/config/www/nvidia_screen.png\"}", |
|
"dataType": "json", |
|
"mergecontext": "", |
|
"output_location": "", |
|
"output_location_type": "none", |
|
"mustacheAltTags": false, |
|
"x": 1360, |
|
"y": 40, |
|
"wires": [ |
|
[] |
|
] |
|
}, |
|
{ |
|
"id": "2c1f5dec.367082", |
|
"type": "server-state-changed", |
|
"z": "84be3fba.588ae", |
|
"name": "", |
|
"server": "4b87e078.1ca048", |
|
"version": 1, |
|
"exposeToHomeAssistant": false, |
|
"haConfig": [ |
|
{ |
|
"property": "name", |
|
"value": "" |
|
}, |
|
{ |
|
"property": "icon", |
|
"value": "" |
|
} |
|
], |
|
"entityidfilter": "media_player.nvidia_shield", |
|
"entityidfiltertype": "exact", |
|
"outputinitially": false, |
|
"state_type": "str", |
|
"haltifstate": "playing", |
|
"halt_if_type": "str", |
|
"halt_if_compare": "is", |
|
"outputs": 2, |
|
"output_only_on_state_change": true, |
|
"x": 200, |
|
"y": 40, |
|
"wires": [ |
|
[ |
|
"fec41315.ec7d7" |
|
], |
|
[ |
|
"fec41315.ec7d7" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "fec41315.ec7d7", |
|
"type": "api-render-template", |
|
"z": "84be3fba.588ae", |
|
"name": "Playing... but not Netflix, Disney, etc", |
|
"server": "4b87e078.1ca048", |
|
"template": "{{ \nis_state('media_player.nvidia_shield', 'playing') \nand \n(\n is_state_attr('media_player.nvidia_shield', 'source', 'com.plexapp.android')\n or \n is_state_attr('media_player.nvidia_shield', 'source', 'Netflix') \n)\n}}", |
|
"resultsLocation": "payload", |
|
"resultsLocationType": "msg", |
|
"templateLocation": "template", |
|
"templateLocationType": "msg", |
|
"x": 540, |
|
"y": 40, |
|
"wires": [ |
|
[ |
|
"1813a110.36d25f" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "1813a110.36d25f", |
|
"type": "switch", |
|
"z": "84be3fba.588ae", |
|
"name": "", |
|
"property": "payload", |
|
"propertyType": "msg", |
|
"rules": [ |
|
{ |
|
"t": "eq", |
|
"v": "True", |
|
"vt": "str" |
|
}, |
|
{ |
|
"t": "eq", |
|
"v": "False", |
|
"vt": "str" |
|
} |
|
], |
|
"checkall": "true", |
|
"repair": false, |
|
"outputs": 2, |
|
"x": 750, |
|
"y": 40, |
|
"wires": [ |
|
[ |
|
"dc4cc96b.854978" |
|
], |
|
[ |
|
"7ba55ef1.565b6" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "dc4cc96b.854978", |
|
"type": "looptimer", |
|
"z": "84be3fba.588ae", |
|
"duration": "30", |
|
"units": "Second", |
|
"maxloops": "10000", |
|
"maxtimeout": "2", |
|
"maxtimeoutunits": "Hour", |
|
"name": "", |
|
"x": 960, |
|
"y": 40, |
|
"wires": [ |
|
[ |
|
"2aa9bdb.8d58742" |
|
], |
|
[] |
|
] |
|
}, |
|
{ |
|
"id": "7ba55ef1.565b6", |
|
"type": "template", |
|
"z": "84be3fba.588ae", |
|
"name": "STOP", |
|
"field": "Payload", |
|
"fieldType": "msg", |
|
"format": "handlebars", |
|
"syntax": "plain", |
|
"template": "STOP", |
|
"output": "str", |
|
"x": 870, |
|
"y": 100, |
|
"wires": [ |
|
[ |
|
"dc4cc96b.854978" |
|
] |
|
] |
|
}, |
|
{ |
|
"id": "4b87e078.1ca048", |
|
"type": "server", |
|
"z": "", |
|
"name": "hassio", |
|
"legacy": false, |
|
"hassio": true, |
|
"rejectUnauthorizedCerts": true, |
|
"ha_boolean": "y|yes|true|on|home|open", |
|
"connectionDelay": true |
|
} |
|
] |