We are now ready to create our controller application. This controller application will register itself with any available thing registry published by its broker, using the same method presented earlier. It will then use the same registry to find our sensor and actuator, by searching for the corresponding conceptual identities of both, limited to the same geographical information the controller has. In this way, we can automatically detect devices in our vicinity, regardless of how many instances of the sensor and actuator applications there are registered in the registry.
While we have worked with standalone things (each one identified using a single XMPP address called a JID), generic things on the XMPP network, as registered in a Thing Registry, can be addressed using one, two, three, or four parameters, depending on the size of the host publishing the interface to the thing:
XMPP address of device.
Address of virtual node inside device.