Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
31 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
25 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
23 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
48 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 ...
0
votes
1answer
85 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
39 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
305 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
0answers
209 views

Communication between 2 ESP8266 devices using Arduino code

Perhaps it is a novice question (since I'm a Pythonist, and I'm new to Arduino), but I'm trying to implement my code in Arduino to test if it is more stable than MicroPython. I have an AC motor, that ...
0
votes
1answer
87 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
28 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
1answer
522 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
311 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
298 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
382 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
354 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
277 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
260 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 ...