n8henrie/fauxmo

Auto port

Nickduino opened this issue · 1 comments

I know I'm not using the template but I don't think it applies here.

Under DEVICES it is a good idea to set a fixed, high, free port for each device, but if you don't set one, Fauxmo will try to pick a reasonable port automatically (though it will change for each run).

Am I right in understanding that it will then break the Alexa link and need a new discovery?

I'm asking because I will be creating an a number a fauxmo devices with a script of mine and it would make easier to not define the port. But if it breaks the link (or worse make Alexa think she's activating a device when another is responding) every time I launch the script, that's not gonna work.

This is more a general Echo question than something specific to Fauxmo, but as far as I know you are correct -- a changing port will likely require a new discovery.

I think having a explicitly fixed port is the only reasonable solution. The current automatic port selection may be helpful in finding a reasonable port to use, but is likely not useful for day-to-day usage.

I could potentially use some kind of hash of the device name to determine a semi-fixed port automatically, but this would still require re-discovery any time device name changed (which would change the port), and potentially lead to difficult bugs with port clashes with other programs.

Going ahead and closing the issue as it seems to be more of a question.