Skip navigation
All Places > PI Developers Club > Blog > Authors Lonnie Bowling

PI Developers Club

12 Posts authored by: Lonnie Bowling Champion

Hi Everyone,

 

I have added to the series, parts 5-7. These cover the basics of working with AF Elements and Attributes.

 

Lonnie

 

Part 1 – Introduction

 

http://www.youtube.com/watch?v=DE1t9xa3XHM&list=SPSChwySDfHvSBFQtE6hx-0FCA1bdbsWHy&index=1

 

Part 2 – Connecting

 

http://www.youtube.com/watch?v=IKhWBtNSekY&list=SPSChwySDfHvSBFQtE6hx-0FCA1bdbsWHy&index=2

 

Part 3 – Working with a PI Point

 

http://www.youtube.com/watch?v=RAiTk-Ayg7E&list=SPSChwySDfHvSBFQtE6hx-0FCA1bdbsWHy&index=3

 

Part 4 – Getting Plot Values

 

http://www.youtube.com/watch?v=Qr1zJ1uxMLA&list=SPSChwySDfHvSBFQtE6hx-0FCA1bdbsWHy&index=4

 

Part 5 - Connecting to AF

 

http://www.youtube.com/watch?v=R9_byjv6OnI&list=PLSChwySDfHvSBFQtE6hx-0FCA1bdbsWHy&index=5

 

Part 6 - Working with AF Elements

 

http://www.youtube.com/watch?v=_7tj_SqcOOg&list=PLSChwySDfHvSBFQtE6hx-0FCA1bdbsWHy&index=6

 

Part 7 - Working with AF Attributes

 

http://www.youtube.com/watch?v=XHcB0WQN91w&list=PLSChwySDfHvSBFQtE6hx-0FCA1bdbsWHy&index=7

 

You can access the entire series play list here:

 

http://www.youtube.com/playlist?list=PLSChwySDfHvSBFQtE6hx-0FCA1bdbsWHy

 

 

 

If you have any request, please let me know and I will see what I can do!

 

Lonnie

Hi Everyone,

 

I have finally started on the video series on getting started with the PI System SDKs.  I have been wanting to do for a while now and it feels great to get started!  These videos are intended to be a simple guide on helping those that are just starting out using the SDKs.  I am only focusing on the new AF SDK, which now covers all the PI SDK operations. I remember being kind of lost when I first started, so I hope this will be of use for others. My goal is to get everyone programming with PI!

 

Part 1 – Introduction

 

http://www.youtube.com/watch?v=DE1t9xa3XHM&list=SPSChwySDfHvSBFQtE6hx-0FCA1bdbsWHy&index=1

 

Part 2 – Connecting

 

http://www.youtube.com/watch?v=IKhWBtNSekY&list=SPSChwySDfHvSBFQtE6hx-0FCA1bdbsWHy&index=2

 

Part 3 – Working with a PI Point

 

http://www.youtube.com/watch?v=RAiTk-Ayg7E&list=SPSChwySDfHvSBFQtE6hx-0FCA1bdbsWHy&index=3

 

Part 4 – Getting Plot Values

 

http://www.youtube.com/watch?v=Qr1zJ1uxMLA&list=SPSChwySDfHvSBFQtE6hx-0FCA1bdbsWHy&index=4

 

You can access the entire series play list here:

 

http://www.youtube.com/playlist?list=PLSChwySDfHvSBFQtE6hx-0FCA1bdbsWHy

 

My plan to do many more of these over the next few months. There is a lot to cover, I’m sure at some point I will have the basics out of the way and be done! I think it is a good project and it feels good to contribute.

 

See you at vCampus Live!

 

Lonnie

While at work recently, I needed to get a PI system up and running in short order.  Usually I have to send a request to our IT staff get a VM created and then take it from there. This time I decided to give Azure a try.  We have been doing a lot with cloud technology, but for some reason I had never tried to actually deploy a PI system. Well time to change that. After a couple of hours with relatively few issues, I had a PI system deployed! I was surprised with how straight forward it was.

 

Since then I have done several installations and have the time down to about 30 minutes. Ten minutes to get the VM created, ten minutes to get PI installed, and ten more to get security configured.

 

I have created a video to demonstrate how to do this; you can find the link below.

 

