mirror of
https://github.com/mtan93/homebridge.git
synced 2026-04-28 22:06:07 +01:00
adding resolver chain workaround for raspberry pi
adding the workaround from https://github.com/agnat/node_mdns/issues/130 to fix #140
This commit is contained in:
@@ -1,13 +1,19 @@
|
|||||||
var types = require("HAP-NodeJS/accessories/types.js");
|
var types = require("HAP-NodeJS/accessories/types.js");
|
||||||
var Yamaha = require('yamaha-nodejs');
|
var Yamaha = require('yamaha-nodejs');
|
||||||
var mdns = require('mdns');
|
var mdns = require('mdns');
|
||||||
|
//workaround for raspberry pi
|
||||||
|
var sequence = [
|
||||||
|
mdns.rst.DNSServiceResolve(),
|
||||||
|
'DNSServiceGetAddrInfo' in mdns.dns_sd ? mdns.rst.DNSServiceGetAddrInfo() : mdns.rst.getaddrinfo({families:[4]}),
|
||||||
|
mdns.rst.makeAddressesUnique()
|
||||||
|
];
|
||||||
|
|
||||||
function YamahaAVRPlatform(log, config){
|
function YamahaAVRPlatform(log, config){
|
||||||
this.log = log;
|
this.log = log;
|
||||||
this.config = config;
|
this.config = config;
|
||||||
this.playVolume = config["play_volume"];
|
this.playVolume = config["play_volume"];
|
||||||
this.setMainInputTo = config["setMainInputTo"];
|
this.setMainInputTo = config["setMainInputTo"];
|
||||||
this.browser = mdns.createBrowser(mdns.tcp('http'));
|
this.browser = mdns.createBrowser(mdns.tcp('http'), {resolverSequence: sequence});
|
||||||
}
|
}
|
||||||
|
|
||||||
YamahaAVRPlatform.prototype = {
|
YamahaAVRPlatform.prototype = {
|
||||||
|
|||||||
Reference in New Issue
Block a user