fauxmo icon indicating copy to clipboard operation
fauxmo copied to clipboard

Specifying port numbers?

Open neonpolaris opened this issue 9 years ago • 3 comments

The readme encourages specifying fixed port numbers, but gives no indication of how to do that.

This section: for one_faux in FAUXMOS: if len(one_faux) == 2: # a fixed port wasn't specified, use a dynamic one one_faux.append(0) seems to suggest adding a field like this: ['nameHere', rest_api_handler('http://addressHere', 'http://addressHere'), 'portHere'], but this just throws errors and doesn't run.

Can someone help me out here (and perhaps update the readme for others)?

neonpolaris avatar Sep 28 '15 02:09 neonpolaris

@neonpolaris I'm working on a PR that will replace the lists that define devices with dictionaries that should make things much more concise in code.

I.E. {"name": "herp derp", "handler": rest_api_handler(...), "port": 1234}

DoWhileGeek avatar Dec 02 '15 21:12 DoWhileGeek

When I tried adding the port number like the first mention, the last part of the error I got was "TypeError: an integer is required"

I removed the quotes and it worked fine.

charlesshoults avatar Dec 10 '15 05:12 charlesshoults

Yea, I'd rather be lazy and complain, than trying to massage values and not always succeeding.

DoWhileGeek avatar Dec 10 '15 05:12 DoWhileGeek