The basic process is as follows:

  1. Spin up a VM in Azure
  2. Download and Install AF
  3. Download and Install PI
  4. Configure firewall Ports
  5. Create a PI User and PI Trust for my dev machine
  6. Configure my PI connection and AF connection on my dev machine

That is all there is to it!  I hope you enjoy the video!

 

 http://www.youtube.com/watch?v=DzxajdmiuSA 

 

Note: This installation is only met for demonstration purposes and is NOT intended to be a production deployment of a PI System. It is good for testing and development purposes only.

 

Lonnie

 

 

Connected World Magazine hosted the M2M App Challenge this summer from June 7-9 in Santa Clara, California. This was very lucky for us at DST Controls, as we are only about an hour away. All of our PI System developers were up for the challenge, so we entered and looked forward to the fun!

 

A little background about M2M App Challenge. Each team had 36 hours to develop an application that used one or more technologies from five partners. The selection was OSIsoft, Aeris Communcations, Esri, ILS Technology, and ioBridge. The U.S. Department of energy also provided us with information on how to access thousands of open data sets from the U.S. Government. The rules were pretty simple. Start an application from scratch at on Friday 9:00 p.m. and be ready for judging the following Sunday at 10:00 a.m. I think there was a one hour break in there.  Like we need only an hour of rest.  Food and drinks, mostly of the quick energy variety, were provided to keep us fueled.

 

Our team consisted of five DST’ers, Benny Bray, Andrew Pong, Justin Bagley, Roozbeh Nakhaee, and me. We are all PI programmers, so we naturally selected OSIsoft’s platform, but not wanting to just go with what we knew, we also planned on using Esri’s mapping and GIS technology.

 

Our concept was to create an application that we called SmartCity.  This app would pull data in from a PI System and visualize information associated with a city infrastructure. Things like utilities, traffic, weather, and demographic would be combined to provide a view of a city to help people better understand how their communities behave.  Our inspiration was from SimCity, but instead of watching a simulation, we intended to use real data and have a playback feature. A user could pick any time range, press play, and watch the city come to life. We also wanted to include a live view, where real time information is displayed and objects animated.

 

Since we had five developers, part of the challenge for us was to figure out how to design, split work, and create a working application in a very short time.  We all had to learn new things. It was great to see everyone focused so intently for a short time on a single purpose.  I was surprised with what we were able to accomplish.

 

Three of us worked on the back-end of the system.  This involved getting a PI System up and running, creating a cloud base web api (using Micrsoft’s Azure cloud platform) that would allow our application to access AF and PI data directly, and populating the system with data from open data sets provided by the U.S. Government. We also created simulation data for information that we did not have access to, such as utilities.

 

An interesting twist that OSIsoft provided, was a live feed of a car’s data as it drove around the Bay Area.  This data was collected and stored on our PI Server. In our application the car data represented traffic information.

 

The other two team members focused on using Esri .Net SDK to create a map and overlay objects which represented various aspects of the city. The last goal was to add animation and playback.

 

We didn’t just want to use the PI System to store our real-time time series data, but also took advantage of AF to describe our city’s asset.  Because of time limitations, we had to settle on a few asset types. The first one we picked was weather stations, with actual data and locations pulled from the National Oceanic and Atmospheric Administration, also known as NOAA. NOAA National Weather Service is pretty much the primary source of all weather information for the US. The data is freely available to anyone, so we grabbed about a 1000 weather stations with a year’s worth of data and imported it into our PI System.

 

The other two assets types, were pipe lines, and vehicles.  For all the assets we stored geolocation data to enable us to display objects on the map.  The application used our API to get asset information and the Esri’s API for the map. As the user zoomed in and out and panned, we queried the PI system to get all assets within set radius, like 10 miles.  Current values were shown as animation features, like changing colors based on temperature or line pressure.  If the user picked a date range in the past, then a play button was presented and the user could watch values change over that period. We also provided a slider bar so the user could move back and forth over the time range.

 

We were able to meet all our goals and showed the judges a working system!

 

Here are some screen shots:

 

3884.detail1.png

 

4670.detail2.png

 

What was the experience like?

 

