IoT & Connectivity Tips | ThingWorx & Kepware PTC
Recently active
Troubleshooting platform issues is generally done by using a layer approach, similar to a simplified OSI Model. From bottom to top, the following layers represent the areas to analyze during each step:1. Physical (Server, power, wired connections): check the server status and condition, CPU and memory levels.2. Software (Operating system, tomcat, java versions, compatibility, and configuration): refer to the compatibility matrix to ensure the requirements are met; verify Tomcat java configuration. * Note: Tomcat manager, server status, conveniently provides this information in one place.3. Network: ensure proper connectivity, port availability, firewall configuration, and additional security, if applicable.4. Application.The main focus of this blog post will concentrate on the step 4. As the Thingworx application is driven by Tomcat, first available tools coming "out-of-the-box" is the built-in Tomcat manager app. Clicking on the "Server Status" provides t
There is a test on connection server 7.2. With 4core CPU and 8GB memory, we sent 1000 http requests every second and there is 5% http request losted. After changing configuration for connection server, the lost rate drop to 0.86%.Here are some suggestions to improve connection server performanceReset parameters in connection server configuration file cxserver.conf. (..\conf\cxserver.conf)Adjust parameters max-connection-pool-size and max-wait-queue-size Change the default JVM settings. (increase memory for JVM properly)In this case, I created a new file named startMyConnectionServer.bat file with below code:SET CONNECTION_SERVER_HOME=C:\connection-server-7.2.0.2095SET JAVA_OPTS=-Xms2G -Xmx2G%CONNECTION_SERVER_HOME%\bin\connection-server.batIncrease connection server's hardware (memory, CPU cores)Minimum system requirement 16GB memory, 4 CPU cores.Refer to ThingWorx Core 8.0 System Requirements for more hardware information
This post will cover the challenges I've had while going through the setup of .NET SDK based ADO Service for SQL Server DB Connection. I'll be starting from the scratch on setting up the service for this to present full picture on the setup.Pre-requisite1. Download and install Microsoft SQL Server Express or Enterprise edition, for testing I worked with Express edition : https://www.microsoft.com/en-us/sql-server/sql-server-editions-express2. Once installed, it's imperative that the TCP/IP Protocol is enabled in the SQL Server Configuration Manager for the SQL Server3. Download ThingWorx Edge ADO Service from PTC Software download pageWhat is ThingWorx ADO Service?An ActiveX Data Object service allowing connection to a Microsoft database source e.g. MS SQL Server, MS Excel or MS .NET application to the ThingWorx platform. It is based on the ThingWorx .NET SDK.Installing ADO ServiceLet me begin by saying this is just a summary, in a crude way of course, of ThingWorx Edge ADO Service Con
Connecting Existing Things to ThingWorx Industrial Gateway for Anomaly Detection In this Video you will learn how to : - To bind a property of an existing entity to the KEPSserverEX Data Feed - To create an Alert on that property and monitor it's behavior Updated Link for access to this video: Connecting Existing Things to ThingWorx Industrial Gateway for Anomaly Detection
This has been moved to its new home in the Augmented Reality Category in the PTC Community.
This is a useful trick for rolling up metrics in Thingworx across various levels of a hierarchy by using Networks, ThingShapes, and recursive service definitions.Say that you have a hierachy of Things in your model such as a Global view, a Region view, and a Store view -- this could be a Mfg Plant, a Building, an Asset, etc; whatever the core metric producing Thing is in your model -- where your Store has KPIs that you want to roll up across regions and globally.First, create a template for each of your hierarchical levels. In my case it is a GlobalTemplate, RegionalTemplate, and StoreTemplate. Add a property to your StoreTemplate that will be the KPI.Now, create a Thing for the Globe, and each of your Regions and Stores. Add them to a hierachical Network as such:Now, we need to create a ThingShape to aggregate our KPIs and apply it to the Global, Regional, and Store template.Now we will define a recursive funciton on our ThingShape called GetKPI and define it with the following://def
Please note that the below configuration is intended for testing purposes only. Make sure that your final deployment is within your business security policies.The installation guide can be found at: http://support.ptc.com/WCMS/files/173161/en/ThingWorxDockerInstaller.pdfPostgres:Reference the Installation Guide above for a supported version of PostgresOnce deployed, configure it to support remote connections:Navigate to: <PostgresInstallPoint>\dataOpen the following with a text editor: pg_hba.confFind the line with IPv4 local connectionsChange 127.0.0.1/32 to 0.0.0.0/0Restart PostgreSQL serverNOTE: This could open up security vulnerabilities to the database, so make sure you take appropriate security measures if the data will be sensitiveDocker:Find the appropriate Docker platform for your OSDocker Community EditionFor Windows Server 2016, there is a download for the Edge (Windows Server 2016) under the above link -> Docker CE for Windows -> And then scroll down a lit
Sometimes it's needed to delete the existing PostgreSQL database, especially if a different major version was installed at first by mistake (for example, 9.6 in place of the supported 9.4). Then it's absolutely necessary to ensure the database is fully deleted and there is no db ghosts.The proper way to uninstall is to go to the postgresql server installation directory and find one uninstall-postgresql file. Double click on the Uninstall-postgresql file to run the un-installer- it willun-install postgresql.In case the uninstall wasn't performed correctly, below are the manual steps to clean it up. One sign of existing "ghost" db, is randomly seeing a second PostgreSQL server in the pgAdmin III or experiencing "error"-less problems when running the ThingWorx installation scripts.To uninstall manually,in this example we will use 9.6 as the version to delete - please replace with your own where needed:Remove the postgresql server installation directory. (rd /s /q "C:\Program Files\Postgre
This example provides the ability to generate a simple entity structure and some historical data for each entity. Historical data is run through a ThingWorx service to generate histogram data for display in a bar chart. The provided ThingWorx entities and PDF document provide the example as well as documentation.
IntroductionSAP HANA database is among the several options available for ThingWorx as persistence provider, in this blog I'll share the experience and challenges I had while setting up the SAP HANA and then configuring it to run as Persistence Provider for ThingWorxPre-requisiteEclipse Mars or higherSAP Hana Express Edition 2.0 ThingWorx Hana Persistence Provider PackageSetting up SAP HanaSAP Hana Express Edition 2.0 is freely available from SAP via the download with a pre-built machine with SUSE Enterprise OS. For this blog I used the SAP Hana Express Edition 2.0 Server only version while downloading the pre-built VM from SAPDownload the Server only or Server + Application VM from the SAP's website 2. Unzip and open the hxe.ova (file name will differ if you are downloading the server + application VM) file in one of the hyper-visor, in my case I'll be using VMWare Workstation, but should work just fine with others e.g. Oracle VirtualBo
Learning is a wide domain and thus, the field of machine learning has branched into several sub fields dealing with different types of learning tasks.Supervised vs Unsupervised LearningSince learning involves an interaction between the learner and the environment, we can divide tasks according to the nature of the interaction. Consider the task of detecting the hand written numbers among the lots of digital numbers vs task of anomaly detection.For the hand-written numbers detection task, we consider a setting in which the learner receives a set of training numbers, labeled as ‘Hand-Written’ and ‘Digital’. On the basis of such training, the learner should figure out a rule for labeling a newly arriving number.In contrast, for the task of anomaly detection, all the learner gets, as a training is a large set of numbers, without any labels on it, and the learner’s task is to detect ‘unusual’ numbers.Consider learning as a process of ‘using the experience to gain expertise’. Supervised lear
Follow these steps to restart the ThingWorx Server, then to verify that all install services are running:1. Open the ThingWorx Server Properties configuration application. To locate this application in Windows Server edition operating systems, search for "Configure PTC Servelet Engine"; or the application can be launched from the Windows Explorer. The default install directory is:<ThingWorx install path>\ThingWorxManufacturingApps\PTC_Servlet_Engine\bin\thingworxServerw.exe2. Use the controls in the General tab to Stop and then Start this service.3. Now open the Windows Services console (services.msc) and verify these four services are installed and running: a. ThingWatcherResult b. ThingWatcherTraining c. Thingworx Server d. ThingworxPostqresql_Service-PostgreSQL_Server9.4
Check out this new KCS article which links to all known best practice documents available for ThingWorx. This article will get larger in time as more articles are published related to the Dos and Don'ts of building an IoT application! Do you know when to use timers, and where to implement their subscriptions? How about ensuring info tables are used at the proper time, and data tables at others? Pesky performance issues wherein ThingWorx runs slow for apparently no reason? All of these questions and more are addressed here!
Persistent properties are stored in ThingWorx database while non-persistent properties are stored in memory. This means that the persistent values do not get erased or deleted if the thing restarts or platform restarts.The persistent properties can also be retrieved in the same way as non-persistent properties.To explain better how we can retrieve persistent data, please consider the below example:I took a device group which has multiple devices and defined 2 persistent properties. One is serial number and the other is firmware version number. Now in a mashup builder, the user gives the serial number and the corresponding firmware version will be retrieved. I achieved this by writing services for that thing.Created a Data shape with the name DeviceData and defined two filed definitions. One is Serial number and the other is firmware version.Created a thing template with the name DevGroup.Added a property in the thing template with the name DeviceData and selected the basetype as info t
Yes, the ThingWorx Manufacturing apps can be imported as ThingWorx extensions into an existing ThingWorx Platform install (v8.0.1). ThingWorx Manufacturing Apps are imported as a ThingWorx extension for all instances other than the Express and Developer Edition licenses.Note: If you ran the Express installer, you cannot import ThingWorx Manufacturing Apps as a ThingWorx extension.Instructions for importing these are included with the download, or are also available here: Not authorized to view the specified document 3992
This video will provide you with a brief introduction to the New Composer interface, which has been made available in the 7.4 and later releases of the ThingWorx Platform. For complete details on what functionality is available within this next generation composer interface, and to also see what lies ahead on our road map, please refer to the following post in the ThingWorx Community:NG Composer feature availability
I've been working with the 7.x and 8.x versions of Thingworx over the last several months doing integrations. So I have a few development instances I've been working with. I'd like to go over some of the issues I've encountered and provide some potential best practices around how you work with Thingworx in development mode and transition to production.Typically, I'll create an instance and develop the integration using the Administrator user which is the only user created as you start up Thingworx instances. Lately, I've been having trouble with a lot of authentication failures as I build.Problem number 1: The new User Lockout feature.Around 7.2 a new User Lockout feature was added to Thingworx to help prevent brute-force cracking of passwords. You now are allowed only so many authentication failures in a given period of time before the user is automatically put in lock mode for a number of minutes. Unfortunately, (but realistically in a more secure manner), a lockout appears as more a
The most common cause for this is a shortage of available RAM. It may be necessary to increase the available RAM or install additional cores. Please refer to the minimum install requirements listed here:What are the minimum Hardware and System requirements for installing the ThingWorx Manufacturing Apps?
There are a few recommended troubleshooting steps to alleviate this:1. The best practice is to install without an existing Tomcat implementation. Verify whether Tomcat is currently installed on this PC. If so, uninstall Tomcat and run the installer again.2. Assign a different port for the servlet engine. This can be changed within the server.xml file located here:<Install path>\ThingWorxManufacturingApps\PTC_Servelet_Engine\conf\server.xml3. If the installer has stopped at approximately 90% complete, and 5 minutes have elapsed, start the ThingWorx Servlet Engine Service manually from this directory in the Windows Explorer:<Install path>\ThingWorxManufacturingApps\PTC_Servlet_Engine\bin\thingworxServerw.exe4. The Servlet Engine log files can be used for advanced troubleshooting. They are located in this directory by default:<Install path>\ThingWorxManufacturingApps\PTC_Servlet_Engine\logs
When installing KEPServerEX, you will be presented with a tree of features to install. Open the pull-down menu next to "Full install" and select "Entire feature will be installed on local hard drive." This will ensure all needed drivers and plug-ins are included.When either a Client application has made a request of a Driver, or a Plug-in becomes activated, then a license check is performed. If a feature is not licensed, a two-hour demo countdown period will begin. For more information on this, see: KEPServerEX V6 Demo Timer
The KEPServerEX installer download is available from the My Kepware web portal:https://my.kepware.com/mykepware/It will be necessary to create a new My Kepware account if you have not already done so. When you log in to your My Kepware account, you will be at the My Kepware Home page. In the left column, you will see a link to download the latest release. You can access all of the features of KEPServerEX with this installation, including the Thingworx Native Interface.For more information on installation of KEPServerEX, see this guide: https://www.kepware.com/en-us/products/kepserverex/documents/installation-guide.pdf
The ThingWorx Manufacturing Apps download includes both a setup.exe (for installation) and an uninstall.exe (for uninstallation).
Starting with ThingWorx Manufacturing Apps 8.1, a Connection Info box was added to Controls Advisor that will display the Configuration settings needed in KEPServerEX. In Controls Advisor, select the server instance you are connecting with, then select the Key icon Be sure the information displayed here matches the settings you have in place in your KEPServerEX Project Properties in the ThingWorx property group.
While it is not a requirement, it is a best practice to install KEPServerEX (v6.2 or higher) before installing ThingWorx (v8.0.1 or higher).If ThingWorx is already installed, close the application and complete the install of KEPServerEX by following these install instructions: How do I download and install KEPServerEX?Now, when you attempt to launch ThingWorx, if you are presented with a "null pointer exception" error, follow this workaround:1. Navigate to the 'PostgreSQL\installer' directory, within the directory where the Manufacturing Apps are installed. By default this will be:<ThingWorx install path>\ThingWorxManufacturingApps\PostgreSQL\installer2. Run the 'vcredist.exe' located there. This application should re-install the conflicting redistributables, and you should be able to launch ThingWorx again normally.
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.