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

IoT & Connectivity Tips

Sort by:
    Step 4: Launch IoT Hub Connector   Open a shell or a command prompt window. On a Windows machine, open the command prompt as Administrator. The AZURE_IOT_OPTS environment variable must be set before starting the Azure IoT Hub Connector. Below are sample commands using the default installation directory. On Windows: set AZURE_IOT_OPTS=-Dconfig.file=C:\ThingWorx-Azure-IoT-Connector-<version>\azure-iot-<version>-application\conf\azure-iot.conf -Dlogback.configurationFile=C:\ThingWorx-Azure-IoT-Connector-<version>\azure-iot-<version>-application\conf\logback.xml On Linux: export AZURE_IOT_OPTS="-Dconfig.file=/var/opt/ThingWorx-Azure-IoT-Connector-<version>/azure-iot-<version>-application/conf/azure-iot.conf -Dlogback.configurationFile=/var/opt/ThingWorx-Azure-IoT-Connector-<version>/azure-iot-<version>-application/conf/logback.xml" NOTE: You must run the export command each time you open a shell or command prompt window. Change directories to the bin subdirectory of the Azure IoT Hub Connector installation. Start the Azure IoT Hub Connector with the appropriate command for your operating system. On Windows: azure-iot.bat On Linux: /azureiot   NOTE: On Windows you may have to shorten the installation directory name or move the bin directory closer to the root directory of your system to prevent exceeding the Windows limit on the classpath length. The Connection Server should start with no errors or stack traces displayed. If the program ends, check the following: Java version is 1.8.0, update 92 or greater and is Java(TM) not OpenJDK Open azure-iot.conf and confirm ThingWorx Foundation is set to the correct URL and port. Confirm the platform scheme is ws if http is used to access ThingWorx. Confirm all Azure credentials are correct for your Azure account. In ThingWorx Foundation click the Monitoring tab then click Connection Servers. You should see a server named azure-iot-cxserver-{server-uuid}, where {server-uuid} is a unique identifier that is assigned automatically to the server.     Step 5: Import Device from Azure   With the ThingWorx Azure IoT Connector, you can import into ThingWorx any existing devices that are currently provisioned to the Azure IoT Hub.   Add Device Azure IoT Hub If you have not provisioned any devices to your Azure IoT Hub you can learn more about Azure IoT Hub device identity before following the steps below to create a test device. In your Azure Portal, click All Resources, then select the name of your IoT Hub. Under Explorers click IoT devices, then click + Add. Enter a name for your device, then click Save When the device name appears in the list it is ready to us     Import Device into ThingWorx We will manually execute a service in ThingWorx that will import Azure IoT Hub devices into ThingWorx. In ThingWorx Composer, navigate to the ConnectionServicesHub Thing. Click Services tab and scroll to the ImportAzureIotDevices service and click the execute Arrow.   NOTE: The * in the pattern field will act as a wildcard and import all devices, you can enter a string to match that will only import a subset of all available devices.     Click Execute to import the devices then click Done. Click Things in the left column to see the Things that were created.     Step 6: Set-up and Run Demo   The ThingWorx Azure IoT Connector download includes a Java application that simulates a device connecting to your Azure IoT Hub. A ThingTemplate is also included and can be imported into ThingWorx.   Import Demo Templates In ThingWorx Composer, click Import/Export menu, then click From File and browse to ../demo/edgedevice- demo/platform/entities/CPUDemo_AllEntities.xml     Click Import then click Close when the import successful message is displayed. Create a new Thing using the imported template azureDemo1, enter a name for your Thing and click Save. NOTE: You will enter this name in the demo config file in the next step.   Configure Demo Application In the ../demo/edge-device-demo/conf subdirectory, open the edge-device.conf file with a text editor. Edit the deviceId to be the name of the Thing you created in step 3. Edit the iotHubHostName to use the name of your hub plus the domain: azure-devices.net. For example, sample-iot-hub.azuredevices.net. Edit the registryPolicyKey property to use the Primary Key for the registryReadWrite policy in the Azure IoT Hub. Below is an example configuration: // Azure Edge Device Demo configuration azure-edge-device { // Name of the remote thing on the ThingWorx platform, which should match the Azure Device ID deviceId = "alstestedgething" // Name of the hub host in Azure iotHubHostname = "alsiot.azure-devices.net" // Policy name used by this thing (could require services as well in future) registryPolicyName = "registryReadWrite" // The Key related to the policy above registryPolicyKey = "pzXAi2nonYWsr3R7KVX9WuzV/1234567NZVTuScl/Kg=" } Run Demo Script   Open a shell or Command Prompt, set the EDGE_DEVICE_DEMO_OPTS environment variable to refer to the file you just edited: Linux - export EDGE_DEVICE_DEMO_OPTS="-Dconfig.file=../conf/edge-device.conf" Windows - set EDGE_DEVICE_DEMO_OPTS="-Dconfig.file=../conf/edge-device.conf" Launch the demo from the ../demo/edge-device-demo/bin subdirectory, using the edge-device-demo command. Return to the ThingWorx Composer and open the Properties page of the Azure Thing that you created previously. Click the refresh button to see the properties change every five seconds. Open the azure-iot-demo Mashup and view the Load Average and CPU gauges, and the increases in the values of the Cycle and Uptime fields. NOTE: If the edgedevice-demo is running on Windows, the Load Average does not register. Step 7: Next Steps   Congratulations! You've successfully completed the Connect Azure IoT Hub to ThingWorx Quickstart. By following the steps in this lesson, you imported a device created in Azure into ThingWorx and saw how data from an Azure device could be used in a ThingWorx Mashup. Learn More We recommend the following resources to continue your learning experience: Capability Guide Connect Choose a Connectivity Method Build Design Your Data Model Experience Create Your Application UI   Additional Resources   If you have questions, issues, or need additional information, refer to:   Resource Link Community Developer Community Forum Support Getting Started with ThingWorx  