This was the first time any of us had participated in a hackathon. It was long, hard, and at times seemed impossible. I would never do it again.  Just kidding, it was actually the opposite in all aspects. Time was our enemy; we just didn’t have enough.  Sleep was also an enemy; we didn’t have enough. Red Bulls, coffee, and other power drinks were our friends; we had plenty. Support from OSIsoft and Esri staff were huge friends.

 

The line I gave upper management is that this would be a great team building event. It is a frequently over-used term, so I try to avoid saying stuff like that; but I have to admit, once you have programmed side-by-side with a few people over two days; you get to know each other.  We learned how to work together and manage our time. After it was over we felt pretty proud of what we had done, and each of us did a part of the application, regardless of skills or ability.

 

Even though I kept telling myself that it does not matter if we win or not, I still wanted to win! I guess it is just that competitive spirit in me. We placed 2nd in both OSIsoft and Esri platforms, which is pretty respectable and even won $3,000. Looking back I think that was a great accomplishment, and am over not taking first. What really matters most to me was the experience.  We learned so much about working together, using new technologies, and just having fun.  Even though we spend many of our normal working days programming; this was nothing like that. It was a blast and I would do it again.

 

Here is the team:

 

1440.IMG_5F00_0739.jpg

 

Top to Bottom, Left to Right: Roozbeh Nakhaee, Justin Bagley, Benny Bray, Andrew Pong, Lonnie Bowling

 

2705.IMG_5F00_0744.jpg

 

Roozbeh: That is not a good taste in my mouth, Justin: Let’s step outside, Benny: Can a person be any cooler, Andrew: This is my best tough look, Lonnie: Time to sleep, must sleep.

 

Here is a video of me summarizing the project.

 

http://www.youtube.com/watch?v=GB6MlLMm9YY&feature=youtu.be

 

That is a wrap,  I'm looking forward to the next one!

 

Lonnie

Hi Everyone,

 

Here are some random notes that I jotted down to share: 

 

John Baier spoke on PI Cloud Services, announced “PI Cloud Connect”, which was shown at vCampus live.  Not much new, other than it is shipping shortly, maybe now, can’t remember for-sure.  Anyway, it is built on Windows Azure PaaS.  Designed to be multi-tenant SaaS, so many PI systems can connect via the cloud.  OSIsoft will host, users control the access. The service creates a PI to PI connection in a publisher with one or more subscriber configuration. Three use cases were presented:

  1. Intra-company connection of PI System
  2. Company to company sharing of data (like supply chain)
  3. Asset owners to service providers

They are using the phrase “Connected Supply Chain” to show how PI goes beyond what is normally thought of as a historian.  This is part of the cloud story that is unfolding.  Again, not really new, but marketing is getting involved now and things have a much more polished message and seem like products will be here soon.  We can hope!

 

Over the next two years we will see:

  • PI as a cloud service
  • More mobile device support
  • Rest services baked into all products (e.g. SMT)

Smart Interfaces were mentioned, they contain tag and metadata information, this will be part of a new interface framework.  Looks like a major upgrade where interfaces will not only talk time-series data, but also talk to the AF side.  That will be pretty interesting and excited me.  I’m going to try and get more details.  Abacus was mentioned, nothing new, other than it will kick absolute ass (my opinion).

 

They mentioned PI OLEDB Enterprise 2012 with PowerView with some excitement on the BI front.  PowerView is getting a lot of hype from Microsoft.  I have only just started working with it (like last month).  I’m attending some OSIsoft training on this Friday and will report back on what I find out.

 

On the visualization front:

  • iPad for CoreSight is out (for a few months now), yes it is read-only, which limits it usefulness.
  • iPhone for CoreSight is coming, showed a demo, looked OK, mostly what I expected.  It did have a nice search feature. 
  • More exciting is CoreSight Restful service that is used for these applications will be opened to developers as part of an SDK.  Sweet!  

It is clear that OSIsoft sees the mobile movement and is working hard to get involved. Not only from a product standpoint, but also, as an infrastructure.

 

PI Web Parts 2013 will be out mid summer, will not require the Adobe SVG viewer and will have wide support for many browsers, even on mobile devices.  Will run on SharePoint 2010 and 2013.   Moving towards all HTML based.

 

Generally OSIsoft is looking to work more closely with PI partners and is focused on PI being not viewed as only a historian, but as a more as a broad data storage, access, and visualization solution. 

 

