fauxmo
fauxmo copied to clipboard
Specifying port numbers?
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 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}
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.
Yea, I'd rather be lazy and complain, than trying to massage values and not always succeeding.