What is cheapest data usage method to read a string

I’m new to the electron but not to arduinos. Can someone suggest the cheapest way (data usage-wise) to read a string of data from an electron. I have a desktop connected to the internet that will grab the data. This will be done every 5 minutes. The electron will have an 80 character ASCII string of data that the desktop will parse. I’m thinking that an http GET is the way to go but I’m hoping that some of you more experienced folks out there might have the best way and I can benefit from your experience.

This is the way I would do it. It may not be appropriate for your use case, but I’ll throw it out there.

On the Electron, use Particle.publish to send the string. It can even sleep for the 5 minutes if it’s going to be battery powered. This is particularly efficient because the Particle cloud connection is pre-authenticated. It’s also encrypted.

On the desktop computer side, subscribe to the events from the cloud. I do it using Server Sent Events from a Java program, but it works well from node.js (Javascript), even a script that uses the Particle CLI. Server Sent Events (SSE) works by making an outgoing connection from your computer to the Particle cloud so it works with firewalls and NAT, but it’s also extremely fast because the connection stays open so the cloud can push the events immediately. It’s also encrypted.

If the Electron will be on all of the time, and you really want to have the desktop computer choose when to query, a Particle variable would work efficiently, as well.

1 Like