Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

IBM Bluemix Nice Meetup #1 - CEEI NCA - 20160630 -

812 views

Published on

Internet of Things

Published in: Technology

IBM Bluemix Nice Meetup #1 - CEEI NCA - 20160630 -

  1. 1. hok@fr.ibm.com @IBMFranceLab #bluemix Internet of Things 30 juin 2016 Nice Bluemix Meetup #1 , 30 Juin 2016 Hébergé par CEEI NCA 1 Dominique Hok, Nicolas Comete, Lionel Mommeja ;
  2. 2. Agenda • Introduction à IBM Bluemix – 18H30 par Nicolas Comète , IBM Bluemix Garage Engineer, Nice, -- IBM France • les Objets Connectés pour les Bluemixers – IBM Watson IoT – 18h50 par Lionel Mommeja, Global Industry Solution Center Nice, Technical sales Europe, -- IBM France • Application «Objets connectés dans un contexte industriel avec Bluemix» (démo Live ) - 19H05 par Lionel Mommeja • Application « Smart Garden Sharing,with Bluemix » , lauréate du TMF Hackathon de Nice (7 mai) - 19h30 par Laureen Ginier, Mathias Cousté, Clément Audry, Rémi Pourtier, Florian Rouyer -- Polytech Nice-Sophia. • Q&A - Clôture du meetup – Cocktail- 20H00 2 2
  3. 3. Pour créer un compte Bluemix, c’est simple et gratuit 30 jours sans CB! Get started free sur bluemix.net 3
  4. 4. Pour créer un compte Bluemix, c’est simple et gratuit 30 jours sans CB! Get started free sur bluemix.net 44
  5. 5. Agenda • Introduction à IBM Bluemix – 18H30 par Nicolas Comète , IBM Bluemix Garage Engineer, Nice, -- IBM France • les Objets Connectés pour les Bluemixers – IBM Watson IOT – 18h45 par Lionel Mommeja, Global Industry Solution Center Nice, Technical sales Europe, -- IBM France • Application «Objets connectés dans un contexte industriel avec Bluemix » (démo Live ) 19H00 par Lionel Mommeja • Application « Smart Garden Sharing,with Bluemix » , lauréat du TMF Hackathon de Nice (7 mai) - 19h30 par Laureen Ginier, Mathias Cousté, Clément Audry, Rémi Pourtier, Florian Rouyer -- Polytech Nice-Sophia. • Q&A - Clôture du meetup – Cocktail- 20H00 5 5
  6. 6. Introduction à Bluemix Nicolas Comète Nice Bluemix Garage LEARN THINK CODE RUN CULTURE DELIVERMANAGE
  7. 7. La révolution des applications Web et mobile Nouvelles interactions Objets communicants Big Data Réseaux Sociaux Cognitif
  8. 8. IaaS et PaaS Vs. IT Traditionnel Middleware OS Virtualisation Serveurs Storage Réseau Code Données Runtime Middleware OS Virtualisation Serveurs Storage Réseau IT Traditionnel Iaas Infrastructure as a Service PaaS Platform as a Service Code Données Runtime Middleware OS Virtualisation Serveurs Storage Réseau Code Données Runtime SoftLayer Bluemix
  9. 9. Aperçu de la plateforme Bluemix openwhisk Event runtimes Instant runtimes Containers Machines virtuelles Public Bluemix Dedicated Bluemix Local Bluemix Web Database Mobile Cognitive Analytics IoT Securité Les vôtres ! Options de déploiement Options de déploiementet d'exécution + Catalogue de services Vos applications IntégrationetAPIs DevOpsetoutils
  10. 10. Bluemix DevOps 1. Collaboration Track & Plan, Agile, Scrum 2. Développement Web IDE ou autre IDE 3. Gestion du code source Git, GitHub, SCM Zéro "downtimes" Active Deploy ling & monitoring Autoscaling, Monitoring & analytics 8. Feedback Mobile Quality 4. Intégrationcontinue Delivery pipeline 5. Securité AppScan
  11. 11. Combien ça coûte ? Les services & runtimes sont facturés à l'utilisation Quelques exemples: nodeJS 375 GB.h gratuites puis 0,0526 €/GB.h MongoDB 1 mois gratuit puis 31$/mois pour 1GB Watson Alchemy 1000 appels/jour: 0€
  12. 12. Agenda • Introduction à IBM Bluemix – 18H30 par Nicolas Comète , IBM Bluemix Garage Engineer, Nice, -- IBM France • les Objets Connectés pour les Bluemixers – IBM Watson IoT – 18h50 par Lionel Mommeja, Global Industry Solution Center Nice, Technical sales Europe, -- IBM France • Application «Objets connectés dans un contexte industriel avce Bluemix » (démo Live ) 19H00 par Lionel Mommeja • Application « Smart Garden Sharing,with Bluemix » , lauréate du TMF Hackathon de Nice (7 mai) - 19h30 par Laureen Ginier, Mathias Cousté, Clément Audry, Rémi Pourtier, Florian Rouyer -- Polytech Nice-Sophia. • Q&A - Clôture du meetup – Cocktail- 20H00 1 12
  13. 13. Using Bluemix and Watson IoT Platform 1 - step by step development example 2 - industrial IoT business use case Nice Bluemix Meetup #1 , 30 Juin 2016 Lionel Momméja Executive Architect mommeja@fr.ibm.com @LionelMommeja Global Industry Solutions Center Nice-Paris
  14. 14. We’re here so that… 14 An architect can demonstrate how an IBM Internet of Things solution might work for their client armed only with IBM Bluemix and their own skills.
  15. 15. Overall flow of the solution you’ll develop
  16. 16. Go to the Catalog, and you’ll see how we can build an application. 16 Remember! You can’t all have the sameURL so pick something specific.
  17. 17. 17 Service is up and running
  18. 18. Connecting your devices to IBM Watson IoT Platform
  19. 19. The process of getting data from sensors into applications is easy 19 Registers with Consumes data from
  20. 20. Bluemix provides a Service to enable us to connect the sensor to our app 20 2. Pick Internet of Things Platform service 1. Click add service 3. Ensure your app is selected 4. If correctly added it should appear in your app overview pane
  21. 21. Bluemix provides a Service to enable us to connect the sensor to our app 21 In your app overview pane, click on the IoT service and Launch dashboard
  22. 22. All devices have a unique identifier that we register with the Platform 22 Following the wizard, we simply provide the Device ID and a simple authentication token Make a note of the Authentication Token before leaving the screen as it isn’t repeated — this is how we authenticate! All info will be used to connect the tag to your own IoT service
  23. 23. 23 In this Use Case, Data is coming from an IoT scenario built on Texas Instrument SimpleLink™ SensorTag • The SimpleLink™ SensorTag allows quick and easy prototyping of IoT devices. • SensorTag can easily be connected to IBM IoT Platform • It supports the following sensors: TI SimpleLink™ SensorTag • Humidity and Temperature • Ambient & IR Temperatures • Barometric Pressure • 3 axis Accelerometer • 3 axis Gyroscope • 3 axis Magnetometer • 2 push Buttons • 1 Luxometer
  24. 24. Prepare your sensor… 24 Search for « sensortag » in store
  25. 25. ti-sensortag2 mytitag b84b52 sensortag2 Now we configure the Sensor to send its data to your IoT Platform. 25 Info from previous « Add device » summary screen Tips: Be careful not to leave any default Device ID, type, organization ,etc Don’t forget to save!Click here to edit cloud configuration!
  26. 26. Push to cloud! Look for the flashing red arrow ! That means data is pushed successfully Do not leave this page, don’t go back to the sensor list! If you do so, data will not be sent anymore to the cloud.
  27. 27. View the data coming off your sensorwithout writing any code…
  28. 28. View the data coming off your sensorwithout writing any code… Double-click the Event and Property fields to see pre-filled values Number and Unit are list values (drill down) but you can add your own
  29. 29. View the data coming off your sensorwithout writing any code… Cards are populated as long as your are connected to the page, no history is kept. You have a timeframe zoom at bottom if needed.
  30. 30. Now register your own phone You can pick your own device ID but remember, don’t forget to write down your Authentication Token! iPhone or Android device types are mandatory Device Type (case sensitive) You must create a new device type iPhone or Android, then a device
  31. 31. Now register your phone… http://bit.ly/dstcenter Connect with your intranet credentials
  32. 32. Now register your phone…
  33. 33. Now register your phone…
  34. 34. …and view the data using a new card!
  35. 35. Making use of sensor data
  36. 36. And now you can start building an application! 36 Be sure to access your own application!
  37. 37. …and so we can now use the sensor data in our Node-RED application… 37 The ibmiot node provides the link with the Platform. We just need to reference the device by its ID to start seeing the flow of data via the platform. Authentication is set to Bluemix Service, then all other options default apart from the Device ID and a name for the node.
  38. 38. …and so we can now use the sensor data in our Node-RED application… 38 Try moving the sensor around and watch the data change.
  39. 39. Store data in dashDB Add a dashDB service to your Bluemix project (be careful to add to your app)
  40. 40. …and use the console to create a new table with a create statement Tips If you have an existing data, table could be created by importing the csv file with the « Load from Desktop » menu You can use your own client like DBVisualizer to connect (use bluemix service credentials) Copy & Paste CREATE TABLE TI_EVENTS( ID VARCHAR(20) NOT NULL, TEMP FLOAT NOT NULL, LIGHT FLOAT NOT NULL, ACCELX FLOAT NOT NULL, UPDATED TIMESTAMP NOT NULL );
  41. 41. Create your flow to store the data Put dashDB output node from Storage section and see info on how to prepare data Tip: add some debug nodes!
  42. 42. Here is you Node-RED flow details Transform data function dashBD outputnode Copy & Paste var data = msg.payload.d; msg.payload = { ID : "finstapp-1", LIGHT : data.light, TEMP : data.objectTemp, ACCELX : data.accelX, UPDATED : 'TIMESTAMP' } return msg; Tips: Be careful with copy/paste… check for syntax!
  43. 43. Deploy your flow and look at the debug console In dashDB console, go to Tables and Browse data Look at debug console and look for success or errors If you are lost, you can download this Node-RED flow from here
  44. 44. Integrating Predictive Analytics Service with Node-RED
  45. 45. 45 Internet of Things solutions require an agile collaboration between Data Scientists and Developers • The internet will connect 50 billions devices over the next five years. The increase in connectivity and access to real-time information is creating new opportunities such as improving Return on Asset or enabling new disruptive business models • The internet of things is generating a huge amount of data that can be processed in real-time (or near real-time) for a better reactivity to events • This create two new challenges: ability to handle new types of data sets generated by the “things” and ability to process analytics models in near real- time upon events reception. • These challenges require an agile cooperation between two categories of actors in the I/T which are not really used to work together so far: the data scientists and the developers
  46. 46. 46 Introducing IBM Bluemix Predictive Analytics Service IBM Predictive Analytics is a full-service Bluemix offering that makes it easy for developers and data scientists to work together to integrate predictive capabilities with their applications. Built SPSS analytics platform, Predictive Analytics allows to develop applications that make smarter decisions, solve tough problems, and improve user outcomes DeveloperData Scientist CRISP-DM Bluemix Garage Method
  47. 47. 47 Data Scenario • The scenario is built on fictitious alerts created upon the following combination of conditions: – object temperature > 25 (Warm tag in your hand) – x-axis accelerometer > 0.3 (Shake the take) – light < 5 (Hide the tag in your hands) • But we are not supposed to know yet those conditions… • The data scientist will create and train a model that will discover them using machine learning Alert
  48. 48. 48 Build-time: Simple SPSS Stream aimed at detecting failures from sensor data based on historical records Training input data set based on historical records and - fictitious - failure observations Scoring branch highlighted in blue. Bluemix Predictive Analytics service will discover this branch at load time and execute it when invoked Scoring input is typically real-time or near real-time IoT data collected on Watson IoT Platform. Filter out unnecessary fields specify input and target fields. Target is the alert Chosen machine learning algorithm is a decision tree using Chi- squared Automatic Interaction Detection (CHAID) Model created after execution of the CHAID algorithm (training branch) Scoring output stored in a table after execution of the scoring branch Training branch. This branch is executed at build-time in SPSS to create the model. MQTT Watson IoT PlatformTI SimpleLink™ SensorTag Historical records with failure alerts
  49. 49. 49 Build-time: Reviewing the CHAID Decision Tree Model created after execution of the training branch • When the training branch is executed, a CHAID Decision Tree Model is created based on historical data made of sensor’s data and observed failures • The CHAID Decision Tree is a machine learning algorithm that will attempt to correlate sensor data and failures • This decision tree was created with this training data set • The machine learning algorithm established that when acc_x > 0.29 and light <= 2 and object_temp > 25 then there is a failure for sure.
  50. 50. 50 Build-time: Testing the model in SPSS Modeler Scoring input Failure predicted by the model Confidence Score Scoring input Confidence Score No failure predicted by the model When executing the model, as expected, when all the following conditions are met, the model scores a failure: • object temperature > 25 • x-axis accelerometer > 0.3 • light < 5
  51. 51. 51 Deploying the model in Bluemix Predictive Analytics Service Click here to open the dashboard
  52. 52. 52 Deploying the model in Bluemix Predictive Analytics Service The service will search for a scoring branch Context Id is a label that will be used to identify your model in the API
  53. 53. 53 Binding the Predictive Analytics Service to a Node-RED application and retrieving service URL and Access Key Click here to open the app dashboard Select your predictive analytics service… This is my Node-RED application Access Key Service instance URL
  54. 54. 54 Accessing Predictive Analytics API Documentation The Predictive Analytics service is a set of REST APIs called from any programming language. You can access it here: https://console.ng.bluemix.net/docs/ servi ces/Predi ctiveModeli ng/ind ex- gentopic1.html#genTop ProcId 2 POST http://{service instance}/pm/v1/score/{contextId}?accesskey={access_key for this bound application} { "tablename":“Scoring Input", "header":["object_temp", "acc_x", "light"], "data":[[27, 0.33, 1]]} Body:
  55. 55. 55 Run-time: Invoking the Predictive Analytics Service from Node-RED Invoking the service is as simple as this: Function node http request node
  56. 56. 56 Run-time: Invoking the Predictive Analytics Service from Node-RED Reviewing service invocation results { "topic": "", "payload": "[{"header":["object_temp","acc_x","light","$R-Failure","$RC-Failure"],"data":[[27,0.33,1,1,0.9846153846153847]]}]", "_msgid": "840e7dcc.7bf18", "headers": { "x-powered-by": "Servlet/3.0", "content-type": "application/json;charset=UTF-8", "content-length": "113", "date": "Thu, 12 May 2016 14:52:16 GMT", "set-cookie": ["PASESSIONID=ffffffff0602630a45525d5f4f58455e445a4a421548;path=/;domain=palblyp.pmservice.ibmcloud.com;httponly"] }, "statusCode": 200 } Score result Score input Score confidence
  57. 57. 57 Run-time: Parsing Predictive Analytics Service Results To make parsing easy, use JSON Node to convert json into a javascript object Accessing score result is now simple Score result { "topic": "", "payload": "[{"header":["object_temp","acc_x","light","$R- Failure","$RC-Failure"],"data":[[27,0.33,1,1,0.9846153846153847]]}]", …
  58. 58. 58 With IBM Bluemix Predictive Analytics Service and Node- RED, Developers and Data Scientists can develop new IoT Solutions with Agility Developer Data Scientist
  59. 59. 59 Further Readings • IBM Watson Internet of Things • IBM Predictive Analytics service on Bluemix • My article Using bluemix predictive analytics service in Node-RED on Slideshare • Engage Machine Learning for detecting anomalous behaviors of things an IBM developerWorks recipe featuring Bluemix Apache Spark service, a solution that can help scale-up in term of performance • IBM SPSS Software • Le parti pris des choses, a collection of prose poems on things from Francis Ponge
  60. 60. Using Bluemix and Watson IoT Platform 1 - step by step development example 2 - industrial IoT business use case Nice Bluemix Meetup #1 , 30 Juin 2016 Lionel Momméja Executive Architect mommeja@fr.ibm.com @LionelMommeja Global Industry Solutions Center Nice-Paris
  61. 61. 61
  62. 62. 62
  63. 63. Agenda • Introduction à IBM Bluemix – 18H30 par Nicolas Comète , IBM Bluemix Garage Engineer, Nice, -- IBM France • les Objets Connectés pour les Bluemixers – IBM Watson IOT – 18h45 par Lionel Mommeja, Global Industry Solution Center Nice, Technical sales Europe, -- IBM France • Application «Objets connectés dans un contexte industrielw avec Bluemix » (démo Live ) 19H00 par Lionel Mommeja • Application « Smart Garden Sharing,with Bluemix » , lauréate du TMF Hackathon de Nice (7 mai) - 19h30 par Laureen Ginier, Mathias Cousté, Clément Audry, Rémi Pourtier, Florian Rouyer -- Polytech Nice-Sophia. • Q&A - Clôture du meetup – Cocktail- 20H00 6 63
  64. 64. Garden Sharing / PolyTech Nice
  65. 65. Garden Sharing, avec Bluemix Clément AUDRY - Mathias COUSTÉ - Laureen GINIER - Rémi POURTIER - Florian ROUYER mycampbellrivernow
  66. 66. Présentation de l’équipe
  67. 67. contexte -> hackathon Notre présence ici
  68. 68. Description GardenSharing / GardenCaring Présentation Garden Sharing & Garden Caring
  69. 69. Description Garden Sharing Garden Sharing ● Faire germer des jardins communautaires dans les villes ● Fournirun outilde gestion de ces jardins ● Mettre en contact les propriétaires de terrains et les jardiniers
  70. 70. Garden Caring a ● Aider les jardiniers en herbe à prendre soin de leur potager ● Notification : arrosage des plantes, moments opportuns pour planter, taille ● Etat de santé : ensoleillement, humidité, température ● Conseils intelligents : données de capteurs & météo Description Garden Caring
  71. 71. 3Démonstration de Garden Caring 1 L’architecture de Garden Caring Notre utilisation de Bluemix 2 Feedback sur Bluemix4
  72. 72. L’architecture de Garden Caring 1
  73. 73. Quelles fonctionnalités pour l’utilisateur ? Créer un compte - Se connecter Déclarer des parcelles de potagers - indiquer la plante/culture Associer un capteur connecté à une parcelle Voir température, humidité, luminosité en temps réel Être conseillé par un système expert Configurer son niveau de conseil
  74. 74. L’architecture prévue
  75. 75. L’architecture actuelle
  76. 76. Notre utilisation de Bluemix 2
  77. 77. Node-RED La bonne surprise Prise en main très rapide - ça marche même à 5heures du matin Beaucoup de fonctionnalités
  78. 78. Cloudant Accessible depuis Node-RED Style document (comme mongoDB) - pas de schéma, gain de temps lors du dev Connexion depuis du code externe : - raté lors du Hackathon - réussi plus tard en trouvant la bonne dépendance Maven
  79. 79. Contexte d'exécution : Tomcat Un contexte d'exécution Est prêt en un clic depuis le catalogue Crée automatiquement un répertoire dans HubJazz avec un projet par défaut Possibilité d’ajouter ses propres images
  80. 80. DevOps Services (Hub Jazz) Déploiement automatique (gain de temps) Rien à configurer Interface agréable - super simple à prendre en main
  81. 81. Systèmes experts Weither insight : météo en temps réel Watson Visual Recognition : tester l’image lors de son ajout Papi(s) et mamie(s) : nos meilleurs conseillers Web sémantique : ontologie de gestion de connaissance
  82. 82. Démonstration 3
  83. 83. Feedback 4
  84. 84. Feedback Ce qui nous a plu Facilité de prise en main Bonne intégration des services entre eux Travail collaboratif simple grâce aux organisations et à HubJazz. Difficultés rencontrées Gestion des tableaux dans NodeRed MessageHub & MqLight : services plus compliqués à comprendre au premier coup d’oeil
  85. 85. Pour conclure
  86. 86. Merci pour votre attention
  87. 87. Agenda • Introduction à IBM Bluemix – 18H30 par Nicolas Comète , IBM Bluemix Garage Engineer, Nice, -- IBM France • les Objets Connectés pour les Bluemixers – IBM Watson IOT – 18h45 par Lionel Mommeja, Global Industry Solution Center Nice, Technical sales Europe, -- IBM France • Application «Objets connectés dans un contexte industriel avec Bluemix » (démo Live ) 19H00 par Lionel Mommeja • Application « Smart Garden Sharing,with Bluemix » , lauréate du TMF Hackathon de Nice (7 mai) - 19h30 par Laureen Ginier, Mathias Cousté, Clément Audry, Rémi Pourtier, Florian Rouyer -- Polytech Nice-Sophia. • Q&A - Clôture du meetup – Cocktail- 20H00 8 88
  88. 88. § Offre “Academic Initiative for Cloud § Formez-vous § Garage Bluemix à Nice § Prochains Meetup § Cocktail 8 9 Clôture du meetup
  89. 89. 90 IBM Academic Initiative for Cloud Avoir accès gratuitement à IBMBluemix, c'est facile ! IBM propose un accès privilégié à Bluemix aux enseignants et à leurs étudiants : Pour les enseignants : • Accès gratuit à Bluemix : 40 services + 8 GB de mémoire • Durée : 12 mois renouvelables Pour les étudiants : • Accès gratuit à Bluemix : 10 services + 2 GB de mémoire • Durée : 6 mois renouvelables Comment demander un code promotionnel ? Enseignants : - inscrivez-vous gracieusement au programme IBM Academic Initiative : ibm.biz/IBMAcademicInitiative - votre adhésion validée (quelques jours seront nécessaires), demandez votre code et ceux de vos étudiants en vous enregistrant ici : ibm.biz/OffreCloudAcademic Vous recevrez un mail dans les jours suivants avec votre code. Comment utiliser un code promo ? Il suffit de créer un compte de 30 jours d'essai avec ce lien : ibm.biz/Francebluemix et copier/coller le code promo sur le nombre de jours gratuits inscrit sur votre écran Bluemix Contact : Cloud_Ecosystem@fr.ibm.com
  90. 90. Pour vous former Formation en ligne gratuite • “Déployez des applications dans le cloud avec Bluemix” http://ibm.biz/BluemixMOOC • “Utilisez des API Rest dans vos projets WEB” http://ibm.biz/BluemixMOOC_API_REST Webinars Bluemix Suivez un des nombreux webinars Bluemix (Replays disponibles) http://ibm.biz/BluemixWebinarsFR Communauté Dev Bluemix Consultez le blog avec toutes les actualités et posez toutes vos questions sur Stackoverflow http://ibm.biz/BluemixDeveloperCommunity Developpez.com Suivez la nouvelle Rubrique dédiée à IBM Bluemix sur Developpez.com avec les actualités et les publications https://ibm.biz/bluemix-developpez-com 91
  91. 91. Garage IBM Bluemix Lancement du 1er Garage IBM Bluemix en France le 23 mars à Nice Programme de développement rapide d'applications innovantes s'appuyant sur la méthode IBM Design Thinking. Hébergé ici au CEEI NCA. 92
  92. 92. 11 Octobre 2016 CEEI NCA , Journée Innovascience -Meetup Nice Bluemix #2 – à confirmer, à la rentrée . Suivez nous sur @IBMFranceLab #bluemix 30 juin 2016 93 -Meetup Nice Bluemix #3
  93. 93. Merci ! 9 mars 2016 94

×