Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
SergioG_TX
Active Contributor

Hello again and thank you for reading this blog. This blog is about the IoT service offered on HCP (trial)

I am going to jump right in and first of all, please make sure you visit the Services tab of your HCP account so that you may enable to service and you can actually be able to user it. As you may know, it is disabled by default. Once enabled, your will see the Enabled green tag on it and you may continue.

Every time you visit this service you will come to the next page which is the entry point for your IoT service. Please visit the Documentation page prior to your exercise so you become familiar with the terminology (believe me it will save you time at the end )

Then, you will need to configure a user id (I used my p user since I am on the trial landscape) and a role. You may chose to add additional roles due to security, or some custom need, however, I used the default provided role to showcase how the IoT services work.

Once you create a user and go back to the entry page, you may click on Go To Service This link will bring you to the IoT Service cockpit. There are 2 Catalogs with a few tiles I will explain next.

1) Device Management Catalog, you will see:

Devices contains the list of devices you want to connect to (or simulate from HCP trial)

Message Type: in order to be able to push, post or send a message to a device you must have some fields (structure). in my case I used:   someInt: Integer, and someString: string  *The information Icon below displays my message ID (we will use later to send messages)

Device Type: will be the device type such as iphone, android, table, etc. something you can configure that will contain an ID and a Message Type. The information icon display my device ID (we will use that later to send messages)

In order to create my virtual device, I went through the device registration and generated a token.

Now, under the Message Management Catalog you will have your IoT Service version tile which opens the MMS Deployment cockpit. (next image below) and also the Message Management Service Tile that opens the MMS cockpit (image further down)

Once you have set up a Device, a Device Type, and a Message Type, then go to the MMS cockpit. This cockpit will be the fun part :smile: it is where we can send and receive messages. This cockpit has 2 Catalogs as well.

a) Core Services (see tiles below very self-explanatory)

b) Data Services (also self-explanatory)

When I clicked on Display stored messages  I see my first message I had tested a while back shown on the very next screenshot (that was my test message)

So in order to send messages we can accomplish that task in different ways:

a) Push mechanism (explanation below)

as previously mentioned, you will have to provide a Device ID, a Message ID and message fields. Once you provide that and click on the push button you will see the response from the server with either a success or failure message.

The next approach is sending messages via HTTP post and here is the documentation.

Notice that there are 2 POST buttons and they belong to 2 distinct functions. One is for sending messages and one is for receiving messages. The image below contains the acknowledgement when the message was sent (received by the server)

Then here is the message when receiving the acknowledgement (Documentation first then message)

(message)

Another mechanism/protocol is Sending and receiving messages via Web Sockets (and its documentation)

before sending it

after being sent

once I finished sending and playing around with my IoT service, I wanted to see if I truly got the messages on the server (simulating my device) so I went back to my MMS COckpit and clicked on Display Stored Messages Tile. I see 2 tables which contain my messages. I knew these were my tables because of the name and number of messages in them.

First I clicked on my table with 3 messages and voilá there they were!

as you can see I had started this document back in November 2015, however, due to workload I had not finished it, but I am glad I got back on it, today. I wanted to thank the IoT team for the cockpit and also the HCP team for the IoT service. It is very easy to use and follow (hence 3 months in between without looking at this was not a show stopper)

Please share your experiences and struggles and feel free to ask me questions.

1) what took most of my time

The documentation as I was ready to jump into the exercises

2) what took the least of my time

the configuration of the Device, The device type and the message type was very straight forward.

I was a little confused on the tiles and the different cockpits but once I started truly reading the Tiles and using the documentation, then it was very intuitive and easy to follow

thank you again for reading this blog and looking forward to reading about your experiences as well.

8 Comments
Labels in this area