I am curious if it is possible to set up two devices, in my case ESP32s, collect data from each and send them to the same template in the IoT Blynk app? I’ve got one device working on one template. I could duplicate this, but I think a more elegant solution is to use a single template instead. If so, can you point me in the direction on how this could be done.
I think you’re confusing the concepts of templates and devices.
I’m guessing that you mean you want to have one dashboard which displays the data from several devices?
If so, this isn’t how Blynk IoT is designed to be used. However, there are some workarounds. Automations can be used to send data from one device to another, but there are restrictions that mean this may not be suitable for your use-case.
Otherwise, data can be sent from one device to another using the REST API or Node-Red. More info here…
Ok I’ll try to explain in more detail. I might be mixing up some of the terminology… I have two ESP32 microcontrollers. Each of them collects data that I want to send to Blynk IoT 2.0 cloud, using Edgent library. I’ve managed to make two separate templates, connect one ESP32 to each, and see the results in their respective sections within the Blynk 2.0 IoT app.
However, this data from the two ESP32 make sense to compare together, so I want to bring the two data together. E.g. the data from ESP32_1 say data_1, and the data from ESP32_2 say data_2 on a single SuperChart.
I have tried to the following. Using a single template I got the BLYNK_TEMPLATE_ID and BLYNK_TEMPLATE_NAME. I’ve uploaded code to both ESP32 in which I used the same ID and NAME. For the first ESP32 I used virtual datastreams V0, V1 and V2. For the second ESP32 I used virtual datastreams V3, V4, and V5. Then in the App I added all the datastreams and added them to widgets. Sadly only the datastreams for the first ESP32 is working. I am not sure how to get all the data from all of the ESP32s in one place.
Hopefully, I am making more sense, and even more so what I am asking is possible with Blynk…
I got it working with automations. In this project I only have two nodes (or ESP32s), so this solution is fine. Thanks for pointing me towards Node-Red, will look into that for bigger projects.
I do have somewhat related questions here as they came up in this project:
I see that sorting of devices is available as follows: A-Z, Z-A, First Added, Last Added. I’d like to custom sort to put the most important at top. Is this possible?
Is it possible to hide devices? In this project I made a template/device for the second ESP32 which is only used to send the data to the first ESP32 via automations. I don’t actually want to see this one, and only the device that now has both sets of data.
Is there a math widget? I’d like to do basic math operations on virtual datastreams, such as multiplication, addition, etc. Including multiple datastreams. E.g. take the absolute difference of two datastreams to create a new datasteam.
I don’t believe so at the moment, although it has been discussed before
I don’t believe so at the moment. This is the first time I’ve seen this discussed.
No. There was a very recent discussion about averaging values, but your suggestion goes much further than that. Why don’t you simply do this in code on the “primary” device before sending the data to dashboard? (or use Node-Red).
Setting up the Device, in particular the SuperChart, I am seeing something that might be a bug. In the SuperChart I want to plot two datastreams. One is called “Volt Inside” and the other is called “Volt Outside”. It is the Volt Outside that is a forwarded value from the automations as you had suggested. When I set the x-axis to Live, I can see two datastreams, updating every second - all good. See the first image below. The Volt Outdoor datastream is in GREEN.
When I change the x-axis scaling to anything other than Live then the Volt Outside datastream completely disappears from the plot. I have made sure that this datastream has Is Raw = True. I’ve tried to delete this datastream and re-add it, but I cannot seem to get it to display to any other x-axis value (such as 15 mins, 30 mins, etc). See screenshot to show the issue below