Questions tagged [mqtt]

MQTT (Message Queuing Telemetry Transport) is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol. The MQTT protocol enables a publish/subscribe messaging model in an extremely lightweight way. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium.

Filter by
Sorted by
Tagged with
0
votes
1answer
35 views

MQTT PubSubClient connection problem with ESP32

I am experiencing some problems with string in Arduino application with ESP32. I don't understand why this code works: mqtt.setServer ("m20.cloudmqtt.com", port); //is OK and this does not work ...
2
votes
1answer
72 views

Connecting to MQTT causes DHT11 Sensor to stop working?

I have a project I am working on, based on an ESP32 from NodeMCU. I have a bunch of sensors connected to said ESP32 - they all work and the code itself "works" with a minor quirk. The issue in ...
0
votes
0answers
78 views

MQTT subscribe callback fails to be called in ESP8266 deepsleep mode

Refer to ESP8266 deep sleep and MQTT I executed the code in the given link. However i am not able to receive the subscribe message that are send from MQTT test broker(MQTT Lens) on the serial ...
0
votes
2answers
69 views

How to get a list of IPs in a LAN using NodeMcu?

I'm going to create an IoT system. I use a Raspberry Pi as a MQTT broker and as a webserver. Every day, the Pi gets a new IP address, so I need to find its new IP address via ESP8266 to use this ...
0
votes
2answers
208 views

Convert byte* to int in Arduino

