Homeassistant, I created a automation: alias: webhook开窗帘 description: "" trigger: -…
- User
Homeassistant, I created a automation: alias: webhook开窗帘 description: "" trigger:
- platform: webhook
allowed_methods:
- POST
- PUT local_only: true webhook_id: "-VOfAPkQn0ioA1mupP_w-vdG7" condition: [] action:
- device_id: fdcff0c34505e1cfafb906ea47cfdb90 domain: cover entity_id: dafc8096fc6385e7e43ef959ce642d56 type: open mode: single
how can I trigger this automation in browser?
- platform: webhook
allowed_methods:
- Assistant
To trigger the webhook automation you created in Home Assistant from a browser, you need to send an HTTP POST or PUT request to the specific webhook endpoint.
- User
how can I enable the webhook call from external network?
- Assistant
- User
C:\Windows\System32\cmd.exe /k start /b curl -d -X https://haos.ygy3389.com/api/webhook/-VOfAPkQn0ioA1mupP_w-vdG7 & exit
I create a short cut to trigger the automation webhook in homeassistant, however, there's a black windows prompt and disappear, how to make it execute in the background only
- Assistant
Creating a shortcut to trigger a webhook via
curlin the background can be achieved without launching a command prompt window by using a VBScript. This method allows for executing commands silently.Here's how you can create a VBScript to run
curlin the background:-
Create the VBScript File:
Open a text editor (e.g., Notepad) and paste the following script:
Set objShell = CreateObject("WScript.Shell") objShell.Run "curl -d -X POST https://haos.ygy3389.com/api/webhook/-VOfAPkQn0ioA1mupP_w-vdG7", 0, FalseNote:
- I've added
POSTto thecurlcommand assuming you want to send a POST request. Adjust it if needed.
- I've added
-
- User
any other way? I don't wanna use vbs, can't cmd be execute in the background?
- Assistant
If you'd prefer not to use VBScript and want to execute the
curlcommand directly from a CMD shortcut without showing the command window, you can use the Windows built-inpowershellinstead. PowerShell can run commands in the background silently.Here's how you can create a PowerShell script and run it silently:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.