Open michaeltryl opened 2 years ago
you can use shell commands to make your instance do this http request, then make an optimistic switch from it.
The following command, for example sets my TCL's Breeva A2 to low.
/usr/bin/curl_ -X GET http://192.168.100.251:5000/command?message=set%20air%20purifier%20a%202%20speed%20to%20low
so my config file has this line:
shell_command: !include includes/shell commands.yaml
and my shell_commands.yaml has these:
tcl_a2_low: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=set%20air%20purifier%20a%202%20speed%20to%20low"
tcl_a2_medium: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=set%20air%20purifier%20a%202%20speed%20to%20mid"
tcl_a2_high: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=set%20air%20purifier%20a%202%20speed%20to%20high"
tcl_a2_auto: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=set%20air%20purifier%20a%202%20speed%20to%20auto"
tcl_a2_off: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=turn%20off%20air%20purifier%20a%202"
tcl_a3_low: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=set%20air%20purifier%20a%203%20speed%20to%20low"
tcl_a3_medium: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=set%20air%20purifier%20a%203%20speed%20to%20mid"
tcl_a3_high: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=set%20air%20purifier%20a%203%20speed%20to%20high"
tcl_a3_auto: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=set%20air%20purifier%20a%203%20speed%20to%20auto"
tcl_a3_off: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=turn%20off%20air%20purifier%20a%203"
tcl_a5_low: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=set%20air%20purifier%20a%205%20speed%20to%20low"
tcl_a5_medium: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=set%20air%20purifier%20a%205%20speed%20to%20mid"
tcl_a5_high: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=set%20air%20purifier%20a%205%20speed%20to%20high"
tcl_a5_auto: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=set%20air%20purifier%20a%205%20speed%20to%20auto"
tcl_a5_off: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=turn%20off%20air%20purifier%20a%205"
tcl_6500_on: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=turn%20on%20robovac%206500"
tcl_6500_off: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=turn%20off%20robovac%206500"
tcl_2000_on: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=turn%20on%20robovac%202000"
tcl_2000_off: "/usr/bin/curl -X GET http://192.168.100.251:5000/command?message=turn%20off%20robovac%202000"
I am not sure if its the best way to use it, but it works
BUT
I repeatedly faced issues with this addon. It is unreliable and I believe is abandoned. @AndBobsYourUncle or am I wrong?
You're really better off creating a notify service:
- name: ga_command
platform: rest
resource: http://localhost:5000/command
and then call it:
service: notify.ga_command
data:
message: 'broadcast hello'
cant figurer out where to type http://hassio.local:5000/broadcast_message?message= 566[YOUR TEXT MESSAGE] in an automation. can someone help