openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.7k forks source link

milight binding: port not configurable #2016

Closed Human closed 9 years ago

Human commented 9 years ago

Observed with 1.6.1.

As per the wiki, the milight binding is supposed to use the port specified by an entry in openhab.cfg, e.g.

milight:bridge1.port=8899

However, after several attempts to restart openHAB and adding trace output for the milight binding, it always uses the default port of 50000:

2015-01-20 23:04:28.623 [DEBUG] [.o.b.m.internal.MilightBinding] - Sent packet '41:00:55' to bridge 'bridge1' (milight.igo:50000)

My WiFi Bridge Controller Hub defaulted to port 8899, and the only way I got the binding to work was by configuring the Hub to use port 50000.

hmerk commented 9 years ago

This is strage as other users have no problem using port 8899. Please post you openhab.cfg settings completely.

Best Hans-Jörg

Human commented 9 years ago

Here are all the lines that aren't blank or comments.

folder:sitemaps=10,sitemap
folder:rules=10,rules
folder:scripts=10,script
folder:persistence=10,persist
security:option=EXTERNAL
security:netmask=192.168.0.0/24
persistence:default=rrd4j
chart:provider=default
logging:pattern=%date{ISO8601} - %-25logger: %msg%n
ntp:hostname=ptbtime1.ptb.de
hue:secret=openHABRuntime
milight:bridge1.host=milight.igo
milight:bridge1.port=8899
zwave:port = /dev/ttyUSB0
tcp:refreshinterval=250
tivo:host=tivo.igo
mqtt:openhab.url=tcp://localhost:1883
yamahareceiver:tvroom.host=192.168.0.172
astro:latitude=40.177566
astro:longitude=-77.077755
astro:interval=60
astro:systemTimezone=EST```
Human commented 9 years ago

Habmin also indicates that the binding is configured to use port 8899, but the binding keeps using port 50000.

hmerk commented 9 years ago

Hi, @Human , your openhab.cfg shows that you are using a hostname (milight.igo) instead of ip-address. Please change to IP and try again.

Best Hans-Jörg

Human commented 9 years ago

@hmerk I can do that, but the binding currently has no issues getting to my milight bridge by hostname. The binding works for me as long as I reconfigure the bridge to listen on port 50000. Is there an issue preventing the binding from using the configured port if the host is not an IP address?

Human commented 9 years ago

This is mysterious. I restarted openHAB today after changing a rule (unrelated to milights), and now the binding is using port 8899. I changed nothing else, and it isn't the first time I restarted openHAB. In any case, unless I can re-produce the error, there's no point keeping this open. Thanks to all who offered help!