13 Replies Latest reply on Feb 24, 2019 10:51 PM by Jaison_Rodrigues

    Integrate PI and ThingWorx

    alinebordoni

      Hello all,

      I need to integrate two existing systems (one in Coresight, another in ThingWorx) and features from each one meeting the following requirements:

      • I have some displays built in PI Coresight and want to show them in a iframe within ThingWorx, when it's needed.
      • I also need to create new displays with data from PI.
      • When needed, persist information from ThingWorx to PI.

       

      What'd be the best way to integrate both systems? Using PI WebAPI or get data from a URL in Coresight?

       

      Thanks in advance.

        • Re: Integrate PI and ThingWorx
          Jerome Lefebvre

          Hello Aline,

           

          You didn't mention the version of PI Coresight, so I've only tested the links below using PI Coresight 2016.

           

          1. Displaying PI Coresight in a iframe is very easy. All you need to do is something like the following:

           

              <frameset cols='20%,80%' rows='100%' id="main">
                  <frame src=".\AFTree.html" />
                  <frame src="http://{CoresightServer}/Coresight/#/Displays/" />
                  <frame src="" />
          
          

           

          For some browsers, you will also need to edit the web.config file located in %pihome64%\Coresight. To modify the X-Frame-Options customHeaders to set the value to Allow.

           

                <customHeaders>
              <add name="X-Frame-Options" value="Allow"/>
          </customHeaders>
          

           

          2. I am assuming, you don't mean creating displays by hand, but doing something that might be a bit more automatic. You can create new AdHoc displays by simply crafting the right URL. For example, the URL below will create a display with the trend display displaying the past day's worth of data for the Sinusoid and CDT158 tag.

          https://{CoresightServer}/coresight/#/Displays/AdHoc?dataitems=\\{DataArchive}\sinusoid;\\{DataArchive}\cdt158&starttime=*-1d&endtime=*

           

          3. Can you tell me more about what information you want to bring back into PI from ThingWorx?

           

          Cheers,

          Jerome

          5 of 5 people found this helpful
            • Re: Integrate PI and ThingWorx
              alinebordoni

              Hi Jerome, Thanks for you answer.

              I'm using PI Coresight 2016.

              1 and 2... you nailed it.

               

              3 - I want to, for example, change a value of a tag. In this Sinusoid example, let's say it has name tag and I want to change its name and write it back to PI. Does it make sense?

               

                • Re: Integrate PI and ThingWorx
                  Jerome Lefebvre

                  Hello Aline,

                   

                  There is a lot of ways of writing data to PI.

                  But, as you mentioned PI Coresight, for 2016 it is possible to create a custom symbols for PI Coresight 2016 that allows you to manually enter data in a display and have that written to the PI Data Archive. You can see an example of how this could be done in the following blog post:  The specified item was not found. .

                   

                  Or were you looking for something that would be more automatic?

                  1 of 1 people found this helpful
              • Re: Integrate PI and ThingWorx
                pthivierge

                Hello Aline,

                 

                To topic seemed familiar so I just looked again to PI Coresight AD authentication and its good to see you again!

                 

                Jerome Lefebvre, one should not simply change the X-Frame option as this is there for a security reason.  Let me paste what I wrote in the mentioned post above:

                you should be careful if you change the X-Frame option because this security enforcement is there to limit the risk of clickjacking.  if you environment is limited to your intranet and that your IT is ok with this strategy this could be ok.  But be careful here.

                 

                Aline, I belive you will need to use both ways. Using the PI Web API is a good idea for things you can't do with PI Coresight (ex: write TingWorkx data into PI).

                If you are using PI Coresight 2016, you may also look into PI Coresight Extensibility, you could create objects that your users could drag onto their PI Coresight displays.  And those custom objects could be showing information retrieved from TingWorkx Apis, if there is one.

                4 of 4 people found this helpful
                • Re: Integrate PI and ThingWorx
                  jmarriott

                  Hello Aline,

                  I am the OSIsoft Partner Manager for PTC / ThingWorx.  OSIsoft and PTC are jointly working on a product to integrate the PI System with ThingWorx.  At the moment, there is some code that was developed by Systems Engineers that can be used for Proof of Concept.

                  Embedding a PI Vision (fka Coresight) display into a ThingWorx iFrame has been done.  I will connect you with someone who can help.

                    • Re: Integrate PI and ThingWorx
                      Haavard

                      Hi John,

                       

                      I am currently looking into using ThingWorx analytics / machine learning for a new project we are starting.

                      I was therefore wondering about the integration of PI / AF with ThingWorx. Is there a working solution for this, or is it still in development?

                       

                      I haven't found any documentation regarding this on the OSIsoft web-pages, all I seem to find is an announcement on PTC.com from March 2017.

                      • Re: Integrate PI and ThingWorx
                        Jaison_Rodrigues

                        Hi John,

                         

                        Has something been developed yet to integrate PI with Thigworx? I found this link but looking if we can natively access data using Web API or other data access methodology?

                         

                        Regards,

                        Jaison Rodrigues

                          • Re: Integrate PI and ThingWorx
                            gregor

                            Hi Jaison,

                             

                            Can you please clarify what kind of integration you have in mind i.e. if you intend to read from ThingWorx and write to PI or vice versa or do you think of even a closer integration like plugging one into the other?

                            Please also indicate what kind of information you like to integrate and please use PI terms here.

                             

                            Please accept my apologies for asking this way. I admit that I don't know anything about ThingWorx but hope my PI knowledge is rich enough to allow you and I can join our forces and find an answer to your question.

                             

                            The search string "thingworx connectivity" made me find this page. My understanding is that both, ThingWorx and PI, have a few things in common e.g. the support of industry standards like OPC and ODBC.

                            1 of 1 people found this helpful
                              • Re: Integrate PI and ThingWorx
                                Jaison_Rodrigues

                                Thanks Gregor for the response.

                                 

                                At the moment, we are planning to read the data from PI to ThingWorx in real-time and build some Predictive Analytics on top of it. This should suffice to prove the concept, which might extend further, based on the value it brings. I read the link that you shared on "ThingWorx Connectivity" and it looks like we have some options available.

                                 

                                I just put out this question in open to find out if anyone else is already doing it and what is the best way forward. Using OPC would require to setup PI OPC HDA Server, which might be a overhead, considering this is just a beginning and without providing a solid proof that it works, there won't be any investment towards it.

                                 

                                Regards,

                                Jaison Rodrigues

                                1 of 1 people found this helpful
                              • Re: Integrate PI and ThingWorx
                                jmarriott

                                Hello Jaison Rodrigues

                                There are a few options for integration between PI and ThingWorx.  Non are OSIsoft or PTC supported products.

                                • PTC has some code that is used on a few Proof of Concept projects.  It works, but between the limitations of ThingWorx and the limitations of the capabilities of the integration, the way you can use PI Asset Framework is constrained.
                                • ADLINK makes a product called Vortex Edge, which you can find in the OSIsoft Partner Marketplace.  It streams data from PI to other destinations.  I don't know a a production instance.  I will ask ADLINK to comment.
                                • Matricis is another OSIsoft partner and they are building a PI/ThingWorx integration.  I will ask Matricis to comment.
                                • Rovisys is an OSIsoft systems integration partner.  They have built PI/Thingworx integration for a  specific customer.  I will ask Rovisys to comment.
                                1 of 1 people found this helpful
                            • Re: Integrate PI and ThingWorx
                              Mike_Roberts

                              Hello Aline,

                               

                              We at ADLINK have an existing solution for getting data from PI to ThingWorx.

                               

                              Our ADLINK Edge product makes it easy to get data from any source to any destination. You can find more about ADLINK Edge here: https://www.adlinktech.com/en/Vortex-Edge-IoT.aspx

                              We have an OSI PI service that can take data from the PI server in near real time and send it to one or more northbound services. One of our many services is our ThingWorx integration service.  I have a demo box setup to show data flowing into PI and being replicated directly to ThingWorx in real time.

                              I'd be happy to set up a demo to show this in action if you'd like.

                               

                              Regards,
                              Michael Roberts

                              Solutions Architect,
                              adliinktech.com