Example demonstrating REST and WebSocket API
There’s a new example showing how to combine the REST and WebSocket API over at the Eclipse Ditto examples repository. Right from the project’s description:
This example shows how to leverage the powers of combining the REST and WebSocket Messages API of Eclipse Ditto. It demonstrates how to send direct Messages to a live Thing, as well as updating the twin representation of a Thing inside Ditto.
The Thing in this case is a smart coffee machine (“SmartCoffee”) that has some basic functionality. It accepts Messages that allow to start or stop the heating of the water tank. Moreover you can request the coffee machine to brew coffee, so you don’t have to wait for your dose of caffeine.
But before starting to brew a coffee, SmartCoffee will send a captcha that has to be solved.
If you have any wishes, improvements, are missing something or just want to get in touch with us, you can use one of our feedback channels.
The Eclipse Ditto team