Integrating labview with blynk

Hello everyone

I’m working on a project to collect data with LabVIEW in LattePanda.
For this project, I would like to integrate the data collected by LapView into Blink.

Is it possible to upload the data collected by LabView to Blink via http API?
Or is there a better way?
(For example, passing data from labview to esp32, then passing data from esp32 to blynk, then passing data to lattepanda via ethernet communication…)

You should probably start by reading the existing topics that relate to LabView in this forum…

https://community.blynk.cc/search?q=Labview

If you’re going to use APIs to write to Blynk then you should be aware that the current version of Blynk uses a different format for APIs compared to the old Legacy version.
The current API documentation is here…

Pete.

It seems that all of the previously released labview libraries were written when blynk was a local server.

Is it possible to do virtual write with the https api?

I want to collect data from a pc with labview installed and then store it on a cloud server over wifi or ethernet.
(PC environment)

Blynk Legacy could be run on the cloud servers or on a local server. The functionality (from the HTTP API point of view) was the same for both cloud and local servers. However, looking through the topics in the link I provided the majority of them refer to the Blynk Legacy cloud servers.

Yes, it’s possible to update a virtual pin/datastream using the HTTP(S) API. It’s covered in the “Update Datastream Value” section of the documentation, in the link I provided.

Pete.

Thanks for the reply, I’ve done some testing and have been successful in updating VirtualPin’s data to the cloud using the HTTP API.

By any chance, is it possible to change the status to online or offline using the API?
Or do I need to add a separate event (which I don’t really want to do)?

No, the device will always appear as offline unless there’s an always-on connection established between the device and the server. As the HTTP(S) API doesn’t work in this way the device will always appear offline.

There is no event available to change the on/offline status.

Pete.

My system is always connected to the internet, so is there another way to show Online while it’s running?

It’s not about being connected to the internet, it’s about your system having negotiated an always-on connection with the Blynk server and exchanging regular heartbeat pings.

This isn’t possible when using the HTTP(S) API, only with the Blynk library - which isn’t possible with your system.

Pete.

In node-red, does the state change online when communicating with blynk?

I’m trying to update a library with labview in an OS environment

When you use the Blynk plug-in (contrib) for Blynk an always-on connection is established with the server, so the device appears online.
Whit this setup, you don’t need to use the HTTP(S) API for Blynk, as all communication to and from the Blynk server is handled by the plug-in.

The other advantage of this approach is that incoming messages from Blynk trigger the Write node in the plug-in, so you don’t have to keep constantly polling the server to look for virtual pin changes.

Pete.

Can we figure out how the node-red plugin works with websocket or mqtt?

Or is there another mechanism?

I tried writing data to a virtual pin with the HTTP API and this is what I got.

HTTP/1.1 200 OK
connection: keep-alive
access-control-allow-origin: *
content-length: 0

It’s very straightforward. You use the appropriate nodes in the plug-in to send the message payload to Blynk, or to receive data from Blynk in the form of a message payload.

Another mechanism for what? You seem to be jumping from one platform to another in your questions without any background information about what you’re trying to achieve.

I’m not sure what sort of feedback you are expecting from the forum on that, without providing lots of additional information.

Pete.

I need help writing a new library in labview. The protocol information provided in the official documentation seems to be a bit sparse.

I think you can do something similar to node-red with labview.
After all, node-red can also perform actions on the OS.

I nedd this protocol

The login success code is not showing as 0x00c8(200), but returns as 0x0004, what is the case?

That seems a lot of work just to have your Blynk device appear as “online”.

If you really want to understand the communication between a device and the Blynk server then you should probably run a C++ sketch on a device such as an ESP8266 and turn on Blynk debugging then look at the two-way communications between the device and Blynk…

Pete.