Wemo Handler

In the Wemo Handler I don’t see them specifying the port and ip of the switches and adapters to send commands to, how I they handling it or what does the LOCATION in the configuration.get(LOCATION) represent because I don’t see it specified in the thing xml file.

Hi,
LOCATION is part of the discovery result and contains IP-Address and port of a certain WeMo device.
For Reference : WemoDiscoveryService.java, line 198 and following.

Thanks. Is it possible to use TCP for discovery as WEMO did and UDP for the handler.

Don’t think that’s possible but anyway, there is no need for it.
With pull request 721 at eclipse smarthome, discovery will change to JUPnP. Any other calls are based on HTTP, which is normal for UPnP.

Meaning once the device is discovered, the communication becomes kind of REST.
I am just following the discovery service to implement one for by binding. SO does it mean the WEMO discovery (the one I took a snapshot of) does not work.

Don’t understand what you mean with "communication will become some kind of REST.

The discovery service works, but it needs to “block” a port, so in some circumstances you might see errors.
As UPnP discovery is based on SSDP, I don’t think that TCP will work.

What Kind of devices are you developing a binding for ?

Its is actually a final year project, some sort of smart adapter just like the Wemo. So what is the mode of communication between the wemo devices and the binding. Is it SOAP

So if the discovery is based on SSDP, I can go ahead and use UDP for the handler ??
If I may ask which port does is it block ?
And how can I fix it.

As I don’t know anything about your devices, I cannot comment wether you can use UDP or not. It depends on what your devices “speak”.
You van usey any protocol if you know how to write the needed code.

I am using UDP, I just want to find out if my devices are using UDP the discovery can be based on SSDP

Please, what do you mean it needs to “block a port” and does it affect performance.

Well, that’s quite easy. If you implement a discovery service which sends out messages (SSDP) on a specific port (e.g. 1900), you also have to implement a “listener” for the received answers, e.g. on Port 1901.
While the listener is running, no other task/thread could use that port, which in case of Port 1900/1901 might interfere with the UPnP service.

Ok thank you. My last question here is the case I am using an arduino and I dont have an xml containing informations like UUID, friendly name and co like in the case of WEMO. The only unique thing is the MAC address. What do you suggest.

Sorry, but I can’t really help you, as I don’t know what information your arduino’s provide.
If you also develop the software for your arduino’s (that’s what I understood from your previous messages), why don’t you implement a discovery service (ability to be discovered) for these devices too?

It is just MAC address