Questions tagged [paho]

Paho is an Eclipse project has been created to provide scalable open-source implementations of open and standard messaging protocols like MQTT aimed at new, exisiting, and emerging applications for Machine-to-Machine (M2M) and Internet of Things (IoT).

1173 questions
0
votes
1 answer

Error publishing sensor data to Thingspeak using MQTT on Raspberry Pi

I have connected a soil moisture sensor module and an LDR to an ADS1115 ADC (which is in turn connected to my R Pi). Am using Python 2.7. The ADC works fine and it prints values from channel 0 and channel 1 for the soil moisture module and the LDR…
Tia
  • 1,220
  • 5
  • 22
  • 47
0
votes
1 answer

Connect to several Mqtt servers using paho.mqtt.android

Can this library give opportunity make connections for several servers? https://github.com/eclipse/paho.mqtt.android I can not figure this case out the source code For example: mqttAndroidClient1 = new MqttAndroidClient(getApplicationContext(),…
levWi
  • 121
  • 1
  • 6
0
votes
1 answer

How to get publish value about Python paho Mqtt

I have a sample code for getting a message from Mqtt broker import paho.mqtt.client as mqtt def on_connect(client, userdata, flags, rc): print("Connected with result code "+str(rc)) client.subscribe("123") def on_message(client, userdata,…
高露潔
  • 1
  • 3
0
votes
0 answers

Paho Mqtt Android Library connection issue

I am trying to connect mqtt with the PAHO Mqtt android library. But it doesn't work for me. I think my server uri is not valid but I'm not sure. val clientId = MqttAsyncClient.generateClientId(); val url =…
yusufonderd
  • 3,237
  • 4
  • 21
  • 34
0
votes
1 answer

How to consume multiple messages with paho client, angular 4

Im trying to consume 3 values, which i get from a Paho-Client (time, geometry, temperature).The values will be saved in an object named message. Now i want to inject the three values throug a Service in my component to save them first in an array.…
Steffn
  • 275
  • 1
  • 6
  • 21
0
votes
1 answer

Paho mqtt callbacks on multiple subscription

I have subscribed to multiple (around 4) topics using paho.mqtt. On receiving message from each topic, I want to buffer the message until it reaches some threshold and then later insert bulk messages into MySQL database.I want to gather some 1000…
user2301
  • 1,857
  • 6
  • 32
  • 63
0
votes
1 answer

Why is this message sent using paho.mqtt.c causing segmentation fault?

I am trying to send a specific message type using the MQTT protocol. I am using the paho.mqtt.c library, and my broker is RabbitMQ 3.6.12, running Erlang 20.0. I am working on a virtual machine running CentOS 6.9. I first tried doing it by creating…
Flxnt
  • 177
  • 4
  • 22
0
votes
1 answer

paho mqtt callbacks in different class modules in python

I have defined my callback function in another python module. How do I attach that callback which is defined in another module to paho.mqtt client callback? For. e.g I have a database.py where I perform all the database operations such as…
user2301
  • 1,857
  • 6
  • 32
  • 63
0
votes
0 answers

My app freezes after fullscreen application on front

I am struggling with persistent problem with Android app that has MQTT ServiceConnection running on background. When ever I switch to an other application that has fullscreen surface (game, youtube on fullscreen, etc) the application completely…
user2771538
  • 103
  • 1
  • 10
0
votes
0 answers

Using Azure cloud directly to implement paho-mqtt in C, "Failed to connect"?

I'm trying to send and receive messages using azure cloud but directly on paho-mqtt and not on azure-mqtt SDK in a Raspberry-pi 3. I have followed all the instructions mentioned here. I have generated the SSL certs and have placed in the /etc/certs…
0
votes
1 answer

MQTT Callback context not defined during publish

public class MqttService extends Service implements MqttCallback { public MqttAsyncClient mClient; mOpts = new MqttConnectOptions(); mOpts.setCleanSession(MQTT_CLEAN_SESSION); …
Sachin Singh
  • 391
  • 1
  • 5
  • 20
0
votes
1 answer

Paho CPP - compile as a static executable

Is it possible to compile Paho CPP as a static executable? If so - how? Here is an example of the compilation statement for one of the examples: g++ -DOPENSSL -I.. -I/usr/local/include -D_NDEBUG -Wall -std=c++11 -O2 -o data_publish data_publish.cpp…
Robben_Ford_Fan_boy
  • 8,494
  • 11
  • 64
  • 85
0
votes
1 answer

Paho MQTT (C++) client fails to connect to Mosquitto

I've got C++ code using the Paho MQTTPacket Embedded C++ library to connect to an MQTT broker. When that broker is io.adafruit.com, it works perfectly fine. But when it's my own Mosquitto instance running on my Raspberry Pi, the connection fails. …
Joe Strout
  • 2,634
  • 2
  • 28
  • 39
0
votes
1 answer

how to store and parse real-time streaming data in mqtt paho for every Nth minutes (python)

Im working on a real-time data streaming project to parse and store the data every Nth minute. My objective is to throw away the very first minute of data(as buffer) and store every 4 minutes long of data from the server. The data will then be…
jynn
  • 95
  • 2
  • 9
0
votes
1 answer

Python MQTT Reset timer after received a message

I have the below python script from the thread "Python MQTT Connect only for a limited time". #!/usr/bin/python import sys import paho.mqtt.client as mqtt import time def on_message(client, userdata, msg): if msg.topic == "foo/bar": …
Rexksvii
  • 9
  • 1
  • 4