Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant get it to work #45

Open
michaeltryl opened this issue Dec 2, 2021 · 2 comments
Open

cant get it to work #45

michaeltryl opened this issue Dec 2, 2021 · 2 comments

Comments

@michaeltryl
Copy link

cant figurer out where to type
http://hassio.local:5000/broadcast_message?message= 566[YOUR TEXT MESSAGE]
in an automation. can someone help

@NikitaKorneev
Copy link

NikitaKorneev commented Dec 23, 2021

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?

@calisro
Copy link

calisro commented May 9, 2022

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants