Migration from Blynk to ESP Rainmaker
I was pretty impressed with the ESP Rainmaker platform, which includes the SDK, Mobile App, and Rainmaker Cloud.
There is one aspect of every IoT project that is common: connectivity. It is true that applications may vary widely (logging, lighting, motor control, etc.), but at the end of the day, your IoT node must communicate with the user and must receive commands as well. This is accomplished using a standard protocol and procedure, usually MQTT and HTTP. In the past, this might have been easy enough, but today you must ensure that your data is securely stored and collected. This requires the use of certificates and the provisioning of secure and privacy-focused services.
It could be said that every IoT project can be divided into two parts: the application and the connectivity. ESP-Rainmaker was specifically developed by Espressif to simplify and speed up the development of connectivity, which has resulted in a substantial reduction in the time it takes for the development.
Rainmaker consists of three main components, IoT Node ( ESP family microcontrollers), Server service hosted on Rainmaker cloud, and a client( a Mobile app, or RestAPI).
About two years back I had done my home automation work using ESP32, Blynk, and AWS IoT. I had to separately code for supporting Alexa skills with my home automation work, besides it was relatively more complex to build this system that could work 24x7.
I had described my earlier work in the following link. In this article, I would like to discuss some key advantages of ESP Rainmaker.
RainMaker takes away the complexity and cost for the developer and makes it much more reliable and quicker to complete your product development for IoT devices. ESP RainMaker allows a user to control a node remotely over the Internet, quite similar to Blynk.
Rainmaker is also available as a paid version for enterprises on AWS, however since I have a limited number of devices I have used the Rainmaker cloud which is free.
Here is the code snippet for device creation using Arduino IDE. This IoT application can control a hot water Geyser, using Rainmaker. I have also used a current sensor ( ACS 712) to detect power failures before switching on the geyser. The complete code is available on GitHub.
Node my_node;
my_node = RMaker.initNode("ESP RainMaker Geyser2");
my_device.addNameParam();
my_device.addPowerParam(DEFAULT_POWER_MODE);
my_device.assignPrimaryParam(my_device.getParamByName(ESP_RMAKER_DEF_POWER_NAME));
no_Power.addUIType(ESP_RMAKER_UI_TEXT);
my_device.addParam(no_Power);
//Create and add a custom level parameter
Param level_paramD("Duration", "custom.param.level", value(DEFAULT_DURATION_LEVEL), PROP_FLAG_READ | PROP_FLAG_WRITE);
level_paramD.addBounds(value(0), value(30), value(1));
level_paramD.addUIType(ESP_RMAKER_UI_SLIDER);
my_device.addParam(level_paramD);
// add another parameter for time remaining
time_paramR.addUIType(ESP_RMAKER_UI_TEXT);
my_device.addParam(time_paramR);
Here is the sequence diagram that describes Rainmaker, node and client interactions.
You may use Arduino IDE which supports 4.2 version of ESP-IDF or directly use ESP-IDF 5.0 to get additional features of Rainmaker.
Here are some key advantages I experienced with ESP32 Rainmaker.
- The mobile app integration is very easy and simple. It provides advanced features such as Scenes and device automation. Using device automation you may trigger another device when a specific event occurs, such as when the temperature sensor reports low temperature, Geyser duration could be increased automatically. Scenes can be used to trigger multiple devices for specific event occurrences, for example when it gets dark all the Garden lights can be switched on.
- The ESP microcontroller coding is simplified and abstract, with all complexity of handling MQTT messages, device registration, communication etc.
- The device registration process, and provisioning with the cloud and mobile app is done using a one-time QR code scanning with Bluetooth, which makes it extremely easy.
- Provides inbuilt OTA support, timezone support etc.
- Earlier I had to write code in Blynk for scheduling and automation, such as scheduling my garden lights to switch on at 6PM and switch off at 10PM, this can be done on Rainmaker app without any coding requirements.
- If you use ESP-IDF 5.0, you also get new features such as ESP-insights which provides analytics of all your nodes and a graphical view of usage on RainMaker cloud.
- RainMaker app also allows easy linking with your Alexa or Google Home app, without any need for additional coding.
- Overall the network connectivity to Rainmaker cloud is much more reliable and stable as compared to Blynk, I have not experienced any disconnections so far from the nodes.
- Device nodes receive callback events when we turn on a device or perform other actions, which makes it much easier to program.
- There is support for custom devices, which makes it easier to customize based on your requirements, besides there is RestAPI support to create your own client.
Overall I felt Rainmaker is a good offering, but there are some minor issues that I believe would get sorted with time.
Moreover, Espressif Systems has been pretty quick in responding back to queries and issues raised on GitHub.
Recently Espressif Systems has also launched, Matter SDK.
Matter is an industry-unifying standard that provides reliable and secure connectivity for smart-home devices.
It is an IP-based connectivity protocol that works on Wi-Fi, Ethernet, and Thread (over 802.15.4 radio) transports with Bluetooth LE being used for commissioning. All industry leaders were involved in the development of the Matter standard, which was developed by the Connectivity Standards Alliance.