O'Reilly logo

Mastering Internet of Things by Peter Waher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Registering our devices

Before we create a controller, we need to update our sensor and actuator projects. They need to search their brokers for available thing registries and register themselves with them. Since the process is the same for both the sensor and the actuator, only changes to the sensor project will be presented here.

A thing registry client is made available in the Waher.Networking.Provisioning NuGet (or the Waher.Networking.Provisioning.UWP NuGet). It ties into the other XMPP libraries presented so far. We begin by defining a variable for it:

private ThingRegistryClient registryClient = null; 

Once the XMPP client establishes a connection, we call a new method called RegisterDevice. We will define this function to be asynchronous: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required