Call a URL as an action

Hi folks,

I want to reboot a device every day at midnight by calling an API endpoint with a URL.

How can I do this with HomeAssistant?
Which action do I have to use?

Regards
BJ70

Hi, search for rest_command here on the forum.

1 Like

I tried

The Problem ist, that I don’t need any Data.
I Just have to call the URL

http://192.168.178.139/reboot

configuration.yaml

rest_command:
  cerasmarter_reboot:
    url: "http://192.168.178.139/reboot"   

automation

alias: Reboot CERASMARTER
description: ""
trigger:
  - platform: time
    at: "00:00:00"
condition: []
action:
  - service: rest_command.cerasmarter_reboot
    data:
        reboot: true
mode: single

does not work

configuration.yaml

shell_command:
  cerasmarter_reboot: "curl 'http://192.168.178.139/reboot'"

automation

alias: Reboot CERASMARTER
description: ""
trigger:
  - platform: time
    at: "00:00:00"
condition: []
action:
  - service: shell_command.cerasmarter_reboot
    data: {}
mode: single
3 Likes