Date post: | 09-Jan-2017 |
Category: |
Technology |
Upload: | ibm-france-lab |
View: | 447 times |
Download: | 1 times |
[email protected]@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 ;
Agenda
• Introduction à IBM Bluemix – 18H30par Nicolas Comète , IBM Bluemix Garage Engineer, Nice, -- IBM France
• les Objets Connectés pour les Bluemixers – IBM Watson IoT – 18h50par 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
22
Pour créer un compte Bluemix,c’est simple et gratuit 30 jours sans CB!
Get started free sur bluemix.net
3
Pour créer un compte Bluemix,c’est simple et gratuit 30 jours sans CB!Get started free sur bluemix.net
44
Agenda
• Introduction à IBM Bluemix – 18H30par Nicolas Comète , IBM Bluemix Garage Engineer, Nice, -- IBM France
• les Objets Connectés pour les Bluemixers – IBM Watson IOT – 18h45par 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
55
Introduction à Bluemix
Nicolas Comète
Nice Bluemix GarageLEARN
THINK
CODE
RUN
CULTURE
DELIVERMANAGE
La révolution des applications
Web et mobile
Nouvelles interactions
Objets communicants
Big Data
Réseaux Sociaux
Cognitif
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 IaasInfrastructure as a Service
PaaSPlatform as a Service
Code
Données
Runtime
Middleware
OS
Virtualisation
Serveurs
Storage
Réseau
Code
Données
Runtime
SoftL
ayer
Blue
mix
Aperçu de la plateforme Bluemix
openwhisk
Event runtimes Instant runtimes Containers Machines virtuelles
PublicBluemix
DedicatedBluemix
LocalBluemix
Web Database Mobile Cognitive Analytics IoT Securité Les vôtres !
Options de déploiement
Options de déploiement et d'exécution
+Catalogue de services
Vos applicationsIntégrationet A
PIsDev
Ops
et o
utils
Bluemix DevOps
1. CollaborationTrack & Plan, Agile, Scrum
2. DéveloppementWeb IDE ou autre IDE
3. Gestion du code sourceGit, GitHub, SCM
Zéro "downtimes"Active Deploy
7. Scaling & monitoringAutoscaling, Monitoring &
analytics
8. FeedbackMobile Quality
4. Intégration continueDelivery pipeline
5. SecuritéAppScan
Combien ça coûte ?
Les services & runtimes sont facturés à l'utilisationQuelques exemples:
nodeJS375 GB.h gratuites
puis 0,0526 €/GB.h
MongoDB1 mois gratuit puis
31$/mois pour 1GB
Watson Alchemy1000 appels/jour: 0€
Agenda
• Introduction à IBM Bluemix – 18H30par Nicolas Comète , IBM Bluemix Garage Engineer, Nice, -- IBM France
• les Objets Connectés pour les Bluemixers – IBM Watson IoT – 18h50par Lionel Mommeja, Global Industry Solution Center Nice, Technical sales
Europe, -- IBM France
• Application «Objets connectés dans un contexte industriel avceBluemix » (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
112
Using Bluemix and Watson IoTPlatform1 - step by step development example2 - industrial IoT business use case
Nice Bluemix Meetup #1 , 30 Juin 2016
Lionel MomméjaExecutive [email protected]@LionelMommeja
Global Industry Solutions CenterNice-Paris
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.
Overall flow of the solution you’ll develop
Go to the Catalog, and you’ll see how we can build an application.
16
Remember!You can’t all have the same URL so pick something
specific.
17
Service is up and running
Connecting your devices to IBM Watson IoT Platform
The process of getting data from sensors into applications is easy
19
Registers with
Consumes data from
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 isselected
4. If correctly added it shouldappear in your app overview
pane
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
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 authenticationtoken
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
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 IoTdevices.
• 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
Prepare your sensor…
24
Search for « sensortag » in store
ti-sensortag2
mytitag
b84b52
sensortag2
Now we configure the Sensor to send its data to your IoT Platform.
25
Info from previous « Adddevice » summary screen
Tips: Be careful not to leaveany default Device ID, type, organization ,etc
Don’t forget to save!Click here to edit cloud configuration!
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.
View the data coming off your sensor without writing any code…
View the data coming off your sensor without writing any code…
Double-click the Event and
Property fields to see pre-filled
values
Number and Unit are listvalues (drill down) but you can
add your own
View the data coming off your sensor without 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.
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
Now register your phone…
http://bit.ly/dstcenter
Connect with your intranet credentials
Now register your phone…
Now register your phone…
…and view the data using a new card!
Making use of sensor data
And now you can start building an application!
36
Be sure to access your own application!
…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.
…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.
Store data in dashDB
Add a dashDB service to your Bluemix project (be careful to add to your app)
…and use the console to create a new table with a create statement
TipsIf you have an existing data, table could be created by importing the csv file with the « Loadfrom Desktop » menuYou can use your own client like DBVisualizer to connect (use bluemix service credentials)
Copy & PasteCREATE TABLE TI_EVENTS(
ID VARCHAR(20) NOT NULL,TEMP FLOAT NOT NULL,LIGHT FLOAT NOT NULL,ACCELX FLOAT NOT NULL,UPDATED TIMESTAMP NOT NULL );
Create your flow to store the dataPut dashDB output node from Storage section and see info on how to prepare data
Tip: add some debug nodes!
Here is you Node-RED flow details
Transform data function
dashBD outputnode
Copy & Pastevar 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!
Deploy your flow and look at the debug console
In dashDB console, go to Tables and Browse data
Lookatdebugconsoleandlookforsuccess orerrors
If you are lost, you can download this Node-RED flow from here
Integrating Predictive Analytics Service with Node-RED
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
Introducing IBM Bluemix Predictive Analytics ServiceIBM 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
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
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.
MQTTWatson IoT PlatformTI SimpleLink™ SensorTag
Historical records with failure alerts
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
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
Deploying the model in Bluemix Predictive Analytics Service
Click here to open the
dashboard
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
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 applicationAccess KeyService instance URL
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
Run-time: Invoking the Predictive Analytics Service from Node-RED
Invoking the service is as simple as this:
Function node
http request node
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
Run-time: Parsing Predictive Analytics Service Results
To make parsing easy, use JSON Node to convert jsoninto 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
With IBM Bluemix Predictive Analytics Service and Node-RED, Developers and Data Scientists can develop new IoTSolutions with Agility
Developer Data Scientist
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
Using Bluemix and Watson IoTPlatform1 - step by step development example2 - industrial IoT business use case
Nice Bluemix Meetup #1 , 30 Juin 2016
Lionel MomméjaExecutive [email protected]@LionelMommeja
Global Industry Solutions CenterNice-Paris
61
62
Agenda
• Introduction à IBM Bluemix – 18H30par Nicolas Comète , IBM Bluemix Garage Engineer, Nice, -- IBM France
• les Objets Connectés pour les Bluemixers – IBM Watson IOT – 18h45par 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
663
Garden Sharing / PolyTech Nice
Garden Sharing, avec BluemixClément AUDRY - Mathias COUSTÉ - Laureen GINIER - Rémi POURTIER - Florian ROUYER
mycampbellrivernow
Présentation de l’équipe
contexte -> hackathon
Notre présence ici
Description GardenSharing / GardenCaring
Présentation Garden Sharing &
Garden Caring
Description Garden Sharing
Garden Sharing● Faire germer des jardins communautaires dans les villes
● Fournir un outil de gestion de ces jardins● Mettre en contact les propriétaires de terrains et les jardiniers
Garden Caringa
● 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
3 Démonstration de Garden Caring
1 L’architecture de Garden Caring
Notre utilisation de Bluemix 2
Feedback sur Bluemix4
L’architecture de Garden Caring
1
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
L’architecture prévue
L’architecture actuelle
Notre utilisation de Bluemix
2
Node-RED
La bonne surprise
Prise en main très rapide - ça marche même à 5heures du matin
Beaucoup de fonctionnalités
Cloudant
Accessible depuis Node-RED
Style document (comme mongoDB) - pas de schéma, gain de
temps lors du devConnexion depuis du code externe :- raté lors du Hackathon
- réussi plus tard en trouvant la bonne dépendance Maven
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
DevOps Services (Hub Jazz)Déploiement automatique (gain de temps)
Rien à configurer
Interface agréable - super simple à prendre en main
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
Démonstration
3
Feedback
4
Feedback
Ce qui nous a pluFacilité de prise en mainBonne intégration des services entre euxTravail collaboratif simple grâce aux organisations et à HubJazz.
Difficultés rencontréesGestion des tableaux dans NodeRedMessageHub & MqLight : services plus compliqués à comprendre
au premier coup d’oeil
Pour conclure
Merci pour votre attention
Agenda
• Introduction à IBM Bluemix – 18H30par Nicolas Comète , IBM Bluemix Garage Engineer, Nice, -- IBM France
• les Objets Connectés pour les Bluemixers – IBM Watson IOT – 18h45par 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
888
§ Offre “Academic Initiative for Cloud§ Formez-vous § Garage Bluemix à Nice § Prochains Meetup§ Cocktail
89
Clôture du meetup
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 serontné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 inscritsur votre écran Bluemix
Contact : [email protected]
Pour vous former
Formation en lignegratuite
• “Déployez des applications dans le cloud avec Bluemix”http://ibm.biz/BluemixMOOC• “Utilisez des API Rest dans vos projetsWEB”http://ibm.biz/BluemixMOOC_API_REST
Webinars BluemixSuivez un des nombreux webinars Bluemix (Replays disponibles)
http://ibm.biz/BluemixWebinarsFR
CommunautéDev Bluemix
Consultez le blog avec toutes les actualitéset posez toutes vos questions surStackoverflow
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
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
11 Octobre 2016CEEI 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
Merci !9 mars 2016 94