With aRest.io you are able control your Arduino/Esp from all over the world - but how?

In the Client SourceCode (found here) you only find the PubSubClient, which is an MQTT client.

I'm assuming:

My Arduino can (during the aRest.h) subscribe to topics in my aRest.io dashboard (http://dashboard.arest.io/) and if I add something to the dashboard the aRest's Broker will inform my Arduino. But here is my error. How can the Broker contact my Arduino behind the firewall? Does the Arduino use hole punching? Is my attempt wrong?

  • The broker doesn't contact the Arduino - the Arduino contacts the broker. – Majenko Jan 3 '20 at 0:42
  • So the Arduino is polling for commands ? – Meeresgott Jan 3 '20 at 0:44
  • Not as such, no. It connects to the broker and sits there waiting for the broker to say something. – Majenko Jan 3 '20 at 0:51
  • I have to test this tomorrow! Could it be really so easy... Thank you for the hint in the right direction – Meeresgott Jan 3 '20 at 0:57
  • check this out ... visual representation of MQTT messages ... shiftr.io/shiftr-io/demo – jsotola Jan 3 '20 at 2:52

The Client contacts the broker and maintain the connection - waitung for topic to be updated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.