I am trying to convert byte* value to int here is how I have it. void mqttCallback(char* topic, byte* payload, unsigned int length) { String topicStr = topic; int* payload_value; int ...
0
votes
0answers
22 views

Arduino clients suddenly not able to connect (or publish) to MQTT

we are struggling with a project that has things (arduinos as clients) communicating to our MQTT broker (mosquitto) running on a DigitalOcean droplet (inside a docker). We have about 200 things at ...
0
votes
1answer
116 views

Notoriously unstable ESP8266 MQTT-client

I am doing a project where an ESP8266 receives data from an Arduino Uno and publishes it via MQTT. After a random amount of time, it will stop sending data to my MQTT broker. It might be an hour, it ...
0
votes
1answer
98 views

Mqtt not subscribe on topic that's converted from String to char array

I am still not sure what should be the exact Title for this question, because I don't know where the problem is. I am using #include <MQTTClient.h> mqtt library to subscribe on a topic. This ...
0
votes
0answers
64 views

I can't send GPS data to server

I am trying to send gps location data every 3 seconds to mqtt server if it's updated but my device shows weird stack errors and resets. What i am missing? I am using tinygps++ and pubsubclient as ...
0
votes
0answers
76 views

Real-time Pub/Sub thru MQTT between JoyStick and OnBoard Drive units [both ESP8266] - Connection issues

I looked around for solutions to my issue by searching on the forum and elsewhere and haven't seen similar issues - (https://arduino.stackexchange.com/search?page=2&tab=Relevance&q=MQTT%...
1
vote
2answers
1k views

ESP-01 not waking correctly up after deep sleep

I have an ESP-01 that I want to measure pool temperature with. It will send the data over MQTT to the broker. I have connected RST to GPIO16 so I can use the deep sleep functionality. Currently I am ...
0
votes
0answers
376 views

ESP8266 MQTT periodically disconnecting

I use an MQTT to communicate with an ESP8266. I'm using cloudmqtt.com and PubSubClient. Sometimes the ESP disconnects from the MQTT and reconnects. I checked the log from cloud and I got this data ...
1
vote
1answer
1k views

ESP8266 deep sleep and MQTT

I am working on a project were I am putting my board into deep sleep mode, and it wakes up with an interrupt from a sensor. When it wakes from deep sleep I would like to send a message to my MQTT ...
0
votes
0answers
261 views

Arduino and using a SSL secured mqtt broker

I'm looking for a library helping me to connect from an Arduino to a MQTT Broker. Of course I want to secure the connection via TLS/SSL. The "physical" connection is established via a SIM800 module. ...
0
votes
1answer
134 views

MQTT - Can lastwill be sent to multiple topics?

I'm using an ESP8266 as an IOT device, with MQTT to send status messages. Each device have its own availability topic, to state its online or offline state ( needed for Home Assistant indication on ...
0
votes
2answers
325 views

Mosquitto TLS over WifiMulti on ESP8266

With these few lines I am able to attach my certificate, tell it to WifiClientSecure the certificate, start the wifi as well as the mosquito pubsubclient: WiFiClientSecure espClient; WiFi.begin(ssid, ...
0
votes
1answer
50 views

How can I call the constructor of a Class after it called once? [closed]

I have a problem with Classes. I have a bunch of code, that code is uses Adafruit MQTT FONA library. I call the Class for make new Instance and Connect to specified server with this code; ...
0
votes
2answers
216 views

Using MQTT to send time stamp - to Arduino

In previous question in this forum - I asked about updating clock on an ESP8266, using MQTT broker to send a time stamp on demand, in following manner: 1) ESP8266 sends a publish containing the ...
1
vote
1answer
307 views

Use MQTT to update internal clock

I write code to upload to ESP8266. I wish to use time stamp in order to log events. I found an NTP sketch, I can work with ( since it has a wifi connection ), but I wish to keep my code as simple as ...
0
votes
1answer
100 views

Arduino Uno - MQTT message using PUBSUB on ESP8266

I'm trying to write code involving MQTT messages to operate an ESP8266 relay ( a Sonoff device ), using PubSub library. For some, unknown for me, reason - messages larger than 99 chars are not sent. ...
0
votes
1answer
797 views

ESP8266 fail to connect MQTT broker

I am using NodeMCU dev board with ESP8266 WIFI. Every time I try to connect to my local broker it returns this error: failed, rc=-2 try again in 5 seconds I am using Ubuntu 18.04, my local brokers ...
0
votes
1answer
291 views

Unable to Configure MQTT Client ID using Adafruit MQTT Library

I am utilizing the MQTT library that Adafruit has created, located here, and the library itself works wonderfully - however I am finding myself unable to edit the Client ID or configure the PINGRESP. ...
0
votes
1answer
70 views

String & Char concatenations

A newbie in Arduino- and I'm trying to concatenate string and chars ( well in python it is quite different ). I'm trying to post a MQTT message- constructed following format to the client.publish(...
1
vote
2answers
1k views

MQTT over serial

I'm planning to build a 32 relay IOT node next to my Raspberry Pi. The relays will be controlled by an Arduino Mega 2560. The Pi will run Home Assistant and Mosquitto so I would prefer to communicate ...
1
vote
2answers
636 views

MQTT bridging with Arduino and ESP8266 - What software should I use?

Sorry for the vagueness in my question, I am just looking for ideas to point me in the correct direction please... I wish to connect many (read: 20+) different sensors to a local wifi network and ...
0
votes
0answers
440 views

Soft WDT with HX711 and PubSubClient libraries

I'm using NodeMCU 0.9 My sketch crashes if the following 2 include are present in the sketch: #include <PubSubClient.h> #include <HX711.h> I obtain a Soft WDT reset If I do not use ...
0
votes
1answer
983 views

MQTT not working on ESP8266 (Nodemcu 0.9)

I'm trying to use NodeMCU on my ESP8266 (NodeMCU 0.9) but the board keep crashing and I don't understand why. I tested the mqtt broker using command line and it works perfectly, so I can suppose that ...
1
vote
1answer
697 views

ESP8266 MQTT client error

#include <PubSubClient.h> #include <ESP8266WiFi.h> //EDIT THESE LINES TO MATCH YOUR SETUP #define MQTT_SERVER "YOUR.MQTT.SERVER.IP" const char* ssid = "YOUR_SSID"; const char* password = "...
0
votes
1answer
764 views

Arduino MQTT Bluetooth

Is there a library to use MQTT with a bluetooth module (HC-06) instead of WiFi? If not is there a similar ready for use implementation of a publisher subscriber pattern available?
-2
votes
1answer
369 views

Using ESP8266 without separately programming

Can I use an ESP8266 module with an Arduino Mega using some kind of library without programming the ESP8266 separately? I want to sent messages to a Mosquitto Broker in a Raspberry pi using Arduino ...