Last active
July 16, 2019 19:01
-
-
Save vigonotion/9f4d515f099aaf2feae51d8cb32c0915 to your computer and use it in GitHub Desktop.
DIY Echo Link Amp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"id":"7dd9b949.241c5","type":"server-state-changed","z":"888ff54.01d0f08","name":"Echo Input is playing","server":"e02cc9b7.16ead8","entityidfilter":"media_player.echo_input","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"playing","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"x":130,"y":120,"wires":[[],["94457b00.b5f5a8"]]},{"id":"cac76f36.abacc8","type":"api-call-service","z":"888ff54.01d0f08","name":"Select line3","server":"e02cc9b7.16ead8","service_domain":"media_player","service":"select_source","data":"{\"entity_id\":\"media_player.receiver\",\"source\":\"line3\"}","mergecontext":"","output_location":"","output_location_type":"none","x":810,"y":120,"wires":[[]]},{"id":"1f5384a.3c845fb","type":"api-call-service","z":"888ff54.01d0f08","name":"Turn Receiver on","server":"e02cc9b7.16ead8","service_domain":"media_player","service":"turn_on","data":"{\"entity_id\":\"media_player.receiver\"}","mergecontext":"","output_location":"","output_location_type":"none","x":590,"y":140,"wires":[["cac76f36.abacc8"]]},{"id":"94457b00.b5f5a8","type":"api-current-state","z":"888ff54.01d0f08","name":"Receiver off?","server":"e02cc9b7.16ead8","outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"media_player.receiver","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":350,"y":120,"wires":[["cac76f36.abacc8"],["1f5384a.3c845fb"]]},{"id":"3319a04c.f8f148","type":"delay","z":"888ff54.01d0f08","name":"wait 10s","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":380,"y":320,"wires":[["1e87331c.1e694d"]]},{"id":"1e87331c.1e694d","type":"api-current-state","z":"888ff54.01d0f08","name":"Receiver Status","server":"e02cc9b7.16ead8","outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.receiver","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":540,"y":320,"wires":[[],["6ac7f480.586a24"]]},{"id":"75c8a22.3019a5c","type":"server-state-changed","z":"888ff54.01d0f08","name":"Echo paused/stopped","server":"e02cc9b7.16ead8","entityidfilter":"media_player.echo_input","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"playing","halt_if_type":"str","halt_if_compare":"is_not","outputs":2,"output_only_on_state_change":false,"x":140,"y":320,"wires":[["64609d5f.913ab4"],["3319a04c.f8f148"]]},{"id":"6ac7f480.586a24","type":"switch","z":"888ff54.01d0f08","name":"Receiver still on line3?","property":"data.attributes.source","propertyType":"msg","rules":[{"t":"eq","v":"line3","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":740,"y":320,"wires":[["74e0ae1c.5a5738"]]},{"id":"74e0ae1c.5a5738","type":"api-call-service","z":"888ff54.01d0f08","name":"Turn off Receiver","server":"e02cc9b7.16ead8","service_domain":"media_player","service":"turn_off","data":"{\"entity_id\":\"media_player.receiver\"}","mergecontext":"","output_location":"","output_location_type":"none","x":950,"y":320,"wires":[[]]},{"id":"4735063e.92f4e","type":"server-state-changed","z":"888ff54.01d0f08","name":"Receiver state changed","server":"e02cc9b7.16ead8","entityidfilter":"media_player.tom_main","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"x":140,"y":540,"wires":[[],["9bf399f4.3eb14"]]},{"id":"4298fe9c.05a8e8","type":"switch","z":"888ff54.01d0f08","name":"Source changed?","property":"data.attributes.source","propertyType":"msg","rules":[{"t":"neq","v":"line3","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":630,"y":580,"wires":[["5d869074.32b66"]]},{"id":"5d869074.32b66","type":"api-call-service","z":"888ff54.01d0f08","name":"pause music on echo input","server":"e02cc9b7.16ead8","service_domain":"media_player","service":"media_pause","data":"{\"entity_id\":\"media_player.echo_input\"}","mergecontext":"","output_location":"","output_location_type":"none","x":860,"y":560,"wires":[[]]},{"id":"64609d5f.913ab4","type":"change","z":"888ff54.01d0f08","name":"reset if playing again","rules":[{"t":"set","p":"reset","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":300,"y":260,"wires":[["3319a04c.f8f148"]]},{"id":"50b7e819.473768","type":"api-current-state","z":"888ff54.01d0f08","name":"Receiver Status","server":"e02cc9b7.16ead8","outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"media_player.receiver","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":440,"y":560,"wires":[["5d869074.32b66"],["4298fe9c.05a8e8"]]},{"id":"9bf399f4.3eb14","type":"delay","z":"888ff54.01d0f08","name":"wait 10s","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":340,"y":500,"wires":[["50b7e819.473768"]]},{"id":"e02cc9b7.16ead8","type":"server","z":"","name":"Home Assistant"}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment