Blynk: easy control of Raspberry and Arduino. Public cloud servers for IoT add-ons Cloud services for arduino hacking

I thought a lot about those, to know an inexpensive solution for connecting and controlling Arduino via the Internet without using any Ethernet screen or navigating any WI-FI module. After further investigation, I have shown that the only way to interact with the Arduino microcontroller is the serial port (serial port), so I created a simple C # add-on like a hub (HUB) for robots with a serial port for editing and receiving data on the board.

This HUB-program is already connected to the Internet through your personal computer and helps to manage and capture data between the microcontroller and the gloomy data base, and save the data itself in the MySQL online database.

I happened to have almost a small butt in front of me, which allows me to protest the stoking of ideas. I didn’t connect any sensor to this butt, I just switched on the Arduino light, so that I could turn on and switch on the light indicator on pin 13, setting the letters “I” and “O” to the serial port.

int input; //Save the input character from the serial port. int led = 13; // Pin 13 // the setup function runs once when you press the drop button or the reset button int state; void setup() ( // initialize the digital LED_BUILTIN as output. Serial.begin(9600); pinMode(led, OUTPUT); // Set pin 13 as digital exit Serial.flush(); ) // loop function repeat and restart void loop() ( // String input = ""; // while (Serial.available() > 0) // ( // input += (char) Serial.read( ); // delay(5); // ) state = digitalRead(led); if (Serial.available()) ( input = Serial.read(); led, !digitalRead(led));digitalWrite(led, HIGH );Serial.println(1);delay(1000); (0); delay(1000); ) else if (input == "T") ( analogRead(led); Serial.println(0);

Krok 2. Creation of online bazi danih

To save data, we can use an "online intermediary" to serve as a bridge between the Arduino board and our HUB add-on. That's why we were taken hosting The data base, as a way to directly save data, remove the Arduino board and send commands to it.

The simplest choice for our mind is bazi danih MySQL, because tse bezkoshtovno and ring out widely vikoristovuєtsya. At the attached archive below, you will reveal that there are only two tables to avenge. save some commands, then send them to the board, and the other table - take it out, pay the Arduino, and inspire for a vague vengeance.

As hosting, you can choose the site freemysqlhosting.net. Online PHP MyAdmin can be found at phpmyadmin.co. More information can be found at phpmyadmin.net.

Krok 3. Creation of C# hub

We will create a hub on the shortest side, which can be seen as an input filter on a PC, so that the data can be transferred first, which should pass through it, then we will send it to the Arduino board through the last port and then on.

The interface of this hub is even simpler, it’s less than two revenges text fields, to show the status of the skin "transaction", transmitting the data of the hub (strength and control).

Note. The hub is responsible for a lot of launches, if you want to work with your Arduino board via the Internet.

Krok 4. We create a web-interface

Let's go to the coolest part of the lesson.

Having created a web add-on based on Asp.net C# technology with an adaptive interface, which can be used on any add-on, this web add-on can only be right with an online database and I don’t know what is on the other side as a fee.

For the help of this interface, you can classify your electronic components connected to Arduino. Clicking the mouse, turning it on and mimicking it, you just collect data online.

butt

Having pressed the green button (ON) at the “Living Room” branch (Hall - more for a little one), you edit the ticket via the Internet and turn up the light at your living room. In this way, the hub, which may be located on the other side of the world, accepts an order and processes it for the help of an electronic lancet based on the Arduino at your booth.

Protected void BtnHallOn_Click(object sender, EventArgs e) ( AddTempOrders("I");

Krok 5. Zavantazhuemo project

The time has come to try everything yourself and build your own project.

I bet you need everything. I wish you wonderful projects!

Vadim Kolesnik, m. Tiraspil

Crying, that simple swidka of rozrobka of all-functional attachments to the Internet of speeches on the Arduino for the help of a gloomy service

Zagalni vіdomostі

myDevices is engaged in retail software and additions to the sphere of the Internet of speech (IoT) and the development of the company Avanquest. myDevices Cayenne is the first drag-and-drop add-on and ugly service for easy distribution of IoT projects on Raspberry Pi.

On the portal Radiolotsman was recently published, in which I tried to reveal the main advantages and system capabilities when working on a Raspberry Pi (RPi) single-board computer. Ale, the Cayenne project is constantly developing, the retailers, rushing to help coristuvachiv, step by step add new functions, use the shortfalls and pardons.

The development of IoT devices on Arduino and Raspberry Pi with Cayenne robots is fundamentally controversial. If you have Raspberry Pi, then you can use the Cayenne platform with a visual middleware: we physically connect different peripherals to the Raspberry Pi board and can only be used in the online Cayenne middle (we have widgets, data processing, we write automation algorithms).

The Arduino attached Cayenne panel (dashboard) is just a set of widgets and control elements, so that they can visualize the data taken from the sensors and transmit the data of the koristuvach to control them and other viconic attachments. Without intermediary robot with sensors, avionic attachments, additional peripherals (for example, a display, another keyboard), the processing of the minds of automation is based on a microcontroller. In other words, everything is reduced to a standard distribution, I will attach it to the Arduino; koristuvach write yourself program code ale with the integration of Cayenne's soft IoT functions into the project. In my own opinion, in my opinion, the main advantage of the Cayenne is: you can connect to the system, be it sensors or other mechanisms, without interfering with a list of peripherals that are supported.

Interface of the coristuvacha and preparatory work

What is needed for the system interface, її improving, control methods and widgets on the accessory panel, everything is filled with similar systems on the Raspberry Pi, obviously, for a few unique elements, the power of the rest (for example, in the distance litter) . To that, for the understanding of the basics of robotics and systems, I recommend that you read these articles. All information in the article is relevant both for the web interface of the system and for the mobile add-on. Also, the article has a list of peripheries that are supported.

For the development of IoT, I will add a program or we need:

  • mothers of their appearance record on the Cayenne service (it is possible to win over);
  • install the integrated Arduino IDE;
  • Upload Cayenne function library to Arduino IDE;
  • Customize the Arduino IDE: select the board and the COM port that is connected as far as possible;
  • Connect the Ethernet Shield or Wi-Fi Shield expansion board to the Arduino (or use the Arduino board with the integration of the network interface).

I think that the process of installing the Arduino IDE middleware, as well as choosing to pay that port, will not require explanation, and we will move on to the main one.

The Cayenne library for Arduino is easy and fast to install with the help of the library manager (Malyunok 2).

After the installation of the library, we can quote it from our appendices, and appear in the distribution of sketches Nova folder s im'yam Cayenne. In my opinion, these butts do not allow to understand more clearly, how to work with the system, prote їх varto vchity, and also, I guess, that there is a great division of documentation on the Cayenne system. A library with a set of sketches has been given to the wild type, which allows you to easily connect and exchange data between sensors / actuators and a gloomy service.

After completing the preparatory operations, setting up the middle of the expansion and connecting the Ethernet Shield expansion board, you can build the IoT expansion of the add-on.

Arduino board connected to USB computer, connected to Ethernet Shield fencing cable local lines. In the Internet browser, you can enter the Cayenne oblique record, and add a new add-on - Arduino - in the checkout panel. Then we choose the type of payment, the way to connect to the Internet (document a lot of options), we respect the unique authorization key for our add-on and check for the connection of the Arduino board to Cayenne (Baby 3).

A new unique key is generated for the skin new attachment, you can find it in the setup of the attachment (pay).

As soon as you choose the way to connect to the device, it will show up at the window with the microcontroller program code. I will build the necessary minimum for connection to a gloomy service. Please note that your authorization key is already indicated in the text of the program and the library is connected, as it confirms the opposite way of connecting to the border (Malyunok 4). Copy this code into the Arduino IDE, compile it and download it from the board. If everything has been set up correctly, then a new active attachment and an accessory panel will appear in the Cayenne carving panel, so you can now add widgets to that carving element. Moreover, at this stage you can remotely control the available digital and analog ports of the Arduino without writing any code - add a widget button on the accessory panel, specify the type of the port (digital), and save the widget. Now, by pressing the button in the browser, you will change the logical standard of the port. So simply, by adding input inputs, you can control PWM outputs, accept “sir” data from Arduino analog inputs, and control digital inputs.

I’ll build a distribution on a specific butt

Now I'll tell you about supplementary ability and system functions. Like a butt I zibrav simple system, to the warehouse if you have received:

  • Arduino Uno board;
  • Ethernet Shield expansion board on WIZnet W5100 controller;
  • Temperature sensor DS18B20;
  • photoresistor;
  • Thermistor;
  • Dekilka svіtlodіodіv;
  • OLED display on controller SSD1306

The principle diagram for connecting sensors and light diodes to Arduino is shown in small 5.

I’ll guess, what are the most power supplies connected from the connections of various sensors and other outbuildings, you can know the details of the distribution of documentation.

I think that the connection of light diodes, a digital temperature sensor and an OLED display to the power supply is not good. Analogue light and temperature sensors are connected to analog inputs behind the resistive dilator circuit. With this for the lance of the thermistor, it is necessary to know more precisely the opir of the resistor R6, the value of the variance should be taken from the output code for the hour of the investigation.

After the connection is indicated on the scheme of elements, we will write an Arduino sketch, and then we will install the necessary widgets on the Cayenne accessory panel. on Narazi In the Arduino board, there is already a minimum sketch and the board is displayed in the Cayenne accessories panel. As I said above, at this stage we can add plug-ins for lighting with LEDs D1, D2, as well as take “sir” data from analog inputs, to which the thermistor and photoresistor are connected (Malyunki 6, 7).

Without writing the right line of Arduino code, we already took away a simple system of remote control and control (Malyunok 8).

Sob zadiyati digital temperature sensors, Thermistor, PWM, for example, for controlling the light diode D2, you need to add a minimal sketch. Libraries are importantly important.

#include< CayenneEthernet.h>// hack the Ethernet Shield expansion board
#include< CayenneTemperature.h>// Functions for converting data from the thermistor
#include< OneWire.h>// Functions for robots with 1-Wire bus
#include< DallasTemperature.h>// Functions for robots with digital temperature sensors
#include< Arduino.h>// standard constants and changing Arduino moves
#include< U8x8lib.h>// library for robots with OLED display in text mode
#include< Wire.h>// Support for hardware interface I 2 C

#define VIRTUAL_PIN_1 V0 // Virtual channel for DS18B20 sensor
#define VIRTUAL_PIN_2 V1 // - for thermistor
#define VIRTUAL_PIN_3 V2 // -- for light diode D2, this channel will receive data about the PWM value
#define LED2_PWM 6 // real Arduino port, to which LED D2 is connected

Virtual channels - tse digital, і analog input / output ports. When reading analog inputs without intermediary, the data is taken from the 10-bit ADC microcontroller. The values ​​that are rotated by the ADC should lie in the range of 0...1023 and the proportional voltage at that input. In other words, if you connect a temperature sensor to the analog input of the Arduino, and do not take away the temperature value, you will need additional processing that mathematical calculation for converting the voltage - temperature.

To simplify the transformation of data, their formatting and processing are recognized as virtual channels. It is necessary to use a hard tool, which is used to exchange between Arduino and Cayenne, as well as for simple formatting of data with the method of visualization on the board. Remember that virtual channels do not change the physical parameters.

Cayenne.virtualWrite(V1, 123) // transmission of integer value by virtual channel V1
Cayenne.virtualWrite(V2, 12.34) // transferring floating point values ​​via virtual channel V2

For example, after reading an analog temperature sensor, it is possible to convert the Celsius degree value in one line of code and transfer the value to the control panel. In addition, virtual channels allow you to implement control of any peripheral connected to analog or digital Arduino ports, without the need to write any additional code. At the moment, two types of data are supported, with which virtual channels are used: integer (integer) and floating point (float). Further plans are being made to support symbolic types and arrays. On the accessory panel, via a virtual channel, you can connect and adjust the type of data that is received, a widget for visualization.

// Digital port, to which DS18B20 sensors are connected. Don't tweak Arduino port 0 and 1 (Rx/Tx).
const int ds18b20_Pin = 2;
// Analog port, which connects the thermistor.
const int thermistorPin = 0;
// Opir of a constant resistor (9 kOhm), in series with a thermistor to ground.
const float resistance = 9000;
// Authorization key Cayenne. You can find it at the Cayenne web interface on the setup tab.
char token = "640c9oedi4";
OneWire oneWire(ds18b20_Pin);
DallasTemperature sensors(&oneWire);
Thermistor thermistor(thermistorPin, resistance);

At your discretion, practically at any stage, you can add exit code viewing tax information on the serial port.

We have the following functions:

void setup()
{
Cayenne.begin(token); // connect to Cayenne with assigned authorization key
sensors.begin(); // initialization of digital temperature sensors
u8x8.begin(); // initialization and visnovok text information on OLED display

u8x8.setPowerSave(0);
u8x8.setFont(u8x8_font_torussansbold8_r);
u8x8.drawString(2,0,"Cayenne Test");
u8x8.drawString(1,2,"System Running");
}

In the main program loop, we will have only one function:

void loop()
{
Cayenne run();
}

The entire exchange of data with the Cayenne accessory panel is counted for a number of additional functions:

CAYENNE_IN(Virtual_Pin) - Specifies the function to be called when you remove data updates via a virtual channel from the Cayenne server.

CAYENNE_OUT(Virtual_Pin) - set the function to call back if it is necessary to send updated data from the attachment to the Cayenne server.

CAYENNE_CONNECTED() - The function will be disabled every time when I connect to the Cayenne. Zagalom, this function has to be played for synchronization.

Cayenne.syncAll() - Function that sends the form to the Cayenne server to synchronize all widgets. The Arduino analog and digital ports will be updated, and the skin virtual channel will generate the CAYENNE_IN sub.

Cayenne.syncVirtual(Virtual_Pin) - synchronization for the specified virtual channel. As a result of the typing, the CAYENNE_IN voucher is called.

My circuit has a D2 light connected to the digital port D6 of the Arduino. This port can have an alternative function - open PWM. For the implementation of remote control with light-emitting diode in the PWM mode, we will need to receive data from the accessory panel. For which we will write a function, which will be used when data is updated on the virtual channel V2:

CAYENNE_IN(V2)
{
// we take data about the PWM value from the accessory panel (slider)
int PWMValue = getValue.asInt(); // range value 0 - 1023
analogWrite(LED2_PWM, PWMValue / 4); // for PWM values ​​can be in the range 0 - 255
}

Now, on the panel of accessories, add the “Slider” widget with the name LED_2 WIM (PWM), and in the settings it is possible to indicate how it works through the virtual channel 2 (Malyunok 9).

Having taken the sketch from the board, you can use the additional slider on the Cayenne accessory panel to adjust the brightness of the D2 light. Everything is smart and simple.

CAYENNE_OUT(V0)
{
sensors.requestTemperatures(); // Data taken from digital temperature sensors.
// Convert data from the thermistor, format it and send it to the server via virtual channel V1
Cayenne.celsiusWrite(V1, thermistor.getCelsius());
//formatting data from a digital temperature sensor and sending it to the server via virtual channel V0
Cayenne.celsiusWrite(V0, sensors.getTempCByIndex(0));
}

Starting the selection of virtual channels, the entire function code for transmitting absolutely different data is composed of two rows. Widgets for the DS18B20 temperature sensor and thermistor are added on the accessory panel (the stench is ready in the control panel). Now we’ve got the widgets, we’ve got the sketch at the board, and you’re done (Malyunki 10a, 10b)!


Baby 10. View of the Cayenne accessory panel for Arduino wiring (temperature sensors,
clarification, lighting with D1 light, PWM lighting with D2 light):

Do not forget that these control functions are available in the mobile add-on. All widgets installed at the web interface, you can use the mobile add-on (Malyunok 10b).

Starry look an extension with a connected periphery is shown in small 11.

Possibility of development of droto-free IoT devices

You could remember that on some screenshots you can see my control panel, for example, Arduino Uno and Raspberry Pi є add-on ESP8266-1. All right, tse addendum on a well-known ESP-12 module (ESP8266), which connects to the Cayenne Wi-Fi server and has its own accessory panel (Malyunki 12a, 12b). Such an attachment is a non-dartless higher education institution for control and management. Two LEDs are connected to the module (one is connected to the ESP8266 PWM output) and a DS18B20 digital temperature sensor.


Baby 12. Attachment panel for a non-rotor attachment on ESP-12 modules:
a) web interface; b) mobile supplement.

The developers of the ESP8266 core upgrade by the Arduino IDE core, the implementation of the IoT-free IoT add-ons in the Cayenne are nothing to do with the Arduino expansion. In other words, whether a module on the ESP8266 chip is an Arduino board with a Wi-Fi interface. For whom WiFi module we write a similar sketch, we write and write libraries for robots with sensors, we have access to digital and analog input/output ports. Behind this module, a large amount of information, various documentation and directions have been accumulated.

The scheme for connecting the periphery to the ESP8266 module is shown in Figure 13. I created an ESP-12 silicon module without a transitional board with an integrated live circuit and a programming interface, which made it easier for the robot at the sketch stage. The best option would be to use a ready-made module like nodeMCU v3, which is similar to the Arduino form factor and has a scheme to please the interface. (An even more important moment is the hour of module programming). The external appearance of the module with connected light diodes and a temperature sensor is shown in small 14.

As for the connection to the Cayenne server and the exchange of data, then everything is like for Arduino. All understanding about virtual channels is taken care of, the functions themselves are won, and the unique authorization key is also won. Vіdminnіst less at the stage of connecting the module to the Internet.

For the connection, I will build on the ESP8266 modules, and it will be similar to adding an Arduino board, and we will reach the stage of connection, I will add it to the Cayenne, where a minimal sketch will be generated.

This sketch needs to be changed. We include the following libraries:

#include "CayenneDefines.h" // Cayenne change constants
#include "BlynkSimpleEsp8266.h" // Functions for working with ESP8266
#include "CayenneWiFiClient.h" // functions for implementing Wi-Fi client

char token = "3yj62u9ogi";
char ssid = "Network_SSID"; // SSID and password for your Wi-Fi network.
char password = "Network_Password";

At the section of initialization, we add a row:

Cayenne.begin(token, ssid, password);

Compiled, invested in the module (takes more than an hour, less invested in the Arduino board), it is worth connecting and activating a new add-on in the Cayenne accessory panel. We gave everything like for Arduino: we add functions for robots with sensors and input / output ports, we add widgets to the accessory panel. It's just amazing, isn't it?!

Visnovok

For the Cayenne robotic bags on the Raspberry Pi and Arduino, I can definitely say that the Raspberry Pi is not a good choice for building Internet of Speech devices, navigate from the Cayenne. What can not be said about Arduino - regardless of the exchange of resources, the availability of rich tasks, the low cost (even if it’s a slow moment, the characteristics of the new Arduino boards on ARM processors), it’s ideal for building simple IoT devices and home automation systems.

In addition, in this context, the main advantage of Arduino, as I respect more, is the possibility of self-development, I will add, develop circuitry, write code, develop programming skills, regardless of the proof of professional programmers, that Arduino cannot learn to program. Possibly, ale ... By the introduction of the Arduino, the Cayenne platform provides only a graphical interface of the core and some information in the processing of data. Reshta you are responsible for developing independently, including the primary processing of these types of sensors, the processing subsystem of the subsystems, as well as the understanding of that automation algorithms. And now give the Arduino the simplicity of building wireless IoT attachments on Wi-Fi modules ESP8266 new chip ESP32, which has a lot of peripherals on board, and before you show great possibilities for the development of fundamentally new attachments, and for the process of not only amateurs, but also professionals.

At the time of preparing the article, Cayenne did not talk about the official upgrade of modules based on the ESP8266 chip. The main merit of this is the merit of all - amateurs and engineers, who can either work on the Arduino IDE and know about the ESP8266 support, with the help of the Cayenne libraries, they could connect the ESP8266 to the ESP8266. Also, visit the Cayenne forums and you can already find out about a large number of different projects of IoT-free IoT add-ons.

After extensive testing of my attachments on Arduino and ESP8266, I can say that the rest is still working stably. The low overhead of the Arduino with the Ethernet Shield is caused by the problem of the W5100 controller freezing, using several methods, both hardware and software. I can admit that there is no need for Arduino boards with Ethernet and Wi-Fi integration.

From the moment of preparing the article on Raspberry Pi and Cayenne, not so rich an hour passed, but there were significantly more new functions and improved peripherals. Examining the presence of a large selection of different expansion boards, sensors and other add-ons, various libraries, projects and applications for Arduino, Cayenne now has available add-ons, LoRa services, libraries for merging protocol MQTT for Arduino, C, C ++, mBed work with MQTT broker mosquito. Definitely, for the development of Internet voices and home automation systems on Arduino, I recommend the Cayenne services.

Programming various microcontrollers and microcomputers, such as Arduino, Raspberry Pi and similar to them, is one of the most important and relevant ones to take. The construction of attachments on these platforms has gone beyond the scope of hobbies and professional programmers: these boards are designed for the creation of robots, versatility, quadrocopters, IoT-applications (smart booths), servers and navigating Hi-Fi audio interfaces.

Unfortunately, the microcontroller market is highly segmented. Your programming is carried out through different media and interfaces. The situation can be vryatuvat project under the name Blynk.

Blynk is a smart service for creating graphical control panels and suitable for a wide range of microcomputers and microcontrollers. There, earlier, for the collection of information from sensors, it was necessary to write a complete input-output interface, or to add additional modules, now you can get by with a five-width robot in Blynk.

To create a successful project with support via Blynk, you need to do a few things: install the program (available versions for iOS and Android) or use a web form. Here you will need registration in one click - entering email and password. Registration is necessary with an eye on those that Blynk is a gloomy decision and without it, control over the upload can be taken away by any kind of coristuvach.

Alternatively, you can install the server locally. At this time, access to the Internet is not needed.

The robot program vimagatime singing beginners. It is necessary to connect a computer or a smartphone from a programmed board. The program supports payments for additional interfaces:

  • USB (Serial)
  • Adafruit CC3000 WiFi,
  • Official Arduino WiFi Shield,
  • Official Ethernet Shield (W5100),
  • ENC28J60,
  • ESP8266 (WiFi modem),
  • SeeedStudio Ethernet Shield V2.0 (W5200),
  • RN-XV WiFi,
  • ESP8266.

Krim nalashtuvannya z'єdnannya, it is not necessary to properly z'єdnati modules of the future annex. After that, in the working form of the program, you need to add available modules (widgets), adjust the necessary addresses of the widgets and specify the necessary parameters (you can write your own code for the consumer). Before speech, for the creation of a widget, the program uses drag'n'drop. For keruvannya, a lot of imitators of keruyuchih attachments are available - jumpers, sliders, displays, for skin z yay, you can write your own logic. Іsnuyut okremі forms for seeing and systematizing information from the necessary sensors in view of the graphs.

In this way, the platform goes like newbies, so we’ll stick it out more for coristuvachas, if you don’t want to spend an hour writing software for project management: reading data from weather stations and managing a smart house to managing robots.

All information necessary for the cob work is posted on the official website. Blynk - so that the skin can take part in the creation of new functions. At the moment, the service has been completely free of charge, but the situation is about to change - for now, for the monetization of new functions. So, at the same time, it is clear that access to the GPIO-interface is available as a purchase.

At the moment, Blynk works with the following boards:

  • Arduino: Uno, Nano, Mini, Pro Mini, Pro Micro, Mega, YUN (Bridge), Due;
  • Raspberry Pi;
  • Particle (ex Spark Core);
  • ESP8266;
  • TinyDuino (CC3000);
  • Wicked WildFire (CC3000).

Miraculous thing ESP8266. Finish off hard processor a lot of memory, a WiFi controller. ESP32, obviously, it's shorter, but it's more expensive. Ale at once not about them. More precisely, we do not know about them. On the ESP, it’s easy to work out practical, whether it’s home automation, and moreover, in remote control that control from a smartphone or a computer. I will build an example of this on any site. One problem - for robots with such an attachment, there are not only home measure, And from whatever point of the planet (de є access to the Internet, zrozumіlo), it will be necessary to have a server - an intermediary, which will accept assistance in the form of an annex and transfer it to you, and navpaki. Obviously, there are options and a direct link, but I can’t see them here through the complexity of the implementation or the road.

The list of indications in this article does not claim to be complete and especially unique, I just tried to analyze and structure the possibility of quiet chi other cost-free services. In pershu cherga for yourself, but if it’s possible to appear as a crooked one, be sure to be healthy. If I searched a public MQTT server for myself, then I searched through the mass of Internet resources. Shukav nasampered on esp8266.ru, but it's a pity, there half of the services are not workers anymore, otherwise they don't suit me especially for these other parameters. Everything that is written here is for me special dosvid, Your agreement to work with these services may be different. If you know any other similar services - write in the comments or to the mail (the mail and other contacts are located at the top right corner of the site header), and I will try to check and complete the list.

MQTT brokers

The MQTT protocol is perhaps the most important thing that comes up in push systems, if you are looking for a way to remotely control various "smart things". I can’t guarantee that the protocol is the simplest (I don’t have anything to pay special attention to, I seem to be on the new one and I’ve got it wrong), but I didn’t especially notice the daily flurries. I applied more richly. Ready-made libraries for the Arduino IDE - there are not only one, as it seems, “choose for relish”. Mobile supplements- Enough to choose for a smartphone, and for a control panel, broken from an ancient tablet. It is also, singsongly, the most popular option for the implementation of far-flung curation. Khmarnyh servers tezh dosit rich, they are called stench MQTT brokers. I can’t see the principle of working with the protocol and servers here, there is enough information on other sites.

CloudMQTT.com

I started from th service. It's just that the one who can do everything with the MQTT protocol is founded on a new one. The service is easy and simple, everything is intuitively understood. In 2018, the roci service allowed up to 10 outbuildings on the no-cost tariff plan, which completely dominated me. However, until the end of 2018, the service providers reviewed their policy and only 5 subscriptions are now available on the “Cute Cat” free tariff plan. It's especially small for me. I can have three “powered” attachments connected at the same time - two smartphones and a tablet, and for ESP, only two connections are needed. And different "automatics" I already have a lot to do, and I still plan to. Obviously, you can spawn a few copies of brokers in the middle of one oblіkovogo record, although they were introduced to them in the rest of the hour. But in such a time, three control attachments all the same “see” three connections for a skin instance, and even if you establish such a statehood, you won’t be afraid. The found paid tariff plan Humble Hedgehog costs $5 per month at the time of writing. No, I'm the only one to milk in the house of an amphibian to choke, pay such pennies skin month. That possibility is not so chic - 25 connections. I also had a chance to shukati other options.

Plusy: manually and simply

Minusi: less than 5 subscriptions on a cost-free tariff plan

flespi.io

To finish my long time, I was a broker mqtt.flespi.io. Having obtained the vin less, but at the moment, if I started working with him, the vin allowed as many as 100 competing connections at once and the great obsyagi obyagi, that are transferred and saved. Gorgeous! However, the service is not as handy as CloudMQTT. The control panel is not easy (if you want to be fully aware), setting up access rights is not clear at first glance, authorization and attachments, and smartphones by tokens with the common term “dії”. There are no other functions that I need, because I don’t know how to make a fuss. For example, how to save money from the base - I still don’t know. Strictly speaking, it is far from being only an MQTT broker, so, perhaps, I simply do not understand all the possibilities. Sometimes on different smartphones the information in certain tops stops updating. A couple of times, through pardons at the firmware and post-installations, I will add a service to the server again, blocking the oblikovy record for a few years. Ale, everything could be done for such a capacity. Alas, it’s a pity, and here the money has taken a mountain - since 2019, at a cost-free rate, the supply of electricity was provided at 10 connections. I don’t have anything nasty, but I’m not ready to pay such pennies for my hobbies, but I’m not ready to pay so much money for my services. Zagalom, shukatimemo such a samiy, ale with mother-of-pearl buzzers ...

Plusy: earlier it was up to 100 connections

Minusi Cabin: not handy, foldable with built-in access, retained can't be seen from the panel

HiveMQ Public Broker

Fully cost-free public broker without daily fees. Accept on head side broker is not written about them. Ale є great "ALE" - this broker cannot be authorized, so it won't work. Tobto all the information that is sent between the annexes and you, you can read it. For whom there would be no great tragedy, as if there were only signs of temperature and moisture, there is no secret of the stench. And if on the right there is a far-off management by a "reasonable house", then such a broker is not suitable in principle. Aja You didn't want to, if you could turn on some kind of attachment at the booth, or turn on the alarm, for example.

Plusy

Minusi

Eclipse MQTT

Another public broker without authorization. As it is written on the site, the broker of assignments is set for testing and not assignments for collecting and transferring confidential information. To connect to the server, follow these parameters: iot.eclipse.org server, port 1883; for TLS v1.2, v1.1 or v1.0 - port 8883. Connection available for WebSockets. Zagalom, the same and HiveMQ, only in a white projection.

Plusy: no cost, no connection fees

Minusi: come only for testing and weather stations without remote monitoring

mosquitto.org

І another huge broker without authorization. You can not repeat, all the same ones that HiveMQ and Eclipse MQTT have. Give respect to those who support all servers. TLS encryption it doesn't mean that your data is being stolen. Theft of the transmission channel between the annex and the server, otherwise it should be in the open access.

Plusy: no cost, no connection fees

Minusi: come only for testing and weather stations without remote monitoring

IBM Cloud (Bluemix)

Not an mqtt broker, but the "Internet of Things Platform". Ale in її warehouse є і mqtt broker. On the cost-free “Lite” tariff plan, up to 500 registrations of attachments and 200 MB of information per skin metric are allowed. Totally chic not only for home, but also for commercial outbuildings. Ale, yak zavzhdi, not without “ALE”. First, it’s more difficult to grow out of the platform. Documentation є, ale її even richer. Нi - A LOT of riches! I spent more than one year, so that I could understand more, how to make a connection. In another way, the platform allows publishing topics strictly in the specified format: "iot-2/evt/event_id/fmt/format_string". Same with commands: "iot-2/cmd/ command_id /fmt/ format_string ". And that's all - the daily liberties - that's just the number of the notification itself. And the format axis will tell you what is being transmitted, even more - "json", "xml", "txt", and "csv". Possibly, to whom such a pidhіd will be more correct and handy, but without acquiring less guilt. That and everything is fluently vlashtovano - possibilities, calling for everything, even richer, but we have a chance to sort it out.

Plusy: even more limits on connection

Minusi: foldable for a beginner, furnishing according to tops.

mqtt.dioty.co

Tse already povnistu bezkoshtovny broker. Boowai. On the side of the connection parameters, it is written step-by-step: “This MQTT broker is currently in beta. At this stage of beta testing, we do not charge a fee, so you will exceed the limit of 50,000 renewals per month. However, we reserve for ourselves the right to timely assign the duty of your oblique record, as if you are contributing to the service of other coristuvachiv. At some point, we will continue to contact you by email in order to try to understand your specific needs and those, as we can satisfy them.” 50,000 updates per month - about 70 updates per year, which is not so rich, as it is good, that one attachment can be published per session of editing data from sensors up to 50 updates. The broker supports authorization and TLS connection. Registration is tied to oblkovo Google entry. Є small exchange - all your topics are due to addresses email, through yaku you were registered in the service, for example: “/ [email protected]/…/…/…”. But the problem is more or less sutteva when setting up MQTT clients on smartphones (more text to type), don’t worry about that. In my opinion, this service is entirely meritorious for respect. I did not change the work with him, I just registered.

Plusy: mostly without cost

Minusi: required song prefix for topics, obezzhenya approx. 70 updates per year

Solace.Cloud (PubSub+)

The price is not so MQTT broker, as the whole IoT platform. On a cost-free tariff plan, up to 50 subscriptions are allowed, up to 1 GB of data transferred per month, up to 4 GB of savings (retianed renewal). Not bad. And yet, the free version has a richly improved design - it’s easy for someone else to pick it up “on the spur of the moment”. At that very hour, I didn’t become greedy for him. Possibly, the hour will come, I will sort out that mood.

Plusy: up to 50 connections

Minusi: to finish folding in mastery

myqtthub.com

Obviously an Estonian broker. On a cost-free tariff plan, allowances: up to 100 charges, and up to 50 subscriptions; 10MB of data to be saved; up to 50 subscriptions per subscription, maximum 250 subscriptions (why is it not clear whether the “home/#” subscription is just one subscription or more?); 300 allowances for quilling, but not more than 800 per year and not more than 10,000 per day. If you go out of regular (skin five minutes) publications, go out no more than 34 reminders at a time. Є y sche obmezhennya - more detailed marvel at the main side of the service. Obmezhennya, vtim, look like real home vikoristannya. I haven't tried...

Plusy: up to 50 connections

Minusi: obmezhennya for kіlkіstyu podomlen

mqtt.by

A simple Belarusian broker. Nothing is said about the exchange. Supporting authorization, and also the possibility of creating public topics, so that they can be opened for resolving the corystuvachiv service. But there is no support for secure connection (TLS), but it can be critical for some programs. The skin of publications of the topic is to blame for the prefix "/user/im'ya_koristuvacha", which simply makes it easy to set up mobile mqtt clients, but not suttvo. Three pluses - on the server there are globally accessible topics with the date of that hour, which is more convenient for the control panel based on the tablet, as it takes 24 years to doba - contagiously and the anniversary is one more (one hundred and twelve). Zagalom, as a whole normal broker, abi only working stably.

Plusy: without any restrictions, є public topics, you can publish your topics

Minusi: no SSL/TLS encrypted connection

mqtt.4api.ru

Russian no-cost broker - “we give access to a no-cost mqtt server for all clients”. Authorization and registration on the service through social services. Showing up, calling on everything, not too long ago. If you want the site itself to have an SSL certificate, in the connection parameters, specify data only for "Without SSL", perhaps SSL connection for the add-on is not available. On the side of the connection, it says: “We do not recommend winning this server for life-saving projects.” The control panel may have a modest functionality, so it is necessary to use third-party software

Plusy: without any obstruction

Minusi Stan: no SSL/TLS encrypted connection, no control panel functionality

Other services

One MQTT will not sit. MQTT is simple and handy, but it allows you to review the information “here and at a time”, without the history of changes at the hour. To review the schedules and other services, work with them and not become especially difficult. Acts of them are presented below.

ThingSpeak

ThingSpeak available yak no-cost service for non-commercial small projects (<3 миллиона сообщений в год или ~ 8 200 сообщений в день). Сервис позволяет накапливать получаемые данные в своих хранилищах, после чего их можно удобно просматривать в виде графиков. В том числе и на сторонних сайтах, .

Some of the features of the service can be integrated with MatLab Analytics, but I didn’t try to fix the MatLab scripts, so I didn’t have anything. Well, I didn't really want to. With a non-shedding oblіkovogo record, the service allows you to create up to four channels, for a skin channel, you can save up to 8 waterings with different amounts. Even in a free account there is only one exchange - it is not possible to publish data more than once for 15 seconds (a pause of 20 seconds is recommended), because it is bi "protection" in view of the transfer of the limit of 8200 notifications per day. In principle, all my "publicators" easily fit into this limit, which is smaller. I've been rooting with a service for a long time, I've done it easy and simple, so don't take MatLab to respect. Є kіlka program - kliєntіv for Android, ale richer less, nizh for MQTT.

Plusy: simple wiki on ESP, manual site

Minusi: richly delimited on a cost-free oblіkovomu record

open-monitoring.online

This service is somewhat similar to ThingSpeak - you can just look at the data in the same way by looking at tables, graphs and histograms. The interface is simpler, lower at ThingSpeak, but it’s more simple.

A few of these services are created, as I understand, for monitoring the parameters of personal sleepy power plants, but as a whole it is suitable for other purposes. The service is available usim and cost-free, without suttєvih obmezheniya at the moment. One exchange, as I have seen so far - correction to the server of a group of values ​​for one controller can not be more than once per whilin. Ale on the number of values ​​for the skin controller and the number of controllers in the environment is unknown. The power of data to the server is simply get-requested, the implementation on the ArduinoIDE took me no more than a year. On the ThingSpeak view, you can view the saved data on one chart (with invoices), and also adjust the dashboard to see the rest of the values. You can also look at the savings in the value of looking at a simple table.

Plusy: simple typing on ESP, manual interface, may not have a border

Minusi: it is not possible to display graphics on a third-party site (on a ThingSpeak account), well, I don't know how to do it yet

beebotte

On the main side of this service, it is written sternly: “connection of everything in real time with a rich API supporting REST, WebSockets and MQTT”. I have not yet won the victory especially for this service. Judging by what I understand from the description, the price is crazy mqtt broker and thingspeak.com. In the cost-free mode, the number of channels and resources is not fringed, but the number of renewals is fringed: 0.05 Million per day | 1.5 Million per month. To help you save, the limits are less: 5,000 per day | 150 000 per month. On top of that, they are spared less than a maximum of three months, after which they are seen. You won’t improve the weather for the whole river. I don't know anything about the mobile client for the smartphone yet. Registered. I'll try. Visnovki robiti for now.

Blynk

The service for remote care is being actively promoted by "smart outbuildings". I say bi, aggressively - write in all forums, de need and de need not. Zagalom, in my opinion, this platform is not for amateurs, but rather for business. On the "no-shock mode" there are few resources given, it's better to turn on the light or turn on one relay. Having tried it once in a rush, I threw it away, once the resources were gone. Too eager.

Plusy: don't know

Minusi: thirsty, mobile client only one

For the time being, everything. If you know other ways to manage ESP remotely (obv'yazkovo z "mobile") - be kind, write me. We can discuss that, it is possible, we will supplement the article.

Before wine, having found a bike for monitoring, I will attach an Arduino.

It was booming.

/* -- New project -- source code of graphical user interface has been generated automatically by RemoteXY editor. For a computer that uses RemoteXY library 2.3.5 or later version download by link http://remotexy.com/en/library/ ANDROID 4.3.1 or later version; - for iOS 1.3.5 or later version; Tsey source code is free software; You can repair and/or change the GNU Lesser General Public License as published under the Free Software Foundation; either version 2.1 License, or (on your option) be the version of the version. */ //////////////////////////////////////////////// // RemoteXY include library // ////////////////////////////////////////////////// /// // Assigned to the mode of connection of the RemoteXY library #define REMOTEXY_MODE__ESP8266_HARDSERIAL_CLOUD #include // set up a connection #define REMOTEXY_SERIAL Serial #define REMOTEXY_SERIAL_SPEED 9600 #define REMOTEXY_WIFI_SSID "***************" #define REMOTEXY_WIFI_PASSWORD "**********" #define REMOTEXY_CLOUD_SERVER .com " #define REMOTEXY_CLOUD_PORT 6376 #define REMOTEXY_CLOUD_TOKEN "******************************" #include // Add library DHT11 dht11 DHT; // Declare change class dht11 #define DHT11_PIN 7 // DHT11 sensor connections to digital pin number 4 const int analogSignal = A3; //connection of analog signal pin const int digitalSignal = 8; //connection of digital signal pin boolean noGas; //Changed to save the value of gas presence int gas = 0; //changed to save the amount of gas float hum = 0; //Changed to save water float temp = 0; //Changed to save temperature int chk; //Change to save pardon DHT char msgBuffer; // interface configuration #pragma pack(push, 1) 81,22,11, 2,26,31,31,79,78,0,79,70,70, 0,66,132,10,13,31,24, 7,10,27, 21,2,24, 66,132,56,13,31,24,4, 41,31,24,2,24,67,4,16,5,20, 5,38,23, 20,5,2,26,11,67, 4, 63,6,20,5,39,52,20,5,2,26, 11); // the structure assigns all the changes to your control interface struct ( // input variable uint8_t switch_1; // =1 if switching on switches i =0 if switching off // output variable int8_t level_1; // =0..100 level positions int8_t level_2; / / =0..100 equal char text_1; // = UTF8 string ends with zero char text_2; #pragma pack(pop) /////////////////////////////// //////////////////////// // // END RemoteXY include // ////////////////// ////////////////////////// /// #define PIN_SWITCH_1 13 void setup() ( RemoteXY_Init(); pinMode (PIN_SWITCH_1, OUTPUT); / / TODO you setup code ) void loop() ( RemoteXY_Handler(); digitalWrite(PIN_SWITCH_1 )?LOW:HIGH);noGas = digitalRead(digitalSignal); //Read the gas presence value gas = analogRead(analogSignal); = DHT.temperature ; RemoteXY.level_1 = hum; RemoteXY.level_2 = temp; dtostrf(hum, 6, 2, RemoteXY.text_1); / tag the RemoteXY structure for data transfer)

Vikoristovuemo sandwich from boards.

Unsuccessfully, everything immediately ordered:

From the moment the gloomy RemoteXY service was revealed, a year had already passed before the photo.

Features of the work with RemoteXY.

1. Everything is already simple. It's good in its own way. From Blynk and Cayenne, for example, it is unlikely that from scratch in a year you can get up and go. For example, "KaScada Cloud" will need a special bathing device to win.

2. There is no way to save data on the server side: no connection with the fee - the addon will have "No connection".

3. Cost-free only 5 elements of design, but the PRO program costs no more than a glassed-in hour.

4. It is possible with one program to make calls from the board, both through a gloomy server, and directly. Truthfully, not overnight. І it is impossible to switch promptly - you need to change the sketch on the board. It is also possible to connect a smartphone with a board via Bluetooth and USB.