harmonyhubjs-discover
harmonyhubjs-discover copied to clipboard
Port not configurable
It looks like this uses port 5224 when doing the UPnP. Because of this, only a single instance of harmonyhubjs-discover
can be used on a single computer at a time.
I have a project that uses this, harmony-api. Some people use this at the same time as the Homebridge plugin that also uses harmonyhubjs-discover
. When starting one after the other, it breaks, because the port is in use. You can see an issue regarding this here.
If the port was configurable, implementers could pass in a port when starting harmonyhubjs-discover
and multiple instances could be used.
Port 5224
is used to emit the UDP broadcast into the network (https://github.com/swissmanu/harmonyhubjs-discover/blob/master/lib/ping.js#L8). Any Harmony Hub is listening on this port and replies to the port configured via the Explorer
s parameter (https://github.com/swissmanu/harmonyhubjs-discover/blob/master/lib/explorer.js#L57)
On https://github.com/swissmanu/harmonyhubjs-discover/blob/master/lib/ping.js#L15, I implemented a bind
on the socket once. I am not sure why binding the socket is necessary at all... I try to look into and get rid of this, because this would totally solve the problem.
harmony-api
looks cool btw! Glad harmonhubjs-client
finds its way into another project. Would you like to be listed in the ecosystems section of harmonhub-client
s readme?
Thanks for the fast reply. All that makes sense. It'd be great to get it a little more flexible.
harmony-api looks cool btw!
Thanks! All from standing on your shoulders though, heh. Sure, I'd love it to be listed there, thanks.
So is this possible to change the port ad i'm using 1 for homebridge instance and another for harmony-api?