Start a topic
With the exception of Windchill, The PTC Community is on read-only status until April 6 in preparation for moving our community to a new platform. Learn more here
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

Sending ESP8266 Sensor Data to ThingWorx Using MQTT – Need Guidance

DD_14525730
2-Explorer

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:

 

  1. Do I need to install and run a **separate MQTT broker** (for example Mosquitto) between the ESP8266 and ThingWorx?
  2. Does **ThingWorx provide its own MQTT broker**, or does it only act as a subscriber/client?
  3. Are there recommended libraries or examples for sending MQTT data from an ESP8266 to ThingWorx?
  4. 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!

2 REPLIES 2

Hello,

1. Yes,
2. It acts as a client,
3. It only depends on your broker,
4. Yes, try that first. All you need to do is send an https POST call with JSON payload and a
fixed AppKey header for authentication.

Regards,
Constantine

Vilia (my company) | GitHub | LinkedIn
slangley
23-Emerald III
(To:DD_14525730)

Hi @DD_14525730 

 

If you found the response from Constantine helpful, please mark it as the Accepted Solution for the benefit of others in the community.

 

Regards.

 

--Sharon

Announcements


Top Tags