How to send message to ESP32 pub/sub?

I want to send a message from my 3rd party app through Thinger.io to my ESP32 or ESP8266 to trigger a function to overwrite EEPROM memory. How can I do this? Can’t find documentation.

I understand how to write the code for the microcontroller, just not how to get the message through Thinger.io server for MQTT communication.

Hello @Elsewhere,

Sending data to a connected device is very simple, just calling to the REST API of the resource you want to receive that data. That API is shown by the web console in the API inspector as shown in the image below:

So if I want to send data to this device, just have to make a POST call to https://api.thinger.io/v2/users/jt/devices/GoogleLamp/led?authorization=<TOKEN>
and send the data in a json.

Note that you have to create a device tocken or an access tocken to allow your 3rd party software working with your account resources.

hope it helps

I see your example has a boolean value attached to it, but your saying I can POST any data I wish? So I could post 80 to trigger my device to run a function resetting an EEProm variable to 80?

Hi @Elsewhere,

Yes, instead of the boolean you can send any data you need in the JSON. Then Thinger.io Server will extract that data and send it to your device, but note that your device code needs to be ready to work with exactly the same JSON keys that was used in your message.

best