Why doesn’t the Smartthings hub answer SSDP M-SEARCH ?
The Hub is not a UPnP device.
Note: I’m not a ST developer or affiliated with ST.
I’m just guessing here, but given that the hub itself is not a UPnP target, why would it respond to M-SEARCH? Also, given the potential flood issues with M-SEACH, I’m guessing they didn’t include it because of those reasons.
What would be the benefit of the hub responding to a M-SEARCH request be?
As SmartApps etc utilizes SSDP, I thought it would support the protocol.
I have written several Windows apps that emulate devices and I wanted to have the device register with the hub, to do that it needed to find it.
I’ll just work the other way, same as normal devices and answer the SSDP requests from the cloud/hub during the find/registration of devices.
Ahhhh, I see what you mean. Honestly, in all my years dealing with UPnP devices and services, I’ve never seen a non-target implement M-SEARCH.
I like the idea of Windows apps as devices though… Care to share what the emulated devices are doing and such?
Started with Arduinos, coded to make them devices (relays etc) moved to Windows using processing to control the Arduino, then wrote some remote button controllers to communicate with Smartthings.
Not to be picky, but in WiFi, the hub acts as a simple bridge where HTTP commands are passed to/from the SmartThings Cloud. Therefore the Hub does not implement M-SEARCH.
I think we are kind of saying the same thing? The hub isn’t a UPnP target.
Yeah?
import hypermedia.net.*;
UDP udpTXR; // define the UDP object
String multicastIP = “239.255.255.250”; // multicast address 239.255.255.250
int remotePort = 1900; // the destination port
String buffer;
void setup() {
udpTXR = new UDP(this, remotePort, multicastIP);
udpTXR.loopback( false ); // turn off loopback
udpTXR.listen( true );
}
void draw() {
}
void receive( byte[] data, String sendIP, int portRX ) {
//println(“Received from:”+sendIP+":"+portRX);
String buffer = new String(data);
println(trim(buffer));
println();
}