Hi Everyone,
Could someone kindly help me understand how to run a simple script from Home Assistant using an HTTP command?
I am attempting to remap the Netflix button on my Nvidia Shield remote with an Android Remapper application.
I would like the remapper application to execute an HTTP command that would simply run a Home Assistant script.
Considering the advancements in Home Assistant over the years, I was hoping this would be easier to achieve?
Coming from Hubitat, running an automation via an HTTP command was a breeze. Given that Home Assistant is more advanced, I thought this would be easy.
Responses I’ve Received so far (Thanks to those who have tried to help):
Use Webhooks and Run Directly via HTTP
-Result: Doesn’t work from the browser.
Use the Curl Command
-Result: Also doesn’t work from the browser.
Create some sort of HTML Button
-Result: Doesn’t work with 3rd party applications.
Is this all that is available? Surely, I can’t be the only person requesting this.
Recap - I would like to be able to run a script via an HTTP command directly from a web browser.
For example within Google Chrome-> http://192.168.0.1:8123/api/my_script
Should I submit a feature request to the Home Assistant team?
It works if you add ‘GET’ as an allowed method. That is what your browser uses when you go to a page by default. ‘PUT’ and ‘POST’ requests are used when sending a form for example.
Can I just confirm. If the URL is known, and you’re HA instance is accessible from the internet, that you could run commands via a webhook that required no authorisation method ?
You could use security by obscurity (not great) if you make the webhook a long random set of characters. e.g. 2x UUIDs 38057a79-42c3-4b3f-aafc-cb551ae39a37-12e3f5a3-e1ae-4fda-93d6-57ddd3be2795