zZyTOo
(Z Zy T Oo)
April 19, 2023, 9:43am
1
Hi there !
I want to execute a Shell Command each Hours.
I don’t find how to do it on automation…
I created shell command on Configuration.yaml
shell_command:
mesure_forced: mosquitto_pub -h *my_ip_address* -p *port* -m '' -t 'blueriiot/commands/release_last_unprocessed/ID' -u '*user*' -P '*password*'
But don’t know how to add it on automation and repeat it each hours
Regards
tom_l
April 19, 2023, 9:44am
2
zZyTOo
(Z Zy T Oo)
April 19, 2023, 9:58am
3
Ok for triggering.
Regarding using ssh on automation ?
I don’t know how to implement it
Something like:
trigger:
- platform: time_pattern
hours: /1
condition: []
action:
- service: shell_command.mesure_forced
data: {}
mode: single
1 Like
zZyTOo
(Z Zy T Oo)
April 19, 2023, 1:47pm
5
Thanks for example
I have this error message
Mesure piscine use unknown service
The automation “Mesure piscine” (automation.automation_3
) has an action that calls an unknown service: shell_command.mesure_forced
.
Here is step details
tom_l
April 19, 2023, 2:54pm
6
Did you restart home assistant after creating your shell command?
Is the service available in Developer Tools → Services?
zZyTOo
(Z Zy T Oo)
April 19, 2023, 3:02pm
7
I just restarted HA and now it’s working
Thanks for your help tom_I