Use this library to connect your Arduino/Genuino to Arduino cloud. To have your configurations ready follow the getting started or go to the cloud dashboard.
The library is based on the Paho Library.
Special thanks to Joël Gähwiler author of arduino-mqtt library for his work on porting the paho library on Arduino.
-
ArduinoCloudThing()
-
void begin(const char* name, const char* username, const char* id, const char* password, Client &client)
-
void addProperty(const char* name, const char* datatype, const char* permission)
Is possible to specify a policy as:
-
ON_CHANGE: the value will be written only if it is changed
-
TIMED: is necessary to specify a lapse (seconds)
-
void addProperty(const char* name, const char* datatype, const char* permission, const char* policy)
-
void addProperty(const char* name, const char* datatype, const char* permission, const char* policy, int lapse)
-
void writeProperty(const char* name, char* value)
-
void writeProperty(const char* name, float value)
-
void writeProperty(const char* name, int value)
-
void writeProperty(const char* name, String value)
-
String readProperty(const char* name)
-
String readProperty(const char* other_device_name, const char* name)
-
R
- The property can be only written from the device -
RW
- The property can be written and from the device and can update the value from other objects
-
TIMED
- Waiting seconds before update a new data -
ON_CHANGE
- Publish value only on change