Closed biogerm closed 7 years ago
This has to do with the system's DNS service. What platform are you running on, and if it's linux, what mDNS service are you using? (avahi?)
I found this: https://github.com/agnat/node_mdns/issues/130
@Bluebie I'm running it on a rpi, yes it's running on jessie. Any ideas how to solve the issue?
It's an issue with the raspberry pi platform and debian's IPv6/DNS/mDNS stack on that platform. the issue i linked has more information. You can work around the issue by breaking the IPv6 support in the homebridge-miio library or the mdns npm library in these ways. I'm not sure hacky work arounds like this belong in a crossplatform library. Really, Debian should fix this.
maybe the support is already there. I will try the work around first to see if it can fix the problem. Otherwise i will make the respbian is up to date and see if the issue is gone...
the only thing i know for now is only apply the workaround to miio is not enough :)
giving this: Error: dns service error: unknown at MDNSService.on_resolver_done (/usr/lib/node_modules/homebridge-miio/node_modules/mdns/lib/resolver_sequence_tasks.js:19:30) at SocketWatcher.MDNSService.self.watcher.callback (/usr/lib/node_modules/homebridge-miio/node_modules/mdns/lib/mdns_service.js:18:40)
somehow i can't make it go any further than this error...
@biogerm @Bluebie i migrated to Pi tonight, and i came across similar issue.
events.js:163
throw er; // Unhandled 'error' event
^
Error: getaddrinfo -3008
at errnoException (/usr/local/lib/node_modules/homebridge-miio/node_modules/mdns/lib/resolver_sequence_tasks.js:199:11)
at getaddrinfo_complete (/usr/local/lib/node_modules/homebridge-miio/node_modules/mdns/lib/resolver_sequence_tasks.js:112:10)
at GetAddrInfoReqWrap.oncomplete (/usr/local/lib/node_modules/homebridge-miio/node_modules/mdns/lib/resolver_sequence_tasks.js:120:9)
this should be resolved by version 0.2.0 which no longer uses mdns at all.
yes, all good on pi too! same error log for unsupported devices but it all works good.
@Bluebie @astrojetson8 wow....it worked....
and it works for both v1 and v2 plugs
@Bluebie Thanks. This plugin works well with v1 plug. not with power strip at moment. Let me know if you need a sample to work on.
BTW, will it help, if you have a chance to look at HomeKit plugin for Xiaomi-Router? I had clone 0.3 files few months ago, it looks like very like homebridge. However I am not a programer, not 100% sure.
It couldn't hurt, but i doubt it would have anything useful in it.
Big thanks @Bluebie
@Bluebie 1.1.3 HomeKit for Xiaomi router zip can be download from here.
Hi,
I'm new to your miio project. Just installed it through npm and it crashes every time. Log is here:
events.js:160 throw er; // Unhandled 'error' event ^
Error: getaddrinfo -3008 at errnoException (/usr/lib/node_modules/homebridge-miio/node_modules/mdns/lib/resolver_sequence_tasks.js:199:11) at getaddrinfo_complete (/usr/lib/node_modules/homebridge-miio/node_modules/mdns/lib/resolver_sequence_tasks.js:112:10) at GetAddrInfoReqWrap.oncomplete (/usr/lib/node_modules/homebridge-miio/node_modules/mdns/lib/resolver_sequence_tasks.js:120:9)
BR Ryan