The Archer Cloud provides you an easy and fast way to visualize and even control your Arduino projects over the internet with individual UI graphics based on SVG.
The Arduino client library is designed to give you a comfortable way in making Archer Cloud panels usable for your Arduino projects. If you don't have enough knowledge about the concepts of the Archer platform, please read the basic instructions first. Archer Documentation
You can view and download the source code form https://github.com/byteAgenten/ArduinoArcherPanelClient.
Please have a look at our elevator example project that simulates an elevator control by using Arduino and an Archer Cloud panel.
All code snippets below are based on the usage of the following libraries. The Arduino Client library has no direct dependencies to other Arduino libraries.
|WiFi101||Connecting to wireless lan||https://github.com/arduino-libraries/WiFi101|
|WebSocketClient||Establish websocket connections||https://github.com/arduino-libraries/ArduinoHttpClient|
Other third party libraries
You should also be able to use other third party libraries, for connecting to the internet and establish websocket connections. But we only tried it with the two above.
Please mind that the used WebSocketClient library is not able to establish secured websocket connections. As of today we have not found any third party websocket library that is able to use secured websocket connections. Therefore we provide an additional websocket endpoint that is not encrypted by SSL. It is your own risk to use this endpoint! For a more secure setup you could use a proxy within your local network. The proxy can then forward the unsecured websocket connection via a secured connection.
Available archer panel websocket endpoints:
|For Arduino ( unsecure!)|
Connect to the Archer Cloud
Generic function for sending commands
Authenticate for Archer Cloud panel
For sending variable values to the Archer Cloud panel and receiving events from the panel you need to authenticate. Please read Archer Panels for more information.
Generic function for reading events
Handle events according to type
Handle authentication response
Once you have sent an authentication command you will receive an authentication response that contains information whether the authentication was successful.
Send variable value
Observing Archer Cloud panels
If you want to receive events from an Archer Cloud panel, you first have to send an observe panel command. The command has to contain a list of IDs from all panels you want to get events from.
Handling click events from the Archer Cloud panel
If you receive an Archer Cloud panel click event, you can use the elementId property of the event to handle specific to the clicked element.