They are really pushing for stronger AF and EF adoption.  A new program called JumpStart AF has started.  This is where OSIsoft and customers have a 2-3 day workshop to design a working AF framework.  Partners can also be involved.

 

I’m going to start a rumor.  If you notice on the keynote list of speakers is Chris Cappelli, Director - Sales, Esri; Esri does GIS mapping software.  I won’t disclose my sources, but it looks like something might be announced or demo’ed at the UC.  I don’t have any details, but I suspect that we might see a partnership of some sort between these two companies.  It makes sense, just a little speculation…  I will report back if I get more details.  This could be pretty exciting for us that are into mobile!

 

Met a few vCampus folks, and found Steve Pilon’s replacement, Dan. Can’t remember his last name right now.  Very nice guy, today is his first day on the job.  Good luck, you have some big shoes to fill!  I miss Steve.

 

If you are at the conference look me up.  Just tweet or email me and I will hunt you down. I will be around all week, including Friday.

 

That is it for now; sorry for typo’s, just did a dump of my notes.  I hope I don’t get in trouble for this…  next time they will have us sign NDA’s at the door.

 

Lonnie

 

 

 

 

 

 

 

 

Hi Everyone,

 

I have finally got to the next part of my PI to Mobile series.  In this screencast I create an iPhone app that reads the Azure web services (created in part 1 and 2) and displays selected PI tag data in a chart.  I go over what basic Xcode programming is like and use a couple of third party libraries to make the job eaiser.   This episode is also a two part'er.  The first part is creating the basic iPhone app and the second part does the data gathering and creates charts.  I hope you like them!

 

Part 3a: Creating a Basic iPhone App using Tables and Storyboarding

 

Here is 3a video

 

Part 3b: iPhone App, getting data from ASP.Net Web API and Displaying in a Chart

 

Here is part 3b video

 

 

 

Screenshots:

 

5775.iOS-Simulator-Screen-shot-Oct-7_2C00_-2012-9.52.57-AM.png  8360.iOS-Simulator-Screen-shot-Oct-7_2C00_-2012-9.53.01-AM.png  3582.iOS-Simulator-Screen-shot-Oct-7_2C00_-2012-9.53.05-AM.png 

 

4111.iOS-Simulator-Screen-shot-Oct-7_2C00_-2012-9.53.19-AM.png

 

Source code:

 

 PITrends5.zip (27K)

 

 

 

Thanks for reading,

 

Lonnie

 

 

Introduction

 

I decided to break this part into two videos.  Part 2a is implementing the PI SDK into the WCF service created in Part 1 of this series.  Part 2b creates an ASP.Net Web API that connects it all together.  At the end of the two videos I have a working, but simple, RESTful type API which various mobile device can use to access PI data from an on-prem server.

 

PI to Mobile Part 2a - Azure Service Bus with OSIsoft PI SDK

 

In this video I extend our WCF service to use the PI SDK to access a PI System.  Data is relayed to Azure using a service bus.  In Part 2b I use this service bus to feed an ASP.Net Web API.  The goal is provide a Rest API PI service for mobile device to access PI data.

 

Here is 2a video

 

 

 

PI to Mobile Part 2b – ASP.Net Web API

 

In this video I create a RESTful API using ASP.Net Web API.  I connect to our service bus that was created in Part 1 and extended in Part 2a.  I cover how to deploy the entire project to Azure and end the video with a working example of a Web API service that provides data formated as JSON from a PI System.

 

Here is part 2b video

 

 

 

 

 

Source code is in two zip files because of file size limitations.  Unzip them in a common directory.

 

Download zip file 1 (11.8M)

 

Download zip file 2 (8.3M)

 

If you would like to test drive the API just open your browser and type the following:

 

http://giant.cloudapp.net/api/values/cdt158?range=-1

 

This will return the last hour of values and times for simulation tag cdt158. Access is via Azure and then to the example PIConnect application running on my test server. You are not connecting to my server directly, but to the Web API hosted in Azure.  The range is in hours from now, so -1, returns the last hour of data.  Feel free to change the tag name and range.  If you have issues, please let me know, as this is kinda an experiment :)

 

I hope this inspires you to start thinking about how the cloud and mobile technology can help you innovate, and look good to the boss :)

 

Lonnie

Lonnie Bowling

PI to Mobile Part 1

Posted by Lonnie Bowling Champion Jul 23, 2012

Here is the first part of my blog series on taking PI to the cloud and mobile devices.  I have decided to try my hand at doing videos this time around.  I always seem to learn more that way.

 

Please let me know what you think, good or bad.

 

Thanks, Lonnie

 

I'm having problems getting the videos to show up embedded. Until then here are the links:

 

Introduction to the PI to Mobile Blog Series (7 minutes long)

 

 

 

 

 

Getting started with Azure Service Bus (43 minutes long)

 

 

 

 

Sometimes we find ourselves in funny situations, where we think our past experience is going to help get us out of a bind.  We have faced a problem before, so naturally we know what needs to be done the next time.  But is next time really ever the same?  What I’m getting at here is that the mobile ecosystem is not the personal computer ecosystem.  On the face of it they seem very similar.  There is a data service over the network; there are client apps or browsers to visualize the data. We have software to build logic and create a nice user interface. We have been doing this for almost two decades on the PC so what is the big deal.  That thinking is exactly what is getting us in trouble when it concerns mobile; we are so use too seeing the world in a PC-centric way, that we just cannot help ourselves.  Let me give you a couple of quick real-life discussions I have had with people, and these are smart people, mind you.  Names have been changed to protect those that need to be protected ;)

 

 

 

Mark Z. and I were having a discussion about getting notifications on a phone and he pointed out that he has been doing this for years now via email and SMS.  “So why Lonnie, are you so big on native push notifications?”  It is a fair question and I responded, “See Mark, it is about what you do after you get that notification.  We have technology to better manage that notification for you when it comes in and we can integrate that message into a client app that allows you to get to the answer as quickly and easily as possible.  See, a notification always requires an action of some kind, and that is what we need to focus on – what the next step is.  Provide that to a user and we have moved beyond text messages and email.”

 

 

 

Warren B. and I were talking at Starbucks about having something like a Process Book display on a phone or tablet, and he pointed out that it has already been done.  He pulls out his phone and remote desktops to his PC and pulls up a screen.  “See,” he said, “do we really need to have an app for that?”  My answer went along the lines of, Warren, you are my friend, and I value your opinion, but do you really think that screen is usable?  We are looking at a desktop that is 7 times larger than your phone screen and designed for keyboard and mouse interaction, do you really think that is a solution that users would pay for?

 

 

 

Mark and Warren are my friends and I hope that one day they will understand what I’m getting at.  Let’s look at the underlying issue here.  Both are thinking with PC brains.  They have been condition for years that we can make do with these kinds of solutions.  They were good back in the day, so why not now?

 

 

 

I hope I have made my point here.  We need to let go of how things were done in the past and try our hardest to embrace the new.  Smart phones and tablets are not PCs.  The have a different form and people interact with them in very different ways.  Ways that are much more natural.  When you are dreaming up the next big app, try to think in those terms, you will be way ahead of everyone else!

 

 

 

Thanks for reading!

 

 

 

Lonnie

 

 

I have this dream to see PI data on an iPhone.  I think this would be a fantastic thing.  I really do.  There are so many people walking about with iPhones and having access to their data would be a tremendous benefit.  How can we make this possible?

 

I have this conversation with myself at least once a week and have spent a lot of time thinking and researching various possibilities.  This is what led me to the cloud.  See, if you are serious about providing data to an iPhone, or any mobile device, then you have to consider that fact that this data will be traversing the Internet, or what I like to call, the wild.  Data in the wild is a problem for most of us.  How do we prevent others from seeing it? How to we insure that the person asking for the data is who they say they are?

 

 

 

To be blunt, it is all about security.  And the cloud offers the capabilities that I need.  By the cloud, I really mean Microsoft’s Azure.  They have some nice services, like Access Control Service (ACS), and the service bus.  I have found that these two features enable me to solve the “wild” problem.  I can secure my data and authenticate users.  This allows me to sleep at night and tell my clients that they are OK.  To play on an old cliché, “you can have your PI and eat it too.”  I know, that was pretty bad :)

 

 

 

