IoT & Connectivity Tips | ThingWorx & Kepware PTC
Recently active
Step 5: Import ExtensionStep 6: Create File RepositoryStep 7: Create .csv Export ServiceStep 8: Export the Engine DataStep 9: Next Steps Step 5: Import Extension Now that we have a valid dataset, we want to export it as a .csv file, which can be imported into ThingWorx Analytics in a future guide to generate an analytical model. An easy way to do this is with the CSV Parser Extension, which you’ll now import. 1. Download the CSV Parser Extension from our third party provider IQNOX. Note: An account is required but the download is free. 2. At the bottom-left, click Import/Export. 3. On the drop-down, click Import. 4. For Import Option, select Extension. 5. Click Browse and navigate to the extension you downloaded above. 6. Click Open. 7. Click Import. 8. Click&nbs
Guide ConceptStep 1: Examples and StrategyStep 2: Setup Organizations and DepartmentsStep 3: Setup Users and User GroupsStep 4: Setup Permissions Setup methods and schemes to secure your data Guide Concept Securing data is often something thought of after an application is designed. It should always be the first and more important. These concepts and steps will allow you to focus on development of your application while still allowing the ability to utilize the power of ThingWorx! We will teach you how to design a secure environment and application from scratch You'll learn how to How to design and implement organizations and organization sectionsCreating secure User Groups with specific goalsLimit access to resources NOTE: The estimated time to complete this guide is 30 minutes Step 1: Examples and Strategy If you’d like to skip ahead, download and unzip the completed example of the Aerospace and Defense lea
Step 5: Limiting Composer AccessStep 6: Creating Clearance LevelsStep 7: Next Steps Step 5: Limiting Composer Access If you would like to limit a User even more, there are a few things you can do. Go back to the Administrator account and open one of the accounts we created, such as User.OtherAgencies, you will notice the Enabled and Locked checkboxes. Enabled allows you to set whether an account can be used in ThingWorx during runtime. Locked dictates whether an account can be logged into at all. Suppose we would like for the user to only see emptiness when they try to access the Composer. Follow the below steps to limit ThingWorx Composer access even more. 1. Open one of the Users we created earlier, ie User.OtherAgencies and click on the User Profile tab. The user profile configuration allows an administrator to control which categories and entities should be displayed for an individual User. 2. You will see various sections and checkb
GUIDE CONCEPTStep 1: IntroductionStep 2: Format MicroSDHC CardStep 3: Flash MicroSDHC Card Connect a Raspberry Pi to ThingWorx using the Edge MicroServer (EMS). GUIDE CONCEPT This project will utilize the Edge MicroServer (EMS) to connect ThingWorx Foundation to a Raspberry Pi. YOU'LL LEARN HOW TO Set up Raspberry PiInstall, configure, and launch the Edge MicroServer (EMS)Connect a remote device to ThingWorx Foundation NOTE: The estimated time to complete all parts of this guide is 60 minutes. Step 1: Introduction A Raspberry Pi is a small, single-board computer that utilizes an ARM processor and typically runs a variant of Linux. Due to its small size, relatively affordable cost, and ability to run a full operating system, the Pi is a near-ideal device to utilize as a Proof-of-Concept (PoC) IoT Edge device. In addition, there is a version of the ThingWorx Edge MicroServer (EMS) built to work on ARM
Step 4: Connect Peripherals and Initial ConfigurationStep 5: Install EMS Step 4: Connect Peripherals and Initial Configuration Connect Peripherals Now that we have a working microsdhc flash card with the Raspbian OS, we want to insert it into the Pi, as well as connect our other peripherals and power. Remove the microsdhc card from the adapter. With the power supply NOT connected, insert the microsdhc card into the Pi.Note that it may help to turn the Pi over. With the power supply NOT connected to a wall-socket, connect the power, monitor, USB keyboard, and USB mouse. Plug-in the power-supply to a wall-socket and wait for the Pi to boot. Pi Initial Configuration The Raspbian OS needs some initial configuration to set things such as your location and to connect to a WiFi n
Step 6: Configure EMSStep 7: Connect EMS Step 6: Configure EMS The EMS consists of two distinct components that perform slightly different operations and communicate with each other. The first is the EMS itself which creates an AlwaysOn™ connection to ThingWorx Foundation. It binds Things to the platform and automatically provides features like file transfer and tunneling. The second is the Lua Script Resource (LSR). It is used as a scripting language so that you can add Properties, Services, and Events to the Things that you create in the EMS. Now that you have "installed" (i.e. downloaded, unzipped, and moved to an appropriate location) the EMS on your Raspberry Pi, it needs to be configured. The primary method of doing so is via the config.json and config.lua files. In this step, we'll create these files and paste some JSON / Lua configuration
Step 8: Verify ConnectivityStep 9: Next Steps Step 8: Verify Connectivity The EMS is now attempting to talk to ThingWorx Foundation. However, ThingWorx does not have detailed information about the Edge device that is attempting to connect to it, so it will show up in the Unbound category of Remote Things. Open ThingWorx Composer. On the left, click Monitoring. Click Status -> Remote Things. Click Unbound. Confirm that you see the PiThing listed in the Unbound section.NOTE: The name PiThing comes from the config.lua script. PiThing is simply the name that is in that script, hence the name that you see in ThingWorx. To change the name of the device, you could stop both wsems and luaScriptResource, edit config.lua to use a different Thing name other than PiThing, and then restart both of the EMS programs. At that point, the Thing showing up in Remot
GUIDE CONCEPTStep 1: Example and StrategyStep 2: Setting Mashup PermissionsStep 3: Designing Tracked MashupsStep 4: Viewing and Filtering LogsStep 5: Next Steps Setup user interfaces and ways to track events GUIDE CONCEPT Being able to view your logs is an important part of knowing what is happening in your system. You can't keep things secure if you don't know who is doing what. These concepts and steps will allow you to focus on development of your application while still allowing the ability to utilize the power of ThingWorx! We will teach you how to access the system in a way you might not have done much of before. You'll learn how to How to design and implement meaningful user interfacesView different logs and search for dataNOTE: This guide's content aligns with ThingWorx 9.3. The estimated time to complete this guide is 30 minutes Step 1: Example and Strategy If you’d like to skip ahead, download the completed example of the&nbs
GUIDE CONCEPTStep 1: Overview DiagramStep 2: Configure Azure IoT HubStep 3: Install Azure Connector Use the ThingWorx Azure IoT Hub Connector with simulated appliances. GUIDE CONCEPT This project will introduce how to integrate ThingWorx with Azure IoT Hub. The combination of these two platforms extends the ThingWorx utilities to Azure IoT Hub edge devices and allows integration with Azure Blob Storage accounts. Following the steps in this guide, you will install the ThingWorx Azure IoT Hub Connector and run a simulated Azure device. We will teach you how to build powerful and scalable IoT applications by integrating ThingWorx and Azure IoT Hub. YOU'LL LEARN HOW TO Install, configure, and run the ThingWorx Azure IoT Hub ConnectorImport devices that exist in Azure into ThingWorxConnect a simulated Azure device to ThingWorx Foundation server NOTE: This guide's content aligns with ThingWorx 9.3. The estimated time to complete all parts of this guide
Step 4: Launch IoT Hub ConnectorStep 5: Import Device from AzureStep 6: Set-up and Run DemoStep 7: Next Steps 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.xmlOn 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>-a
GUIDE CONCEPTStep 1: Create Data ShapeStep 2: Create ThingStep 3: Create Mashup Display project burn up/down via a convenient Mashup Widget. GUIDE CONCEPT Long term projects need to be managed. As a project is scoped, requirements get defined and delivery-timeframes are estimated. As work is done, requirements are completed. One way to track this project progress is with a Waterfall Chart. This guide will show you how to utilize a Waterfall Chart Widget to easily display the project workflow. YOU'LL LEARN HOW TO Create a Data ShapeCreate a ThingCreate an Info Table PropertyPopulate an Info Table with appropriate data for a Waterfall ChartCreate a MashupUtilize a Waterfall Chart to display project progress NOTE: This guide's content aligns with ThingWorx 9.3. The estimated time to complete this guide is 30 minutes Step 1: Create Data Shape In this scenario, we'll store the Waterfall Chart's data in a Pro
Step 4: Add DataStep 5: View MashupStep 6: Next Steps Step 4: Add Data We've added a Waterfall 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 TPWC_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_TPWC_Thing > GetProperties > InfoTable_Property onto the Waterfall Chart. On the Select Binding Target pop-up, click Data. Widget Properties With the Waterfall Chart bound to data, we now just need to configure a few of the chart's Properties.With the 
GUIDE CONCEPTStep 1: Completed ExampleStep 2: Sending JSON Based Requests Learn how to send and receive JSON and XML payloads to SOAP and REST services. GUIDE CONCEPT This project will introduce how to create services that can send and receive XML and JSON payloads. Following the steps in this guide, you will develop services to handle, send, and receive XML and JSON. We will teach you how to use the ThingWorx Platform to handle REST requests and send payload for external SOAP and REST services. YOU'LL LEARN HOW TO Efficiently handle, send, and receive XML and JSON in ThingWorx Make requests to external REST services Make requests to external SOAP services NOTE: The estimated time to complete all parts of this guide is 60 minutes. Step 1: Completed Example Download the attached JSONXMLEntities.zip from attached files and import it into ThingWorx Composer. In this tutorial, you will
Step 3: Sending and Receiving JSON ObjectsStep 4: Sending XML Based Requests Step 3 : Sending and Receiving JSON Objects The ThingWorx platform handles REST requests by default. This enables all services to be outsourced to REST requests based on the permissions of the user. Nevertheless, part of the problem with allowing the default JSON result might be the organization of the response. For example, making a request to a service with an InfoTable response will return information for the DataShape used by the InfoTable and a 'rows' field containing the data of the InFoTable. This can be troublesome or a nuisance when creating efficient B2B communication or parsers for the ThingWorx response. Receiving JSON First, let's handle the necessary security measures and configure our permissions to create a new User and Application Key. Then, handle how to parse a JSON object in the body of the POST REST request to the ThingWorx
Step 5: Handling and Receiving XML ObjectsStep 6: Next Steps Step 5: Handling and Receiving XML Objects Working with JSON with JavaScript can be easy and simple. Working with XML while using JavaScript can be more challenging, because XML is so tightly structured. This can affect how you setup code and how you use the Rhino JavaScript engine for your needs. NOTE: Examples of these services can be found in the ** XMLProcessorThing** entity, which is provided in the download. Handling XML XML can be handled using two methods. The first method is converting the XML string to an XML object. The second methos is creating an XML object, then assigning the raw XML to that variable. The simple XML object is as follows: <note> <to>Janice</to> <from>Billy</from> <heading>Please Remind Me</heading> <body>Take out the trash this weekend!</body> </note> First, create the entity you will use for both
GUIDE CONCEPTStep 1: Install Twilio ExtensionStep 2: Create Twilio ThingStep 3: Configure Twilio ThingStep 4: Test Twilio ThingStep 5: Sample Alerting AppStep 6: Next Steps Send voice and text messages with Twilio. GUIDE CONCEPT This project will demonstrate how you can create applications that provide information to users, even when they are away from their computer. Users who are on the go can benefit from your application by receiving text and voice messages. Following the steps in this guide, you will learn how to configure and use the Twilio Widget and explore it’s ability to send messages. We will teach you how data can be used to send pertinent information to any cell phone. YOU'LL LEARN HOW TO Download and import the Twilio Widget extensionCreate a Thing using the Twilio Thing TemplateConfigure the Twilio Thing to use your Twilio accountSend text messages using a Service NOTE: The estimated time to complete this guide is 30 minutes.
GUIDE CONCEPTStep 1: IntroductionStep 2: Create PrerequisitesStep 3: Create ThingStep 4: Set Properties Use the Statistical Calculation Thing Shape to Execute Common Statistical Functions GUIDE CONCEPT This project will introduce the Statistical Calculation Thing Shape. The steps in this guide outline how to utilize Descriptive Analytics in ThingWorx Analytics to perform common mathematical analyses on data sets. You will learn how to use the Statistical Calculation Thing Shape's built-in functionality to calculate the mean, median, mode, and other useful insights. YOU'LL LEARN HOW TO Create a Value Stream and Data ShapeCreate a Thing with the Statistical Calculation Thing ShapeModify a Property to record values to the Value StreamUtilize various built-in services to perform the Mean, Median, Mode, and Standard Deviation calculations NOTE: The estimated time to complete this guide is 30 minutes. Step 1: Introduction Descriptive A
Step 5: Format Timed ValuesStep 6: Calculation ServicesStep 7: Other OptionsStep 8: Next Steps Step 5: Format Timed Values At the top, click the Services section of scts_thing. In the Ihnerited Services section, you will see the built-in services of the Statistical Calculation Thing Shape. These services can perform a variety of analytical calculations. Timed Values Service The Statistical Calculation Thing Shape can only perform analytics operations on time-series datasets. However, accessing a time-series Value Stream can have a performance hit on the system. Instead, a Property with an Info Table using a timestamp/value Data Shape is used as the universal input to each built-in service of the Statistical Calculation Thing Shape. For efficiency, we only reference the Value Stream once to create a formatted timedValues that is used as an input to all other service calls. At the top, click Services. Click +
GUIDE CONCEPTStep 1: ScenarioStep 2: Create Data ShapeStep 3: Create ThingStep 4: Create Mashup Use the Pareto Chart Widget to visualize how issues compound to cause problems. GUIDE CONCEPT The Pareto Chart Widget is a useful method of displaying aggregate information. In particular, it is often used to display multiple issues and how they combine to form an overall, larger problem. This can be helpful when trying to determine "easy wins" by pointing out where your efforts will have the greatest impact. YOU'LL LEARN HOW TO Create a Data ShapeCreate a ThingCreate an Info Table PropertyPopulate an Info Table with appropriate data for a Pareto ChartCreate a MashupUtilize a Pareto Chart to display issue-aggregation NOTE: This guide's content aligns with ThingWorx 9.3. The estimated time to complete this guide is 30 minutes Step 1: Scenario In this guide, we'll assume a scenario where a factory i
Step 5: Add DataStep 6: View MashupStep 7: Next Steps 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 Filt
Step 4: Scheduling Automated ProcessesStep 5: Next Steps Step 4: Scheduling Automated Processes There are many processed that are handled by a corporation. With something as important as food, there is a lot of red tape and regulation. We will further our Fizos application to monitor food temperatures, expiration dates, product state, and other issues that are factors into the condition of the product. To reduce waste and increase the safety of the food being produced, our application will create entities to model our products after and create a high-level rules engine for the usage and handling of these products. Let's start with implementing the task of factory inspections. To implement this, we'll use a scheduler to kickstart our daily process and start filling in some of the necessary data. Schedulers are a great way to execute routine processed. The execute using a configuration similar to that of a cron job on the Linux operating system. In the next
Guide ConceptStep 1: Completed ExampleStep 2: Utilizing IoT in the Food Industry Learn how to create solutions the can help take you to the next level Guide Concept This project will introduce more complex aspects of the ThingWorx application and solution building. Following the steps in this guide, you will develop your own IoT application or get a jump start in how to utilize ThingWorx for your needs. We will teach you how to create a focused rules engine or service level logic to be used with the ThingWorx Platform. You'll learn how to Create automated processing, data, and endpoints that can handle that data without manual interactionUse services, alerts, and subscriptions to increase performanceBegin making your data model and cornerstone entities to understand how a complex business logic is built NOTE: The estimated time to complete this guide is 60 minutes Step 1: Completed Example Download the attached F
GUIDE CONCEPTStep 1: Completed ExampleStep 2: Connect to External DatabaseStep 3: Query Data from External Database Learn how to connect, query, insert, and handle data from an external database. GUIDE CONCEPT This project will introduce how to utilize and incorporate an external database with the ThingWorx Platform. Following the steps in this guide, you will connect the ThingWorx Platform to a database, insert data, execute stored procedures, and query data. YOU'LL LEARN HOW TO Connect ThingWorx to external databasesQuery databases and and handling resultsInsert data and running stored procedures NOTE: The estimated time to complete this guide is 60 minutes. Step 1: Completed Example Download the attached DatabaseApplication.zip and import it into ThingWorx Composer. This download will provide examples that can be used as a reference or as a final copy as you walk through this guide. In this tutorial,
Step 4: Write Data to External DatabaseStep 5: Executing Stored ProceduresStep 6: Next Steps Step 4: Write Data to External DatabaseYou’ve connected to the database, you’re able to query the database. Now let’s handle inserting new data into the database. The update statements and data shown below are based on the table scripts provided in the download. Examples of how the ThingWorx entity should look can be seen in the SQLServerDatabaseController and OracleDatabaseController entities.Running an InsertFollow the steps below to set up a helper service to perform queries for the database. While other services might generate the query to be used, this helper service will be your shared execution service.In the DatabaseController entity, go to the Services tab. Create a new service of type SQL (Command) called RunDatabaseCommand.Keep the Output as Integer.Add the following parameter: Name &nbs
GUIDE CONCEPTStep 1: Examples and StrategyStep 2: Database ConnectionsStep 3: Query Data from External Database Connect to an existing database and design a connected data model. GUIDE CONCEPT There are times you already have your database designed and only need to integrate the ThingWorx environment. These concepts and steps will allow you to focus on development of your application while still allowing the ability to utilize the power of ThingWorx! We will teach you how to create a data model around your database design and connect to that database. YOU'LL LEARN HOW TO How to connect an external database and created services to be used with itHow to design and implement a new data model based on an external resourceUsing data models with database services Note: The estimated time to complete this guide is 30 minutes. Step 1: Examples and Strategy If you’d like to skip ahead, download and unzip the completed example o
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.