Connect Raspberry Pi to ThingWorx
Connect a Raspberry Pi to ThingWorx using the Edge Micro Server (EMS).
Guide Concept
This project will introduce you to the Edge MicroServer (EMS) and how to connect your ThingWorx server to a Raspberry Pi device.
Following the steps in this guide, you will be able to connect to the ThingWorx platform with your Raspberry Pi. The coding will be simple and steps will be very straight forward.
We will teach you how to utilize the EMS for your Edge device needs. The EMS comes with the Lua Script Resource, which serves as an optional process manager, enabling you to create Properties, Services, Events, and Subscriptions for a remote device on the ThingWorx platform.

Guide Info
Level | Beginner |
Est. Time | 30 Minutes |
Published | Sep 30, 2020 |
Author | Allen Smith |
You'll learn how to
- Set up Raspberry Pi
- Install, configure and launch the EMS
- Connect a remote device to ThingWorx
Things used in this guide
This guide assumes use of either the hosted Foundation server or the downloaded trial.
You will also need the following:
- Raspberry Pi - You may purchase one from the Raspberry Pi web site, Digi-Key or RS.
Note that this guide was created on a Pi 2 and cross-tested on a Pi 3 and Pi 4. Other versions of the Raspberry Pi are not covered, and may be utilized only at your own discretion.
- An SD card (8+GB... 16+GB recommended) with the Raspbian operating system installed.
Note that this guide utilizes Raspbian Buster Full. Other OSes are not covered, and may be utilized only at your own discretion.
- A monitor, USB keyboard, USB mouse, and WiFi to interact with the Pi.
Connect Raspberry Pi to ThingWorx
- Step 1: Setup Raspberry Pi
- Step 2: Install the EMS
- Step 3: Create Application Key
- Step 4: Configure the EMS
- Step 5: Launch the EMS
- Step 6: Configure Lua Script Resource (LSR)
- Step 7: Configure Template File (Properties)
- Step 8: Configure Template File (Service)
- Step 9: Run LSR
- Step 10: Bind Remote Thing Properties
- Step 11: View Data from Devices
- Step 12: Connect to Temperature Sensor
- Step 13: Next Steps