julianh2o / RokuAlexaLambdaSkill

An Alexa Skill that allows voice control of your Roku
MIT License
104 stars 55 forks source link

SSDP Incorrectly Identifies Hue Bridge as Roku Device #7

Closed spreadred closed 7 years ago

spreadred commented 7 years ago

When allowing SSDP to search for Rokus on my network, it incorrectly identifies my Philips Hue Bridge (Generation 1) as a Roku device.

julianh2o commented 7 years ago

Hmm, interesting. I wonder if node-ssdp isn't correctly filtering for the "roku:ecp" identifier or if possibly the hub is responding incorrectly to the broadcast.

I don't have the time to investigate right now, but if you come up with a solution submit a PR and I'll merge it in.

mikehobi commented 7 years ago

I have this same issue. I ended up adding an extra check to the ssdp response call.

//handle the ssdp response when the roku is found
ssdp.on('response', function (headers, statusCode, rinfo) {
    if ( headers.ST === 'roku:ecp' ) {
        rokuAddress = headers.LOCATION;
        console.log("Found Roku: ", rokuAddress);
    }
});

It's a little redundant, but the ssdp.search() doesn't appear to be reliable.

julianh2o commented 7 years ago

Hey @mikehobi, that looks good! Would you mind submitting a pull request for that change?

spreadred commented 7 years ago

Thanks @mikehobi

mikehobi commented 7 years ago

No problem!