eliotstocker / Light-Controller

To Control lights from companys such as limitless LED etc
http://eliotstocker.github.io/Light-Controller/
62 stars 24 forks source link

cannot use DNS hostname to specifiy bridge IP #40

Closed kfix closed 9 years ago

kfix commented 9 years ago

On my local LAN, i use openwrt on my router. Its built in control panel LuCI lets you define dynamic hostnames for any DHCP clients. I have my milight bridge MAC associated to "led.phx1.domain.TLD". Openwrt's dns+dhcp server (dnsmasq) allocates any free IP address to this MAC's hostname so the user doesn't have micromanage their LAN's addressing.

Putting a hostname like that into light-controller gets a rejected IP alert. Could this field be changed to resolve hostnames?

On my LAN, the IP for this hostname never fluxes, so it could be cached beyond its TTL, but if using a hostname provided by dyndns.org (or similar) for out-of-house remote control, the cached lookup would have to be aggressively re-validated. I guess #7 is related to this, but I only saw IPs mentioned.

dudeofawesome commented 9 years ago

Android uses google's DNS by default, and doesn't use the router's DNS as a backup, so hostnames do not work. To fix this, you can go in to wifi settings on your device and specify that it should use the router's DNS as the secondary DNS.

On Sun, Apr 26, 2015 at 9:22 AM Joey Korkames notifications@github.com wrote:

On my local LAN, i use openwrt on my router. Its built in control panel LuCI lets you define dynamic hostnames for any DHCP clients. I have my milight bridge MAC associated to "led.phx1.domain.TLD". Openwrt's dns+dhcp server (dnsmasq) allocates any free IP address to this MAC's hostname so the user doesn't have micromanage their LAN's addressing.

Putting a hostname like that into light-controller gets a rejected IP alert. Could this field be changed to resolve hostnames?

On my LAN, the IP for this hostname never fluxes, so it could be cached beyond its TTL, but if using a hostname provided by dyndns.org (or similar) for out-of-house remote control, the cached lookup would have to be aggressively re-validated. I guess #7 https://github.com/eliotstocker/Light-Controller/issues/7 is related to this, but I only saw IPs mentioned.

— Reply to this email directly or view it on GitHub https://github.com/eliotstocker/Light-Controller/issues/40.

kfix commented 9 years ago

DHCP-issued DNS nameserver addresses have automagically worked on my tablets since KitKat 4.4. web browsers and other apps accept my local hostnames. there's no menu option to override it in settings in Lollipop either. anyhow, Light-controller's config page says "IP address", not "IP address / Hostname"

kfix commented 9 years ago

GAH, i see there's a beta build with hostname support. I'll give it a try...