Update Ubidots Libraries V3.0.0 for ESP8266 modules

We have carried out a large number of integrations and tests with the Ubidots IoT platform, mainly with Espressif ESP8266 Modules.

Ubidots platform IoT

Create Account in Ubidots.com.

In this new tutorial we will test the new version of the Ubidots library for ESP8266 V3.0.0.

ESP8266 integrations with Ubidots

I will list some of our previous tutorials:

 

Library ESP8266 Ubidots on Github

Github Repository: Ubidots-ESP8266

Documentation, requirements, API and functions.

Required Materials

Other Recommended

Available Examples

This update has detailed examples, easily adaptable for any integration.

Test Example ESP8266 HTTP Send

Sending variables using HTTP method using TLS 2.0 secure client for esp8266 with SHA1 fingerprint.

Display of 3 variables in Devices, Ubidots.

 

Test Example ESP8266 TCP Send

Sending of variables using TCP / IP method.

Display of 3 variables in Devices, Ubidots.

Test Example ESP8266 UDP Send

Sending variables to Ubidots using UDP/IP, it could be said that it is very fast but has no validation or security, such as HTTP, and TCP/IP cases, but it certainly works very well.

Display of 3 variables in Devices, Ubidots.

 

Test Example ESP8266 TimeStamp Send

It allows to join a variable (value) with the time stamp in UNIX format, it is very useful in cases of loss of communication to store in our module data with creation / measurement date.

Send stamp in Unix format and Ubidots will register in Datetime.

Note: Take into account GTM and Server Hours.

Test Example ESP8266 Context Send

It allows adding a context or description to our variable.

By registering a new value, we can visualize the context.

 

Test Example ESP8266 HTTP Get

It allows to capture the last value of our variable, registered in Ubidots using HTTP.

We visualize the last value 40.00.

Value printing in Serial terminal.

Test Example ESP8266 TCP Get

It allows to capture the last value of our variable, registered in Ubidots using TCP / IP.

Value printing in Serial terminal.

 

Final test

We have made the integration of 2 examples to allow sending and receiving values between the Ubidots platform and our ESP8266 NodeMCU.

Technically we will send the temperature, using a DS18B20 Onewire sensor, with DFRobot module.

From the Dashboard we will register and control an output that has a Relay Module 3.3v Gravity from DFRobot.

Note: Download the Arduino IDE code at the end of the article.

Device in Ubidots, weather-station-gravity.

Variables created in Ubidots, Temperature and Relay.

Final dashboard.

From our Button we can activate and deactivate our Relay and graph the temperature status, we could also create a control or event in Ubidots.

Video Complete Test

Updates in version 3.0

  • It allows sending in TCP and HTTP using TLS 2.0 for sending data may be a bit slower compared to UDP but it is data secure.
  • The maximum payload length is 700 bytes, higher amounts are not 100% guaranteed
 

Conclusions

The implementation of a secure client with TLS 2.0 is satisfactory, it works very well, more practicality in the constructors and functions.

Downloads

22 Downloads

Leave a Reply