Sending ESP8266 Sensor Data to ThingWorx Using MQTT – Need Guidance
Hi everyone,
I’m currently learning ThingWorx and trying to connect a small IoT setup, but I’m a bit confused about the correct architecture and would really appreciate some guidance.
My current setup uses an ESP8266-based NodeMCU board to read data from a wireless AC current sensor. At the moment, the ESP8266 collects the sensor data and displays it on a local web server using an HTTP client. That part is working fine.
Now I want to extend this project so the device can send the sensor data to **ThingWorx for monitoring and analytics**, ideally using **MQTT** since it seems to be the common approach for IoT communication.
From what I understand so far, the workflow might look something like this:
Sensor → ESP8266 → MQTT → ThingWorx
However, I’m unsure about a few things:
- Do I need to install and run a **separate MQTT broker** (for example Mosquitto) between the ESP8266 and ThingWorx?
- Does **ThingWorx provide its own MQTT broker**, or does it only act as a subscriber/client?
- Are there recommended libraries or examples for sending MQTT data from an ESP8266 to ThingWorx?
- Would it be better to send the data via **REST/HTTP instead of MQTT** for a beginner implementation?
I’ve been reading some MQTT documentation here as well to understand the basics:
https://mqtt.org/
And also reviewing ESP8266 technical information from Espressif:
https://www.espressif.com/en/products/socs/esp8266
If anyone has built a ThingWorx + ESP8266 + MQTT pipeline before, I would really appreciate suggestions on the best way to structure this or any example projects/tutorials I could follow.
Thanks in advance!

