How to trigger an URL?

I need to create an automation to trigger an Scrypted webpage (little ping).

http://192.168.2.XX:11080/endpoint/48/public/

This site just detect when someone open it and start action, but I need to create a button on Home Assistant that “ping” this site every time when I press it.

I’m beginner on HA and make no idea how to proceed.

Is that a rest api?What are you expecting to receive from that endpoint?

Try

curl http://192.168.2.XX:11080/endpoint/48/public/

and let us know what it returns.

1 Like

Actually I don’t need any return. Just open this webpage is enough to Scrypted understand the button was pressed (I’ll use it on my Doorbell). So I need a button that open this page every time I press the button

I tried to do it on configuration.yaml, but the button doesn’t show up. I make no idea how to proceed.

input_button:
  ring_bell:
    rest_command:
        name: Ring bell
        icon: mdi:bellrest_command:
        url: http://192.168.2.XX:11080/endpoint/48/public/

I think this

rest_command:
  doorbell:
    url: "http://192.168.2.XX:11080/endpoint/48/public/"

I got this error message:

Invalid config for [rest_command]: invalid slug doorbellButton (try doorbellbutton) for dictionary value @ data[‘rest_command’]. Got OrderedDict([(‘doorbellButton’, OrderedDict([(‘url’, ‘http://192.168.2.32:11080/endpoint/48/public/’)]))]). (See /config/configuration.yaml, line 13).

Oh! I did a big mistake haha

I was expecting to have a button, but I don’t need that. It’s exposed as a Service on Automation, so it’s working perfectly now.

This integration can expose regular REST commands as services. Services can be called from a script or in automation.

Thanks for the help!

1 Like