IoT & Connectivity Tips | ThingWorx & Kepware PTC
Recently active
In this video we cover the different configuration steps required for ThingWorx Analytics Builder extension This video applies to ThingWorx Analytics 52.1 till 8.1. Note though: - this video uses Classic Composer, the same operations can be done using the New Composer starting with version 8.0 as illustrated in the Help Center - For release 8.1, the Settings menu differs from previous versions, see Video Link : 2079 between times 00:12 sec to 00:40 sec for up to date menu selection. Updated Link for access to this video: Installing Thingworx Analytics Builder: Part 2 of 3
Sometimes M2M Assets should poll the platform on demand, such as in the case of avoiding excessive data charges from chatty assets. A mechanism was developed that instructs the Asset to contact (poll) the platform for actions that the Asset needs to act on such as File Uploads, Set DataItem, etc.The Shoulder Tap SMS message is the platform’s way of contacting the Asset – tapping it on the shoulder to let it know there’s a message waiting for it. The Asset responds by polling for the waiting message. This implementation in the platform provides a way to configure the Model Profile that is responsible for sending an SMS Shoulder Tap message to an M2M Asset. The Model Profile contains model-wide instructions for how and when a Shoulder Tap message should be sent.How does it work?The M2M asset is set not to poll the Axeda Platform for a long period, but the Enterprise user has some actions that the Asset needs to act upon such as FOTA (Firmware Over-the-Air). &
Attached is a description about Ensemble Learning Techniques.
Best Practices in Data Preparation for ThingWorx Analytics Data Preparation is an important phase in the process of Data Analysis when using ThingWorx Analytics. Basically, it is getting your Data from being Raw Data that you might have gathered through your Operational system or from your Data warehouse to the kind of Data ready to be analyzed.In this Document we will be using “Talend Data Preparation Free Desktop” as a Tool to illustrate some examples of the Data Preparations process. This tool could be downloaded under the following Link: https://www.talend.com/products/data-preparation(You could also choose to use another tool)We would also use the Beanpro Dataset in our Examples and illustrations. Checking data formatsThe analysis starts with a raw data file. The user needs to make sure that the data files can be read.Raw data files come in many different shapes and sizes. For example, spreadsheet data is formatted differently than web data or Sensors collected data and so forth.
This Guide contains all the Linux commands that you may have to use for ThingWorx Analytics Installation or day to day use.Command/CategoryDescriptionNetwork/portip aList the ips of all of the network interfacessshHow to jump from one machine to anotherpingSend packets to a remote machine. useful for testing connectivitynetstat –anpCheck active portcat < /dev/tcp/localhost/8080Test connection to a portReplace localhost with desired hostname or ip, replace 8080 with desired port number(/dev/tcp/host/port)exitExit my current sign in. this lets one disconnect from remove ssh sessions or if one has changed one's user e.g. switched to rootscpRetrieve something via sshResource Usagefree -mCheck memory-m is for output in MbMpstat -P ALLCPU usage topProcess usagejvmtopCollect cpu usage of jvm and its threadhttps://github.com/patric-r/jvmtop(requires jdk to be installed)File Interactioncp / mvCopy and move respectively. mv just deletes the source file. Usage: cp /source/loc
Best Practices in Data Preparation for ThingWorx Analytics
To setup the Single-Sign On with Windchill, we can just follow steps in Windchill extension guide. However, there is a huge problem to use "Websocket" for EMS or Edge SDKs from devices since Apache for Windchill blocks to pass "ws" or "wss" protocol. It's like a problem of a proxy server. There might be a couple of ways to avoid this issue, but I suggest to change filter-mappings for the SSO filter. When you look at the Windchill extension guide, it says that users set filters for all incoming URLs of ThingWorx by using "/*" filter mappings. Please use below settings for "web.xml" of ThingWorx server to avoid the problem that I stated above. It looks quite long and complicated, but basically the filter mappings from settings for "AuthenticationFilter" which are already defined by default except "Websocket" related urls.<!-- Windchill Extension SSO Start--><filter><filter-name>IdentityProviderAuthenticationFilter</filter-name><filter-class>com.ptc.connected
PrerequisiteDownload the .NET SDK from the PTC Support Portal and set up the SteamSensor Example according the directions found in the ThingWorx Help CenterSDK Steam Sensor ExampleIn ThingWorxCreate a Remote thing using the RemoteThingWithFileTransfer template (SteamSensor1 in example)Create a file repository and execute the CreateFolder service to create a folder in the repository folder in ThingworxStorage (MyRepository in example)In SteamThing.csAt the top of the file, import the file transfer classusing com.thingworx.communications.client.things.filetransfer;”Create a virtual thing that extends FileTransferVirtualThingE.g. using steam sensor Thingpublic class SteamThing : FileTransferVirtualThingEdit SteamThing as follows{ public SteamThing(string name, string description, string identifier, ConnectedThingClient client, Dictionary<string, string> virtualDirectories) &nbs
This is a reference document on how to move existing or fresh install ThingworxStorage location.Note: As of Thingworx 7.0 the platform-settings.json file has changed and therefore the newest version needs to be used to change the location of the folders. Please refer to this guide pg.45-46 to see the new .json file.http://support.ptc.com/WCMS/files/170230/en/Installing_ThingWorx_7.1.pdf A sample json is attached at the bottom of this document.Here are the main bullet points that need to be kept in mind when performing a migration process:ThingworxPlatform directory has to be in the same partition as where the Tomcat is installed. I.e. if your tomcat is in /apps, the ThingworxPlatform should also be in /apps, not in root. Note: if ThingworxPlatform will be placed in a different partition than the tomcat, create a THINGWORX_PLATFORM_SETTINGS environmental variable that will point to the correct location. Refer to the Installation Guide for details.Before modifying the locatio
Today we're going to learn how to use the Axeda Platform SDK v2 APIs to upload a file to the platform and create a software package. This document is a work in progress, but we're going to show you everything you need to get started. In my case I am using the very useful and easy to use Postman REST Client app available from the Chrome Store. I'll be using some terms below (API Object Names) that can be found in the documents listed in the bibliography at the end of this article.Assumptions (Replace these with your own versions):username: joe, password: password1!platform instance: axedaplatform.example.comFirst things first, we need to authenticate to the platform and get a session id (header x_axeda_wss_sessionid).(Note: Postman does not automatically URL encode query parameters - this can be especially important for the password)GET: https://axedaplatform.example.com/services/v1/rest/Auth/login?principal.username=joe&password=password1!You'll
The ThingWorx Android SDK was designed to load without modification into Android Studio but due to recent changes in Android Studio, the Thingworx Always On Android SDK 1.0 needs to have minor modifications made to its build files before it will load or build. This changes will be made in the 1.1 release in July, 2016 but until then they will have to be updated after the user downloads the SDK.Android Studio changed the minimum required Android build tools for gradle. This also forces a new version of gradle to be required. The following changes must be made to each set of SDK project build files.The tw-android-sdk/gradle/wrapper/gradle-wrapper.properties file ( there is only one present in the entire sdk) must have this line changed from:distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zipto:distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zipIn all build.gradle files change from:buildToolsVersion "19.1.0"to:buildToolsVersion “21.0.0”
Attached to this article is my slide deck from Liveworx 2016 titled "Getting Mobile with ThingWorx and Android".It is an overview of the ThingWorx android SDK which had its 1.0 release this past April.Also attached is the Light Blue Bean bluetooth integration example I demoed at the show.
ObjectiveLearn how the Scripto Web Service helps you to present platform information in your HTML with JavaScript and dynamic page updating. After this tutorial, you will know how to create Axeda Custom Objects that return formatted results to JavaScript using XmlHttpResponse, and how a very simple page can incorporate platform data into your browser-based user interface.Part 1 - Simple ScriptoIn Using Scripto, you learned how Scripto can be called from very simple clients, even the most basic HTTP tools. This tutorial builds on the examples in that tutorial.The following HelloWorld script accepts a parameter named "foo". This means that the caller of the script may supply a value for this parameter, and the script simple returns a message that includes the value supplied.import static com.axeda.sdk.v2.dsl.Bridges.*import com.axeda.services.v2.*import com.axeda.sdk.v2.exception.*return "Hello world, ${parameters.foo}"In the first part of this tutorial, we'll be creating an HTML p
Expression rules are the heart of the Axeda Platforms processing capability. These rules have an If-Then-Else structure that's easy to create and understand. We think they're like a formula in a spreadsheet. For example, say your asset has a dataitem reading for temperature:IF: temperature > 80THEN: CreateAlarm("High Temp", 100) This rule compares the temperature to 80 every time a reading is received. When this happens, the rule creates an alarm with name "High Temp" and severity 100.Dataitems represent readings from an asset. They are typically sensors or monitoring parameters in an application. But also think of dataitems as variables. The rule can be changed toIF: temperature > threshold so that each asset has its own threshold that can be
OverviewThe Axeda Platform is a secure and scalable foundation to build and deploy enterprise-grade applications for connected products, both wired and wireless. This article provides you with a detailed feature overview and helpful links to more in-depth articles and tutorials for a deeper dive into key areas.Types of Connected Product ApplicationsM2M applications can span many vertical markets and industries. Virtually every aspect of business and personal life is being transformed by ubiquitous connectivity. Some examples of M2M applications include:Vehicle Telematics and Fleet Management - Monitor and track the location, movements, status, and behavior of a vehicle or fleet of vehiclesHome Energy Monitoring - Smart energy sensors and plugs providing homeowners with remote control and cost-saving suggestionsSmart Television and Entertainment Delivery - Integrated set-top box providing in-view interaction with other devices – review your voicemails while watching a movie, chat with y
This document has been created to assist customers with the upgrade process when moving from a legacy version of ThingWorx to the latest release. It provides a checklist of activities that are critical to achieving a successful upgrade. The goal of the document is not to define the in-depth technical details required for the upgrade but to highlight how to carefully plan the overall activities and general methods beforehand. Additional planning activities can apply and should be added based on individual circumstances. While this section is primarily geared towards upgrading an existing installation, the proposed outline below can also be adapted to new installations as well.Note that while the information contained within this document is high-level, PTC cannot guarantee that this checklist will be entirely accurate for your particular environment. Also note that using the information in this document might require specific knowledge, skills, and expertise with PTC product
New to ThingWorx and looking to get up to speed on using the platform? The new Developer eSupport Portal is here to help! This guide will walk you through the process of gaining access to the Developer eSupport Portal, and will also provide a quick overview of the various content that you will be able to leverage. Before you know it, you will have all the tools and knowledge needed to begin creating simple applications within the platform and begin establishing connections to a wide array of devices, industrial systems, enterprise applications, cloud services, etc.Creating an AccountFor users that have already created an account through the PTC eSupport website, you should be all set. Simply use your existing account credentials to access the Developer eSupport Portal. For those who do not yet have an account, you can create one by using one of the following links:For customers with an active maintenance agreement, follow the link to create a Customer AccountFor users
Often times to set up our environment securely, we will assign Entity Type permissions, which is much easier then to remember to assign it to every single ThingShape, ThingTemplate, Thing etc.However did you know that these security settings only export when doing an Export to ThingworxStorage?So you either must maintain a list of these settings and re-apply them when starting on a new environment or:1. Set up your Groups (and Users although hopefully all permissions you set up are assigned to Groups as a Best Practice)2. Set up your Entity Type Permissions3. Create an Export using Export to ThingworxStorage and export everythingNow you have an import ready any time you need to deploy Thingworx anew.NOTE: Obviously this means you need to maintain that export any time changes are made to those permissions, unfortunately that also means another export of ALL which can be less desirable, since it can include Test objects unfinished items etc. As such one may have to maintain some local in
I know most of us very happily use the Administrator account in Thingworx, however this is bad bad practice for development and even administration of the platform!Administrator is there by default and should be used to set up your initial users, which should include your Actual Platform Administrator (with a strong password of course)After that change the Administrator Password and Remove them from the Administrators group.I recommend this as a Best Practice even in your own Development environments, but especially in Runtime.Your very first steps would like:Install ThingworxLog in as AdministratorSet up the new Platform Administrator accountRemove Administrator from Administrators groupChange Administrator password.
This script will get all contacts (optionally limited to a particular organization) and check whether there is a DeviceContact associated with it. If there is no DeviceContact (meaning it is not associated with a device), it deletes the contact.Note - It is worthwhile to test this script by commenting out the contact.delete() line first and reviewing which contacts will be deleted. Also, this script works by finding all contacts, therefore it is not recommended to run the script repeatedly within a short period of time.Parameter:organizationName (OPTIONAL) - Str - the name of the organizationimport net.sf.json.JSONObjectimport com.axeda.drm.sdk.device.DeviceFinderimport com.axeda.drm.sdk.device.Deviceimport com.axeda.drm.sdk.device.ModelFinderimport com.axeda.drm.sdk.device.Modelimport com.axeda.drm.sdk.data.CurrentDataFinderimport com.axeda.drm.sdk.data.DataValueimport net.sf.json.groovy.JsonSlurperimport com.axeda.drm.sdk.contact.Contactimport com.axeda.drm.sdk.cont
This is an example to show returning an uploaded file as a binary from a Groovy Script.Parameters:model_nameserial_numberimport java.io.StringWriterimport java.io.PrintWriterimport com.axeda.drm.sdk.Contextimport com.axeda.drm.sdk.data.*import com.axeda.drm.sdk.device.*import javax.activation.MimetypesFileTypeMaptry { Context ctx = Context.getUserContext() ModelFinder modelFinder = new ModelFinder(ctx) modelFinder.setName(parameters.model_name) Model model = modelFinder.find() DeviceFinder dfinder = new DeviceFinder(ctx) dfinder.setModel(model) dfinder.setSerialNumber(parameters.serial_number) Device d = dfinder.find() UploadedFileFinder uff = new UploadedFileFinder(ctx) uff.device = d def ufiles = uff.findAll() UploadedFile ufile if (ufiles.size() > 0)
Update properties on a model.Parameter:modelName (REQUIRED) - String - the name of the model to have its properties updated.import com.axeda.drm.sdk.device.DevicePropertyimport com.axeda.drm.sdk.device.ModelFinderimport com.axeda.drm.sdk.device.Modelimport com.axeda.drm.sdk.Contextimport com.axeda.drm.sdk.device.DevicePropertyFinderimport com.axeda.drm.sdk.device.Propertyimport com.axeda.drm.sdk.device.PropertyTypeimport com.axeda.common.sdk.id.IdentifierSet<String> REQUIRED_PROPERTIES = [ "TestProperty0","TestProperty1","TestProperty2"]try { final def Context CONTEXT = Context.getSDKContext() ModelFinder modelFinder = new ModelFinder(CONTEXT); modelFinder.setName(parameters.modelName) Model model = modelFinder.find(); if (model == null){ throw new Exception("No model found") } modelProperties = findModelProperties(CONTEXT, model.id) updatePr
Sends an email with an alarm name passed in by an Expression Rule.Parameters (passed in as arguments to ExecuteCustomObject in the Expression Rule):fromaddresstoaddressimport com.axeda.drm.sdk.contact.Email/** ExprRuleAlarmToEmail.groovy** Sends an email with an alarm name passed in by an Expression Rule.** @param fromaddress - (REQ):Str email address of sender.* @param toaddress - (REQ): Str email address of recipient*** @note Should be executed from an Expression Rule like the following:** Type: Alarm* If: Alarm.severity > 490 && Alarm.severity < 700* Then: ExecuteCustomObject("ExprRuleAlarmToEmail", "fake_sender@axeda.com","fake_recipient@axeda.com")** @author Sara Streeter <sstreeter@axeda.com>*/try { String fromaddress = parameters.fromaddress String toaddress = parameters.toaddress String subject = "Axeda Alarm - ${alarm.name}" String body = "You are receiving this alarm ${alarm.name} because you are subscribed to its updates." se
This example shows how a file can be retrieved via Scripto and then displayed on a Web page. Precondition is that an asset has an uploaded file. This script assumes the file is there and that it is not extremely large (under 1 megabyte). This example uses base64 encoding to convert the file into a string. Future versions of Scripto will support other data streams so that base64 encoding will not be necessary.import com.axeda.drm.sdk.Contextimport com.axeda.drm.sdk.data.UploadedFileimport com.axeda.drm.sdk.data.UploadedFileFinderimport com.axeda.drm.sdk.device.Deviceimport com.axeda.drm.sdk.device.DeviceFinder// This script requires parameter "id"Context ctx = Context.create(parameters.username);def response = ''try { DeviceFinder deviceFinder = new DeviceFinder(ctx, new Identifier(parameters.id as Integer)); Device device = deviceFinder.find(); UploadedFileFinder uff = new UploadedFileFinder(ctx) uff.device = devic
This groovy script creates an xml output of the audit log filtered by the User Access category, so dates of when users logged in or logged out.Parameter:days - number of days to searchimport com.axeda.drm.sdk.device.ModelFinderimport com.axeda.drm.sdk.Contextimport com.axeda.common.sdk.id.Identifierimport com.axeda.drm.sdk.device.Modelimport com.axeda.drm.sdk.device.DeviceFinderimport com.axeda.drm.sdk.device.Deviceimport com.axeda.drm.sdk.audit.AuditCategoryListimport com.axeda.drm.sdk.audit.AuditCategoryimport com.axeda.drm.sdk.audit.AuditEntryFinderimport com.axeda.drm.sdk.audit.SortTypeimport com.axeda.drm.sdk.audit.AuditEntryimport groovy.xml.MarkupBuilder/** AuditEntryList.groovy** Creates an xml output of the audit log filtered by the User Access category, so dates of when users logged in or logged out.** @param days - (REQ):Str number of days to search.** @author Sara Streeter <sstreeter@axeda.com>*/def writer = new St
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.