Sponsored Content
Top Forums Programming Wuhan Coronavirus Status for China - Rapid Prototype Blynk App with ESP8266 Post 303043594 by Neo on Saturday 1st of February 2020 12:07:24 PM
Old 02-01-2020
The mistake I made in this humanitarian crisis situation was to use Blynk to build a public service app to help others.

I will not make that mistake again.

In addition, I also read the Blynk privacy policy and according to their privacy policy, they can provide the data we use on the Blynk network to third parties, for example Google and FB-like behavioral analytics, where they can partner with data miners and other third parties and user our "behavioral exhaust" without our express written consent.

From Blynk Terms of Use (TOS) policy:

Quote:
By using the [Blynk] Service, you are granting us (and any service providers or Providers used by us) permission to access your account and those messages, data, information, text, graphics, audio, video or other material and content of any kind posted/uploaded/transmitted to or through the Service using your account, to process and submit said material to End Users.
That is a very "radical" TOS statement, to say the least.......

Update:

After looking into this, I found some promising iPhone apps which do not share your data with third parties (in contrast to Blynk) and will test the mosquitto broker to set up a private pub/sub network to send and receive messages to and from these ESP8266 and ESP32 devices.

Quote:
Eclipse Mosquitto is an open source (EPL/EDL licensed) message broker that implements the MQTT protocol versions 5.0, 3.1.1 and 3.1. Mosquitto is lightweight and is suitable for use on all devices from low power single board computers to full servers.

The MQTT protocol provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it suitable for Internet of Things messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers.

The Mosquitto project also provides a C library for implementing MQTT clients, and the very popular mosquitto_pub and mosquitto_sub command line MQTT clients.
I have already set up a mosquitto broker on Ubuntu, the basic security authentication and can send a message from my ESP32 device to the remote Linux server. Will discuss this in another post.
This User Gave Thanks to Neo For This Post:
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Function prototype declaration

Hi All, I have the script as below #!bin/bash let k=9 if then echo "Start" Hello echo "End" else echo "failed" fi function Hello() { echo "hello !!!!" } I got the below error : (4 Replies)
Discussion started by: Balasankar
4 Replies

2. Programming

Embarcadero Rapid SQL query for dependency

Team I am using Embarcadero Rapid SQL V8 . When we right click on any procedure/table/view and open the contents. It has dependencies tab, which tell what all are the dependents used . My question is how does this information captured in backend to retrieve the dependency objects in... (0 Replies)
Discussion started by: Perlbaby
0 Replies

3. What is on Your Mind?

Major Changes in New UserCP (v0.63) Prototype

Regarding the latest version of the UserCP prototype (version 0.63) I have made a lot of major changes, including Added a "Posts Timeline" table for the recent posts, complimenting the non-table version earlier, which has been moved off the main menu (link at the bottom of the table). Added a... (4 Replies)
Discussion started by: Neo
4 Replies

4. Programming

NodeMCU ESP8266 Blynk SSL Application for Linux Server Load Averages

Here is a useful SSL (HTTPS) application for anyone with a remote Linux server they want to keep an eye on using Blynk and the NodeMCU ESP8266. This little app also works (have tested as well) on the WeMos D1 ESP8266 Arduino board. The NodeMCU setup could not be easier, just find a... (8 Replies)
Discussion started by: Neo
8 Replies

5. Programming

Wuhan Coronavirus Status App for China - Rapid Prototype using MQTT and the IoT OnOff IOS App

With a little bit of work, was able to build a nice "Wuhan Coronavirus Status" app using MQTT and the IoT-OnOff app. More on this technique here: ESP32 (ESP-WROOM-32) as an MQTT Client Subscribed to Linux Server Load Average Messages The result turned out nice, I think. I like the look and... (10 Replies)
Discussion started by: Neo
10 Replies

6. Programming

A Slightly Better NTP Client for the ESP8266

Was not really happy with the NTP clients for the ESP8266 because, after a few years of game engine programming, I am not a fan of a lot of code and delays in the main loop, so here is a "slightly better NTP client" for the ESP8266. In a nutshell, instead of having a delay in the main loop as a... (1 Reply)
Discussion started by: Neo
1 Replies
libmosquitto(3) 														   libmosquitto(3)

NAME
libmosquitto - MQTT version 3.1 client library DESCRIPTION
This is an overview of how to use libmosquitto to create MQTT aware client programs. There may be separate man pages on each of the func- tions described here in the future. There are also bindings for libmosquitto for C++ and Python. They are not documented here. This is fairly incomplete, please see mosquitto.h for a better description of the functions. STATUS
The libmosquitto api is currently regarded as experimental and unstable and may change in future releases. LIBMOSQUITTO SYMBOL NAMES
All public functions in libmosquitto have the prefix "mosquitto_". Any other functions defined in the source code are to be treated as pri- vate functions and may change between any release. Do not use these functions! FUNCTIONS
LIBRARY VERSION unsigned long mosquitto_lib_version (int *major, int *minor, int *revision); Obtain version information about the library. If any of major, minor or revision are not NULL they will return the corresponding version numbers. The return value is an integer representation of the complete version number (e.g. 9000 for 0.9) that can be used for comparisons. LIBRARY INITIALISATION AND CLEANUP int mosquitto_lib_init (void); int mosquitto_lib_cleanup (void); CLIENT CONSTRUCTOR/DESTRUCTOR struct mosquitto *mosquitto_new (const char *id, void *obj); void mosquitto_destroy (struct mosquitto *mosq); LOGGING int mosquitto_log_init (struct mosquitto *mosq, int priorities, int destinations); Configure the logging settings for this client. Returns 0 on success, 1 on error. Set priorities by ORing any of the items in the following list: o MOSQ_LOG_INFO o MOSQ_LOG_NOTICE o MOSQ_LOG_WARNING o MOSQ_LOG_ERROR o MOSQ_LOG_DEBUG Set destinations by ORing any of the items in the following list: o MOSQ_LOG_NONE o MOSQ_LOG_STDOUT o MOSQ_LOG_STDERR WILLS int mosquitto_will_set (struct mosquitto *mosq, bool will, const char *topic, uint32_t payloadlen, const uint8_t *payload, int qos, bool retain); CONNECT/DISCONNECT void mosquitto_connect (struct mosquitto *mosq, const char *host, int port, int keepalive, bool clean_session); void mosquitto_reconnect (struct mosquitto *mosq); int mosquitto_disconnect (struct mosquitto *mosq); PUBLISH int mosquitto_publish (struct mosquitto *mosq, uint16_t *mid, const char *topic, uint32_t payloadlen, const uint8_t *payload, int qos, bool retain); SUBSCRIBE/UNSUBSCRIBE int mosquitto_subscribe (struct mosquitto *mosq, uint16_t *mid, const char *sub, int qos); int mosquitto_unsubscribe (struct mosquitto *mosq, uint16_t *mid, const char *sub); NETWORK LOOP int mosquitto_loop (struct mosquitto *mosq, int timeout); int mosquitto_loop_read (struct mosquitto *mosq); int mosquitto_loop_write (struct mosquitto *mosq); int mosquitto_loop_misc (struct mosquitto *mosq); int mosquitto_socket (struct mosquitto *mosq); CALLBACKS See mosquitto.h EXAMPLES
#include <mosquitto.h> void my_message_callback(void *obj, struct mosquitto_message *message) { if(message->payloadlen){ printf("%s %s ", message->topic, message->payload); }else{ printf("%s (null) ", message->topic); } fflush(stdout); } void my_connect_callback(void *obj, int result) { struct mosquitto *mosq = obj; int i; if(!result){ mosquitto_subscribe(mosq, topics[i], topic_qos); }else{ fprintf(stderr, "Connect failed "); } } void my_subscribe_callback(void *obj, uint16_t mid, int qos_count, const uint8_t *granted_qos) { int i; printf("Subscribed (mid: %d): %d", mid, granted_qos[0]); for(i=1; i<qos_count; i++){ printf(", %d", granted_qos[i]); } printf(" "); } int main(int argc, char *argv[]) { char id[30]; int i; char *host = "localhost"; int port = 1883; int keepalive = 60; bool clean_session = true; struct mosquitto *mosq = NULL; mosq = mosquitto_new(id, NULL); if(!mosq){ fprintf(stderr, "Error: Out of memory. "); return 1; } mosquitto_log_init(mosq, MOSQ_LOG_DEBUG | MOSQ_LOG_ERR | MOSQ_LOG_WARNING | MOSQ_LOG_NOTICE | MOSQ_LOG_INFO, MOSQ_LOG_STDERR); mosquitto_connect_callback_set(mosq, my_connect_callback); mosquitto_message_callback_set(mosq, my_message_callback); mosquitto_subscribe_callback_set(mosq, my_subscribe_callback); if(mosquitto_connect(mosq, host, port, keepalive, clean_session)){ fprintf(stderr, "Unable to connect. "); return 1; } while(!mosquitto_loop(mosq, -1)){ } mosquitto_destroy(mosq); return 0; } SEE ALSO
mosquitto(8) mqtt(7) AUTHOR
Roger Light <roger@atchoo.org> 5 February 2012 libmosquitto(3)
All times are GMT -4. The time now is 03:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy