Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autodiscovery #7

Open
VincentGijsen opened this issue Apr 22, 2015 · 6 comments
Open

autodiscovery #7

VincentGijsen opened this issue Apr 22, 2015 · 6 comments

Comments

@VincentGijsen
Copy link

Are you sure this is correct in you auto discovery:

line 14, port 1901, SSDP is about port 1900, ..?

@SteveyO
Copy link
Owner

SteveyO commented Apr 23, 2015

Hi Vincent,
Not sure to be honest as UPNP is not my strong point. I just remember it worked (with the hue Java SDK at least) so I left it at that.
I will investigate over the next few days to and try and get this cleared up. Have you tried it with 1900 with existing hue apps?
Steve

@VincentGijsen
Copy link
Author

Well,

I'm working on a nodejs version which used to function with standard Ssdp stuff including port 1900, but encounter sudden issues.. Not sure whether it's my wifi, updates from Phillips to the apps, updates from apple, or otherwise... Still trying to figure it out..

Will let you know when I've resolved the issue.

It's unfortunate that I don't possess real capture of the Ssdp packet and description.xml from a proper hue bridge

Met vriendelijke groet,

Vincent Gijsen
(Send from a phone)

On 23 Apr 2015, at 10:09, Steve [email protected] wrote:

Hi Vincent,
Not sure to be honest as UPNP is not my strong point. I just remember it worked (with the hue Java SDK at least) so I left it at that.
I will investigate over the next few days to and try and get this cleared up. Have you tried it with 1900 with existing hue apps?
Steve


Reply to this email directly or view it on GitHub.

@SteveyO
Copy link
Owner

SteveyO commented Apr 24, 2015

Hi Vincent,

The description.xml from a proper bridge is documented on the developers portal:
http://www.developers.meethue.com/documentation/hue-bridge-discovery (Login/Registration is required).

I did toy with the idea of including it in the emulator at one point, but I wasn't sure if it would add much value (and in any case I seem to recall it was pretty hard to do).

The bridge M-SEARCH result is pretty much the same as in the UPNPServer.java (line 41)
https://github.com/SteveyO/Hue-Emulator/blob/master/src/com/hueemulator/server/UPNPServer.java

Hope this helps.
Steve

@VincentGijsen
Copy link
Author

hi steve,

thanks for the reply,

still haven't figured out why it wont work, but everywhere is reed, it port 1900

https://raw.githubusercontent.com/Burgestrand/hue-api/master/content/api/discovery.md
ssdp-standard (also 1900).

the strange thing is, I receive the M-search messages from my phone, and reply to them, but the app doesn't respond...

@VincentGijsen
Copy link
Author

Hi Steve,

just to confirm, i've got my auto discovery working, port 1900


var NetworkAddress = require('network-address')

var Server = require('node-ssdp').Server;


var config = {}


config.location = "http://" +NetworkAddress()+ ":80/description.xml"

config.ssdpSig = "FreeRTOS/6.0.5, UPnP/1.0, IpBridge/0.1"
config.udn = "uuid:2f402f80-da50-11e1-9b23-001988102201"
console.log("autodiscovery config: ", config)

var SSDP = require('node-ssdp').Server
  , server = new SSDP(config);
server.addUSN('upnp:rootdevice');


server.start();

process.on('exit', function(){
      server.stop() // advertise shutting down and stop listening
});


module.exports = {};

@bwssytems
Copy link

Hello Steve,

I submitted a pull request with some code to help autodiscovery. check it out.

[Edit]

Also it looks as issue 13 is related to autodiscovery.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants