Homey CLI run with Docker host networking

I’m trying to run an app locally during development, and suspect that it’s failing to enumerate devices in my network because it’s failing to do UDP multicast.

It looks like the homey app run command runs the app with bridge networking. Is there a way to tell homey-cli to use host networking (besides trying to manually replicate the docker run command)?

If it’s a HP2023 then you can use:
homey run --remote
It will then run on the Homey like the old Homey used to.

Good idea. I tried that, but then the app still has issues resolving IPs, so perhaps it’s not the multicast. Just thought I’d try to reproduce with host networking locally to see if that helped.

Actually, now it works with -r so I guess the lack of. multicast was the issue. Would be nice if homey cli had the option to run with host networking for these use-cases.

You can always modify your local version of homey so that it does.

True, I didn’t realize it was open source, but I can just patch GitHub - athombv/node-homey: Homey Command-Line Interface (CLI)

Resolving the docker run command via docker inspect \ --format "$(curl -s https://gist.githubusercontent.com/efrecon/8ce9c75d518b6eb863f667442d7bc679/raw/run.tpl)" \ container name
did not work, probably because home-cli also sets up a web socket to the homey or things like that (?)

Yes, it does quite a lot before starting the container. The quickest solution would be to modify the options in App.js.

Okey, that wasn’t too hard:

Unfortunately it didn’t solve my problem with failing to do UDP multicast

After setting up Colima with socket_vmnet networking, following these links:

I was able to get UDP multicast working, with the added --network host option to homey CLI added here:

1 Like