View full tip
This has been moved to its new home in the Augmented Reality Category in the PTC Community.
View full tip
  Step 5: Add Data   We've added a Pareto Chart Widget to the Mashup, but we still need to bring in backend data.   Ensure the top-right Data tab is active.   Click the green + button.   In the Entity field, search for and select TIPC_Thing. In the Services field, type getprop. Click the right arrow beside GetProperties. On the right, check Execute on Load.   In the bottom-right of the pop-up, click Done.   Under the Data tab on the right, expand GetProperties.   Drag-and-drop Things_TIPC_Thing> GetProperties > InfoTable_Property onto the Pareto Chart.   On the Select Binding Target pop-up, click Data.   With the Pareto Chart selected in the central Canvas area, ensure the Properties tab is active in the bottom-left.   In the Filter field, type xaxis.   In the XAxisField, search for and select month.   At the top, click Save.     Step 6: View Mashup   Up to this point, we've created a Data Shape to format the columns of an Info Table Property. You then created a Thing, as well as an Info Table Property formatted by the Data Shape. As a test, you added some manually-entered data to the Info Table. After creating a Mashup, you added a Pareto Chart Widget and tied it to that backend data.   The only thing left to do is to visualize your GUI.    Ensure that you're on the Design tab of the TIPC_Mashup.   At the top, click View Mashup.   The end result is a visualization of how each of your main issues contribute to your overall downtime.   In particular, this test data shows that excess_temperature is the primary cause of issues, regardless of month.    You could now connect the backend data-storage to live-data from the robotic welding arm to begin an actual determination of your issues.       Step 7: Next Steps   Congratulations! You've successfully completed the Track Issues with Pareto Chart guide, and learned how to:   Create a Data Shape Create a Thing Create an Info Table Property Populate an Info Table with appropriate data for a Pareto Chart Create a Mashup Utilize a Pareto Chart to display issue-aggregation    Learn More   We recommend the following resources to continue your learning experience: Capability  Guide Manage How to Display Data in Charts Additional Resources   If you have questions, issues, or need additional information, refer to: Resource Link Community Developer Community Forum Support Pareto Chart Help  
