Local http GET requests possible with new Homey Pro?

I’d like to be able to control some of my local devices using http requests, is it possible to do this if I get a Homey Pro? I know they won’t work with the cloud system but am hoping they should be ok with a Pro device?

hello see if this suits you

thanks, I’m not sure if I understand the app properly - does it allow me to send something like:

https://192.168.1.140/httpapi.asp?command=setPlayerCmd:play:http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_med/ak/bbc_6music.m3u8

locally?

This would send a command to an unsupported music player on my network to start playing a radio station

Why https?

You can do that with webhooks.

Local Webhook:

http://<homey-ip>/webhook?event=my_event&tag=my_tag

Cloud webhook:

https://webhook.homey.app/<homey-cloud-id>/my_event?tag=my_tag

Simply create a flow that triggers when the webhook is called.

Edit: I guess I understood your question wrong. You can easily make GET requests using this Logic card:

in this case, with a simple logic card.

When I try this with Homey cloud it fails as it’s a local IP address so doesn’t work over the external internet.

I wanted to check if doing the same thing off a local Homey Pro would actually work - can we confirm that the pro is able to control a local device over http?

Yes, we can confirm that.

1 Like

Perfect thank you!

This does not seem to be true. I’ve got the Homey Pro 2023 and local requests absolutely do not work whatsoever. Is there something I’m missing? I’ve got a simple Python-based local HTTP server setup to proxy to control some IoT devices which Homey does not natively support. I can in my terminal right now curl a URL which works perfectly but that same URL does not work from my Homey Pro neither in basic or advanced flow. Help? I’m happy to send screenshots, evidence, or whatever needed to help debug this further.

I’ve also tried a “Homeyscript” provided by others and it has a failure… :warning: FetchError: request to http://172.17.183.179:5000/switch_one?state=on failed, reason: connect EHOSTUNREACH 172.17.183.179:5000.

That’s an internal Docker IP address. If you curl it from the same machine that is running the Docker container it might work, but it won’t be accessible from other machines in your network, for that you need to use port mapping.

@robertklep 172.16.0.0 – 172.31.255.255 is validate private IP networking ranges, and I use 172.17.x.x for my network at home. Are you trying to say that the Homey Pro internally uses docker and is internally using that range for something?

Here’s a glance at my Unifi Ubiquiti dashboard of a few of my internal devices on my network to show/highlight/prove that the above address is fully valid and is not virtualized on some docker network. My “Homey Pro” has a 172.17.x.x address also, of course.

I didn’t mean that (I thought that your proxy might be running in a container), but yes, HP internally uses a Docker container to run Homey’s core and apps in, which will probably cause issues with routing (and I can’t even imagine the issues that may result from having the outward-pointing network interface having an address in the same range as the docker network interface…:thinking:).

The EHOSTUNREACH error is a routing error, I get the same if I try to ping the IP address from Homey:

$ ping 172.17.183.179
PING 172.17.183.179 (172.17.183.179) 56(84) bytes of data.
From 172.17.0.1 icmp_seq=1 Destination Host Unreachable

(172.17.0.1 is the Docker “router”)

1 Like

@robertklep So… if I’m understanding you correctly, the only way to solve this problem is to change my network to use a different IP scheme other than 172.17.x.x? Is there any other “reserved” internal IP networks that I can’t use for my network before I make this somewhat significant change in my network here at my home/business?

This would also explain why I can’t seem to connect to some Sonoff Wifi-based devices either. :frowning: Seems like an oversight to hardcode using that IP scheme. Afaik, docker by default when you first install and start it up on a new device detects what networks are in use and uses an IP network that isn’t in-use. Does this on all my computers and servers, but it seems like Homey has this hardcoded

It might be possible to do some trickery with an additional router (which would have a “WAN” address in your existing range, and the “LAN” ports in a safe range and do some sort of address rewriting) but I can’t provide any specifics on how that would work.

Not that I can think of, 10.0.0.0/8 and 192.168.0.0/24 should work fine.

1 Like

Thanks so much for the heads up. To meet my desired needs for automation I’ll explore either a VLAN and dedicated Wireless AP with a 192/10.x subnet and make my IoT-ish devices join that OR I’ll take the leap and change my IP scheme of my entire network. I’ve got my work cut out for me either way. Thanks so much!

Update: Changed my network’s IP CIDR resolved my issues. Was annoying, but worth it! Still have to fix a handful of things inside my network that had static IPs and such, but yep. Thanks RobertKlep

1 Like