1

I'm experimenting with the nodeMCU board attempting to proto type out an IoT project. My first iteration involved using an MQTT broker to send messages between my computer and the board. Due to the fact that the messages have to bounce from the terminal to the broker to the ESP8266, I'm finding that the latency is too high.

I'm wondering what the alternative methods of sending messages are that don't involve a broker or high latency (my messages are being sent in JSON format). From what I understand about MQTT, I cant put the ESP8266 in AP mode and use MQTT.

One alternative I think is to put the device in AP mode and create a simple restful interface, but while I have seen sample code for serving a web page, I can't seem to find any examples of a restful interface on the ESP8266. For the record, I'm programming it using the Arduino IDE.

11
  • 1
    What sort of latencies (in ms) are you actually seeing and what would be acceptable? Also how big are the actual messages.
    – hardillb
    Sep 12, 2019 at 16:16
  • 2
    Are you using a local broker or a cloud hosted broker?
    – hardillb
    Sep 12, 2019 at 16:52
  • 4
    Run your own local broker, things will get a LOT quicker
    – hardillb
    Sep 13, 2019 at 6:21
  • 1
    Why not using a raspi as a broker? You can also run a restful interface on the esp. Don't recommend it, though. Sep 16, 2019 at 12:52
  • 1
    Please use edit to integrate all the new information into the question. Thanks.
    – Helmar
    Sep 16, 2019 at 20:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.