View full tip
Introduction The JavaScript Debugger, first introduced in ThingWorx 10.0, is now generally available with the 10.1 release. This feature is now production-ready and provides a fully integrated debugging experience within the ThingWorx platform. It allows developers to build, test, and troubleshoot logic directly in Composer with greater efficiency and control. The debugger is built into ThingWorx Composer, enabling developers to step through code, set breakpoints, and view live variable data within the same environment. This integrated approach simplifies development workflows and improves both code quality and delivery speed. Bringing Real-Time Debugging to the Platform The feature is powered by a dedicated Debugging Subsystem that manages sessions, breakpoints, and state inspection in a structured way. Developers can initiate and control debugging sessions directly, while the platform automatically handles performance and stability through session timeouts and resource management. If a session becomes idle or runs for too long, ThingWorx automatically terminates it to preserve performance. The Variable Scope Window displays both ThingWorx base and complex variable types in real time. Developers can inspect and modify variable values as code executes, removing the need to rerun scripts for minor changes. Watch Windows enable tracking of expressions dynamically, improving visibility into logic flow. Security is built into the debugger. Access is limited to authorized users, with design-time and runtime permission controls that protect sensitive runtime data and maintain system integrity during testing. Smart, Intuitive, and Streamlined The debugger is designed to make troubleshooting more transparent and efficient. The call stack view provides detailed execution traces in JSON format, helping developers understand service-to-service interactions across complex workflows. Breakpoints can be defined across services, ThingTemplates, and ThingShapes, allowing visibility across the model. Developers can use keyboard shortcuts to control debugging steps such as step-in, step-over, and continue. JSON and InfoTable visualization capabilities allow structured data to be viewed and edited directly in the debugger interface. This provides a more interactive and contextual testing environment.   All functionality is available within the ThingWorx Composer interface. There is no external dependency or additional setup required—developers can enable the debugger in platform settings, restart the environment, and begin debugging immediately. Feature Summary JS Debugger Features with ThingWorx 10.1   Capability Description Integrated Debugging Native JavaScript debugging directly within ThingWorx Composer. Debugging Subsystem Manages sessions, breakpoints, and execution state efficiently. Variable Scope Window Real-time variable inspection and modification. Secure Permissions Role-based access to debugging tools and logs. Breakpoint & Call Stack View Trace code execution across entities in JSON format. Auto Timeout Management Sessions terminate automatically to preserve performance. JSON & InfoTable Viewer Visual inspection and editing of data structures. Why Upgrade to ThingWorx 10.1 The JavaScript Debugger in ThingWorx 10.1 enhances the development process with an integrated, secure, and modern debugging environment. It helps teams reduce development time, improve reliability, and simplify issue resolution.   Upgrade to ThingWorx 10.1 to experience a streamlined, secure, and developer-first debugging workflow that will transform how you build and maintain your industrial IoT applications. You can read about what Private Preview, Public Preview, and General Availability mean in ThingWorx here Vineet Khokhar Principal Product Manager, IoT Security Stay tuned for more updates as we approach the release of ThingWorx 10.1, and as always, in case of issues, feel free to reach out to <support.ptc.com>
View full tip
Introduction With ThingWorx 10.1, we're excited to announce MQTT support for IoT streams for data egress as Private Preview. This is a significant value add that allows ThingWorx to continue to be used as a DataOps layer for end-to-end industrial data management. With its ability to ingest data from disparate sources, contextualize and transform it, and send data in a custom-defined format over Kafka, and now MQTT, ThingWorx enables real-time consumption of data by end applications, allowing necessary interoperability without the worry of data lock-in. Especially in the age of AI, customers can use ThingWorx not only to ingest data from connected machines, systems, and people but also to push processed, contextualized, AI-ready data outward. This enables external systems, data lakes, cloud systems, or UNS layers to consume the data in real time, making IT/OT convergence seamless. With this capability, having a Sparkplug B connector built in, users can use ThingWorx to directly load contextualized data onto MQTT brokers that is transformed into Sparkplug B format, helping them achieve their goals for establishing a decoupled, modular, and modern manufacturing architecture allowing complete access and traceability of their own data. Modern Manufacturing Architecture   Built for Reliability and Scale MQTT (Message Queuing Telemetry Transport) is a lightweight, publish-subscribe protocol designed for IoT efficiency. The ThingWorx 10.1 implementation uses the Durable Queue Framework, the same foundation behind IoT Streams, to ensure reliable message delivery even under network fluctuations. Developers can configure MQTTQueueProviders to define topics and manage data publishing with minimal setup. Each queue can dynamically format its topic names, ensuring scalable routing for multiple devices or templates. The system supports both MQTT 3.1.1 and 5.0 for broad compatibility. Seamless Setup, Strong Integration New ThingWorx entities such as SparkplugBQueueProvider, SparkplugBDevice ThingShape, and related services simplify setup and connection management. Administrators can create and associate IoT Streams with MQTT queues in a few clicks, route property updates to external topics, and monitor connection health directly within Composer. This unified workflow makes it easy to connect ThingWorx data to external analytics systems, industrial data lakes, or cloud-based applications using low-code tools from ThingWorx. Adding Structure with Sparkplug B Beyond raw MQTT data, ThingWorx now supports Sparkplug B, an open industrial data specification that brings structure and state awareness to MQTT communications. Sparkplug B defines a common topic format and uses birth and death messages to indicate device lifecycle events, ensuring that systems always know which devices are online or offline. Payloads are serialized using Protocol Buffers (Protobuf) for lightweight, high-performance communication, making it ideal for bandwidth-constrained environments. Together, these enhancements position ThingWorx as both a data receiver and publisher, a core participant in UNS-aligned ecosystems where structured MQTT data flows freely across IT and OT systems, simplifying IT/OT convergence. Feature Summary   Capability Description MQTT Publishing Send Thing property data to brokers like HiveMQ or Mosquitto. Sparkplug B Support Structured MQTT with standardized topics and lifecycle management. Durable Queue Integration Ensures reliable, ordered message delivery. New Queue Providers MQTTQueueProvider and SparkplugBQueueProvider for outbound data. Unified Namespace Alignment Enables ThingWorx to act as a UNS-compliant data source. Join the Private Preview The MQTT Egress capability extends ThingWorx interoperability beyond ingestion, allowing contextualized data to be shared across the enterprise or to the cloud. You can now join the Private Preview to gain early access to this key building block of the future UNS-enabled ThingWorx ecosystem and contribute feedback that helps shape its evolution. To understand what Private Preview means in ThingWorx, check this overview here Vineet Khokhar Principal Product Manager, IoT Security Stay tuned for more updates as we approach the release of ThingWorx 10.1, and as always, in case of issues, feel free to reach out to <support.ptc.com>
View full tip
Announcements