HTTP Input Node Red

Hey everyone, this is probably an easy answer that I’m just missing. I have Hass.io setup on my raspberry pi, and I want to be able to send a simple get HTTP request to HA in order to trigger an automation. I’m using Node-red for all of my automations and have setup the HTTP input node, but I can’t seem to figure out the URL that I need to send my request to. Any ideas what the base URL path should be? Thanks!

Were you ever able to figure this out? I’m doing the same thing, but can’t seem to figure out what URL to send my POST request to in order to hit that http input node.

Can you please explain? If you are trying to control Home Assistant with Node-Red, you should be using the websocket node red palette.

I’m hoping to be able to send an http request from an external app that will trigger a flow in Node-Red that I have running in Hassio. Thanks!

OK. So the URL is your Node-Red instance.

Perhaps there is a better way to do this. Do you have an example of what you are looking to do?

Sure. I have a streamdeck that allows me to push a button and it will send a GET request to whatever URL I want. I want to be able to push a button and have it trigger a flow in NodeRed.

The URL is that of your node red instance then.

Or you could probably use the restful API in home assistant, create an input Boolean in HA and have your streamdeck make the API call.

I also have a use case where only a GET request will work, when attempting to use node-red, I set the url as /forexample

but when accessing https://nodered.com/forexample it does not work. it just gives a 404.

(replace with my url…)

I just put this out - i control node-red and by extension Home-Assistant via websockets and a streamdeck plugin.

@baldfox - Are you using the node-red addon from frenck? I can’t seem to get my streamdeck to connect to the web socket.

I’m using the node-red add-on from Frenck. Do you have the streamdeck add-on installed?

image

This is an example of an entry on my streamdeck
ws://192.168.2.42:1880/endpoint/streamdeck

Ok great. When you say streamdeck add-on, do you mean the WebSocket Proxy as in the picture you attached or are you talking about a different add-on in Home Assistant? I do have the WebSocket Proxy add-on installed on my streamdeck. I was wondering if I’m having an authentication issue. Are you using ssl in your node-red config?

No SSL, this is my conf… (i wrote a tutorial about it this morning, so ignore the baby steps :))

credential_secret: redacted but something difficult to guess
dark_mode: false
http_node:
username: redacted but same as HA login
password: redacted but same as HA password
http_static:
username: redacted but same as HA login
password: redacted but same as HA password
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem
require_ssl: false
system_packages: []
npm_packages: []
init_commands: []

(by add-on I was referring to the application in my picture above.)

1 Like

Thanks @baldfox… it was due to ssl.

1 Like

Cool. Glad you got it sorted !