How can I access an HTTP input from NodeRed via nabucasa?

I am exposing my scenes via Node Red HTTP in. In other words for every scene I have I create a NodeRed HTTP in that calls the scene when the URL gets hit. This works well from my local home network. I’m trying to figure out how to get to those NodeRed HTTP urls from outside my home network. I’m using nabucasa to expose my remote HA instance, but I can’t figure out how to setup the URL.

My internal URL would look like: http://home.assistant.local:1880/endpoint/scene/bedtime, for example. I can hit this with my phone, a browser or any other HTTP-capable device as long as I’m on my home network.

Does anyone have any idea what the equivalent URL would be when routing through nabucasa? I’ve tried thing like:

  1. https://nabucasa.address:1880/endpoint/scene/bedtime
  2. http://nabucasa.address:1880/endpoint/scene/bedtime
  3. etc

I’m stuck here. Can anyone point me in the right direction? Is this even possible?

Thanks.

If NR isn’t exposed to the internet, I suggest using nabucasa webhooks. There is a webhook node in the node-red-contrib-home-assistant-websocket palette which lets you create one. The only problem is that you can’t execute it directly from a browser, as Browsers are using GET method and a webhook needs a POST request. What do you need it for?

This doesn’t work because you can’t expose ports through nabucasa

By writing this I remembered the RESTful sensor which accepts GET requests. I haven’t tested it, but it’s worth a try.

1 Like