But, as a developer this means I need to understand what the cloud is about, how to talk to my clients (either my boss, users, other departments, or paying customers)  without freaking them out and really get the point across that we can do this in a safe way.  We can get the data to your phone or tablet in a secure way and use the power of the cloud to help us out.   I think it can be a very positive conversation if approached the right way.  But it first starts with us getting up-to-speed with this technology.

 

 

 

So how does this cloudy stuff work?  I will be talking about this subject in coming blogs.  You don’t necessary have to write cloud services or anything that intense, but all of us should want to really try to understand what the cloud is about and why it is such an important part of getting our data to the mobile world.  This is a big part of the mobile puzzle and you will be doing yourself a favor by learning what it could mean to you and your organization. 

 

 

 

Thanks for reading.

 

 

Lonnie Bowling

PI in the Cloud

Posted by Lonnie Bowling Champion May 7, 2012

    Normal   0           false   false   false     EN-US   JA   X-NONE                                                                                                                                                                                                                                                                                                                                                      

 

What do we mean by “PI in the Cloud”?

 

 

 

I think when entering a discussion about “PI in the Cloud” some context needs to be set.  There are many ways of interpreting what that means.  For example, are we talking about PI Servers running in the cloud, or are we talking about being able to access PI data from a cloud service?  They might seem to mean the same thing, but they are not.  To some PI in the cloud is viewed as a set of computers located in a datacenter that are hosting PI servers.  This is one scenario, but there are many, many more.  I think it goes back to what problem is a PI user faced with and trying to solve.  Is it data access, maybe it is being able to scale a large system, maybe it is to tie a distributed system together, or maybe it is to move hardware from on-premise into a data center.

 

 

 

Today, some of this is very possible, like improving data access and security.  If someone wants to access data from the cloud via a mobile device, this is very do-able.  I would think that one thing OSIsoft is looking at in the near term is extending its infrastructure to the cloud.  This would mean that there would be some means for a PI system to be extended, not full deployed, to the cloud.  I envision that this would start with a set of cloud services and security where data could be easily accessed from the cloud.  As things progress, I could see PI collectives being deployed to the cloud and connecting to local interface nodes.  Also archives could be spread across multiple servers and data centers.  I think that being able to easily scale a PI system in the cloud will be a big deal for large enterprise users.  We may be far off from that day, but I think that the way the PI System as a whole is becoming more and more based on a service oriented architecture we will progressively see parts of the system being abled to be moved.  User and developers will have more options and capabilities than ever before.  As I’m am interested in the mobile area, this is really exciting times and I’m looking forward to seeing what happens!  What do you think? What features would you like to first see moved to the cloud?

 

 

Lonnie Bowling

Adventures in Mobile

Posted by Lonnie Bowling Champion May 1, 2012

 

 

I see signs everywhere that mobility is fundamentally changing the way we live our everyday lives.  Think about it for a second; if you have a smartphone, which I bet you do if you are reading this, how many times did you check your email today with your phone?  How does that compare with how many times you checked email on your computer?  If you are like me, your phone is setting next to you while your at your PC and you use it primarily as a your email client, at least for receiving emails.  This is the story that I think will play out over and over for a variety of functions that we have been using the PC to perform for years.  The world is about to change, big time, are you ready? 

 

 

 

OK, maybe that last statement was a bit over the top, but I want to get your attention.  As developers we really need to start thinking about this.  We all are going to be impacted by this shift, sooner or later, and I’m in the sooner camp.  I just finished up the UC2012 conference and it was great, but mobile was not a big story, yet. I think we all have time, but again, I really believe that smartphones and tablets will one day be the primary way we interact with our PI data.  I expect that we will be seeing a lot more in this area.  OSIsoft has their plans, but let’s be honest, they can’t do it all.  That means that we, the developers and power-users of PI, will need to be part of the solutions and help out.  My goal with this blog is to get the conversation going.  I hope everyone is ready to have some fun with this topic, because I think this is great stuff and have a lot to talk about.  So please speak-up on where you think the mobile world is, especially with data access and specifically PI data access.  I talked to a lot of users at the UC that are ready for this to happen, are you? 

 

 

 

OK, I hope you can tell that I’m really, really, excited about mobile technology and finally starting my blog on the subject.  Thanks for reading.

 

 

Filter Blog

By date: By tag: