Search This Blog

Tuesday, March 28, 2017

Maximo asset health insights , WATSON iot quick start

I have been doing a lot of work on IOT and one interesting thing that came to me was Maximo asset health insights which collects real time asset data and on based of a scoring system shows the asset health.

I will give you a brief on what all i did to get this working.
Create a bluemix account – 30 days free account will work , don’t move it to lite account
remain a standard account, ibm recently started giving suggestions via bots to move to lite account.(This poc won’t work with lite account it has to be standard bluemix account)

Boiler plates –> IOT quick start, give a unique id and create the app.
It will generate two services also , cloudant and iotf service.
Both of them will be used to get this poc going.

Now create a new device type , lets say temperate sensor and save it , now register new devices under this device types.

Note down the device details generated after adding the device, like org, api etc.
Org, api token will be used while sending data to this device via the simulator explained below.

Use the watson temperature simulator to connect the device virtually.
http://watson-iot-sensor-simulator.mybluemix.net/
You will see the device is connected.
image

Now click on manage schema and add the schema from the connected device.
image
image

All the fields of schema will be auto created, please note the value we are interested is d.temperature  and this will be used later.
Now attach your cloudant service to your iot platform dashboard –>Extensions.
bind your cloudant to your iot, and click confirm(popup will open , make sure popups allowed)
image

After configuring it will show configured.
Now go back to your app which you created and note down the credentials.
image


Note down both the credentials and this will be used while configuring maximo in next
Now attach a meter to an asset and configure the watson parameters in the work center.
make sure you create system properties, crontask and endpoints for historian.
I faced one OSLC error on chrome console while performing this poc, reason was that the mapping i did while adding meters were wrong. (It has to be d.temperature not d.Temperature)

Maximo 7.6.06 with BIM integration

Bim stands for building information model, these are the fancy 3d models which auto cad/cam guys make in their 3d software.

Now maximo has the capability to integrate with it via COBIE files, which is actually an international exchange format for exchange of modeling data.

Maximo supports BIM by providing an extension to Maximo 7.6.06, though i heard that the feature pack supports the integration with BIM out of the box. Atleast i couldn’t find all the apps even after giving access to all the BIM apps via security groups.

So i had to run the bim extension on top of my Maximo 7.6.06.

BIm can be downloaded here.

https://www-304.ibm.com/software/brandcatalog/ismlibrary/details?catalog.label=1TW10MA44

 

While running this extension on top of your maximo , please check read me file in the extension it is very important as i wasted 2 days and installed on wrong version.

This extension is valid for 7.6.6 and not on 7.5.

Another thing that i had to do was to edit the biminstall command in tools as it was continuously giving file not found errors while running.

Check the bat file, it has some missing file.

Open the /en/bim and bimlmv folder and check if all dbc/mxs/msg files are present in maximo scripts.

I would say you can call the script files inside command line , manually one by one.

call runscriptfile -cbim -fV7606_01 and similarly run all manually.

*You will find unique index constraints if you try to run these scripts again on same db, you can ignore them.

 

Now updatedb and rebuild the ear and start Maximo, give access to bim apps via security groups.

 

Now the most important step is importing certificate in websphere without which you wont see your model inside the autodesk viewer. To complete that, check install guide in bim extension.

Maximo extensions for Building Information Models- Install Guide – last section.

 

Please make sure you use websphere to import the certificates in the app server, with weblogic you will have to manually pull the certificate chain from autodesk.api.developer.com and import in the trust store of weblogic 12.

 

openssl s_client -showcerts –connect developer.api.autodesk.com:443 < /dev/null | openssl x509 -outform DER > derp.der

import using keytool inside the demotrust.jks and restart weblogic.

 

Now register to autodesk developer account and create a forge app and get the client secret and key.

https://accounts.autodesk.com/register

Use that secret and key in maximo system properties, make sure you edit only these two properties, nothing else is required.

Now check the samples folder inside the bim extension and locate Barton Keep.xls

Import the model using the import cobie data option inside the bim project application.

Create a project session and import the cobie data, if you face some POI errors regarding xls conversions or apache problems. Please check for duplicate jar files inside the lib folder of Maximo. ( Install guide mentions appending poi libs to maximo.ear build,which can insert duplicate poi and it can give errors while execution, atleast i faced it)

If project session completed and validated it will import few locations inside maximo which will be below your main location which you selected before cobie import.

Now go to Manage storage in Manage BIM viewer and try to create a storage, a bucket on remote autodesk cloud which will hold your model data.

If you are lucky , you should see a bucket created and linked else troubleshoot ssl errors.

Create bucket with defaults with retention and append key options.

Now import a model in this storage from the select action and register the viewable.

Import the default .rvt file in samples to this model and register the viewable.

image

Now if all is fine you will get a base64 encoded urn for the model which is uploaded in the autodesk clould.

Wola, now your model is pushed and linked to maximo and you should be able to create a bim model.

Select a location and specify this base 64 urn inside the url for this location and check the 3d tab and you should be able to see the model in 3d.

 

Great, now you should be able to import other models, register viewable and attach to locations or assets.

I would be more than happy to help you in this, comment if you need help.

IBM doesn’t seem very interested in maintaining this, so i am expecting a limited support for this extension.

 

Ohh and not to forget, it finally looks like this.

 

bim_fixed_7.6

 

IBM Websphere 8.5.5 +Maximo 7.6.06 +sql server 2014

No suitable driver found while starting Maximo with sqlserver

If you are using Maximo with sql server or any other database like db2, you might face a problem where websphere is not able to connect to database.

I faced this in Websphere 9 and 8.5.5.

So i had to modify my maximo.properties file and drop sqljdbc.jar in lib directory.

uncomment the mxe.db.driver property with appropriate driver , if you have sql uncomment it.

Place a new line before mxe.db.url property and rebuild,redeploy and restart.

I could directly find my maximo.ear in /installedapps and edited there.

 

It worked for me.

Keep reading !

Friday, March 17, 2017

db2 not listening on port, connection refused on server boot.

 

 

If you are using community version , you might have configured tcp/ip for your dbcopy to listen on and you must have used db2admin as the master user for all accounts.

 

Once you start the server and it doesn’t connect, it could be because of the tcp/ip setting not configured for your instance.

if you want to connect or view table data use db2cmd  to initialize command line env

 

db2> connect to dbname user db2admin using password

 

// just to check if you are able to connect to your database.

if you are able to connect, that means your database is active and its not listening on the port.

 

Do a netstat –an from command line and see if your listening port is available, if not read below.

 

 

P.S when i had setup the db2 , i configured tcp/ip to listen to 5002 for ibm ioc, but this wasn’t reflected and i don’t know why.

 

Troubleshoot

view your db2set –all and see if db2comm is set.

if not read below.

 

db2set DB2COMM=tcpip

db2 update DBM CFG using SVCENAME 50002

db2stop force  -- from admin cmd window
db2start 
Retry the ear from eclipse 
 
 
 
 
/// Ref db2 connection refused connect. errorcode=-4499 sqlstate=08001