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

Adding a chat interface

At this point, both our projects have machine interfaces for sensor data readout event subscriptions, and control parameter operations. What we lack is a human interface. As XMPP was built for chat, it would be nice if we could add a chat interface to our devices.

To send a chat message, we can call the SendChatMethod() on our XmppClient object. Messages sent to the client can be received through the OnChatMessage event. All you need to do to provide a custom chat interface is work with these two. There are some interoperability issues you might need to consider, however, relating to sending formatted messages, images, and so on. If you want, you can start with the Waher.Networking.XMPP.Chat[.UWP] NuGet, which integrates ...

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