Outils pour utilisateurs

Outils du site


cours:ds4h_iot_2018

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
cours:ds4h_iot_2018 [2018/10/19 07:44]
tigli [Main commercial platforms]
cours:ds4h_iot_2018 [2018/12/17 20:48] (Version actuelle)
tigli [Optionnal Project]
Ligne 120: Ligne 120:
  
  
-==== Optionnal ​Project ====+==== Optional ​Project ====
  
 This project aims to use a IoT devices simulator in a Smart Home Context. This project aims to use a IoT devices simulator in a Smart Home Context.
Ligne 133: Ligne 133:
 ---- ----
  
-([[cours:​DS4HIoT:​correcions|Old Corrections]])+([[cours:​DS4HIoT:​correcions|Corrections ​Page]])
  
- 
-== Web Services Accesses == 
- 
-// be careful, if you want to use Web Services to access to ThingSpeak first you must create channels to publish data and get the corresponding keys  // 
- 
-  * Dataflow that publishes/​displays a changing data in ThingSpeak, using timer  
- 
-// This example uses a key of the 275 public channel : https://​sparks-vm24.i3s.unice.fr/​channels/​275 ​ // 
- 
-<​code>​ 
-[{"​id":"​b6ba693.b940298","​type":"​inject","​z":"​2ce2a219.894e3e","​name":"​Inject data","​topic":"","​payload":"​-5","​payloadType":"​num","​repeat":"","​crontab":"","​once":​false,"​onceDelay":​0.1,"​x":​160,"​y":​580,"​wires":​[["​d23c2100.93cbc"​]]},​{"​id":"​9dde6e7f.3cd66","​type":"​delay","​z":"​2ce2a219.894e3e","​name":"​delai repet","​pauseType":"​delay","​timeout":"​5","​timeoutUnits":"​seconds","​rate":"​1","​nbRateUnits":"​1","​rateUnits":"​second","​randomFirst":"​1","​randomLast":"​5","​randomUnits":"​seconds","​drop":​false,"​x":​390,"​y":​660,"​wires":​[["​7db93689.4f46c8"​]]},​{"​id":"​a61123ff.96303","​type":"​http request","​z":"​2ce2a219.894e3e","​name":"","​method":"​GET","​ret":"​txt","​url":"​https://​sparks-vm24.i3s.unice.fr/​update?​key=F5OBSRU54WPK0XSA&​field1={{{field1}}}&​field2={{{field2}}}&​field3={{{field3}}}&​field4={{{field4}}}","​tls":"","​x":​620,"​y":​580,"​wires":​[[]]},​{"​id":"​d23c2100.93cbc","​type":"​function","​z":"​2ce2a219.894e3e","​name":"​set fields","​func":"​msg.field1 = msg.payload;​\nmsg.field2 = msg.payload + 1;​\nmsg.field3 = msg.payload - 1;​\nmsg.field4 = msg.payload * 2;\nreturn msg;","​outputs":​1,"​noerr":​0,"​x":​400,"​y":​580,"​wires":​[["​9dde6e7f.3cd66","​a61123ff.96303"​]]},​{"​id":"​7db93689.4f46c8","​type":"​function","​z":"​2ce2a219.894e3e","​name":"​increment","​func":"​msg.payload++;​\nreturn msg;","​outputs":​1,"​noerr":​0,"​x":​390,"​y":​720,"​wires":​[["​d23c2100.93cbc"​]]}] 
-</​code>​ 
- 
-    ​ 
-  * Dataflow that gets weather information on OpenWeatherMap Web Service (here, students can use my API key but without any guarantee). In case of problem, get your own API key after free registration. 
- 
-<​code>​ [{"​id":"​452441aa.07cbd","​type":"​inject","​z":"​2ce2a219.894e3e","​name":"","​topic":"","​payload":"​Biot,​FR","​payloadType":"​str","​repeat":"","​crontab":"","​once":​false,"​onceDelay":​0.1,"​x":​810,"​y":​400,"​wires":​[["​abb00141.4754c"​]]},​{"​id":"​65daee20.15c48","​type":"​inject","​z":"​2ce2a219.894e3e","​name":"","​topic":"","​payload":"​Moscow,​RU","​payloadType":"​str","​repeat":"","​crontab":"","​once":​false,"​onceDelay":​0.1,"​x":​830,"​y":​460,"​wires":​[["​abb00141.4754c"​]]},​{"​id":"​abb00141.4754c","​type":"​http request","​z":"​2ce2a219.894e3e","​name":"​OpenWeatherMap Request","​method":"​GET","​ret":"​txt","​url":"​http://​api.openweathermap.org/​data/​2.5/​weather?​q={{{payload}}}&​appid=8e35e9a5638ee0540022a6b38d9ea89c","​tls":"","​x":​1040,"​y":​380,"​wires":​[["​10bf958d.e421aa"​]]},​{"​id":"​fc448289.27d86","​type":"​debug","​z":"​2ce2a219.894e3e","​name":"","​active":​true,"​tosidebar":​true,"​console":​false,"​tostatus":​false,"​complete":"​false","​x":​1250,"​y":​440,"​wires":​[]},​{"​id":"​10bf958d.e421aa","​type":"​function","​z":"​2ce2a219.894e3e","​name":"​parse and format","​func":"​var obj = JSON.parse(msg.payload);​\nmsg.payload = obj.name + \":​\"​ + obj.weather[0].main;​\nreturn msg;","​outputs":​1,"​noerr":​0,"​x":​1070,"​y":​480,"​wires":​[["​fc448289.27d86"​]]}] 
-</​code>​ 
-  
-==  Dataflow that gets information from OpenHAB == 
-      * using a OpenHab MQTT flow 
-<​code>​ 
-         ​[{"​id":"​7e96c990.582bf8","​type":"​mqtt in","​z":"​2ce2a219.894e3e","​name":"","​topic":"​openhab/#","​qos":"​2","​broker":"​aa872460.7dff18","​x":​120,"​y":​160,"​wires":​[["​e6cd4834.c78e68"​]]},​{"​id":"​e6cd4834.c78e68","​type":"​debug","​z":"​2ce2a219.894e3e","​name":"","​active":​true,"​tosidebar":​true,"​console":​false,"​tostatus":​false,"​complete":"​false","​x":​390,"​y":​160,"​wires":​[]},​{"​id":"​420c7771.ed7e08","​type":"​mqtt out","​z":"​2ce2a219.894e3e","​name":"","​topic":"​openhab/​zwave_device_1b2be295_node4_switch_binary/​commandssub","​qos":"","​retain":"","​broker":"​aa872460.7dff18","​x":​1000,"​y":​160,"​wires":​[]},​{"​id":"​2bfce164.02ee0e","​type":"​inject","​z":"​2ce2a219.894e3e","​name":"​Prise ON","​topic":"","​payload":"​ON","​payloadType":"​str","​repeat":"","​crontab":"","​once":​false,"​onceDelay":​0.1,"​x":​620,"​y":​140,"​wires":​[["​420c7771.ed7e08"​]]},​{"​id":"​1165f273.5a523e","​type":"​inject","​z":"​2ce2a219.894e3e","​name":"​Prise OFF","​topic":"","​payload":"​OFF","​payloadType":"​str","​repeat":"","​crontab":"","​once":​false,"​onceDelay":​0.1,"​x":​620,"​y":​180,"​wires":​[["​420c7771.ed7e08"​]]},​{"​id":"​aa872460.7dff18","​type":"​mqtt-broker","​z":"","​name":"​192.168.137.93","​broker":"​192.168.137.93","​port":"​1883","​clientid":"","​usetls":​false,"​compatmode":​true,"​keepalive":"​60","​cleansession":​true,"​birthTopic":"","​birthQos":"​0","​birthPayload":"","​closeTopic":"","​closePayload":"","​willTopic":"","​willQos":"​0","​willPayload":""​}] 
-</​code>​ 
- 
-      * using the OpenHab REST API  
-<​code>​ 
-[{"​id":"​b72e122c.7d834","​type":"​inject","​z":"​2ce2a219.894e3e","​name":"​Prise ON","​topic":"","​payload":"​ON","​payloadType":"​str","​repeat":"","​crontab":"","​once":​false,"​onceDelay":​0.1,"​x":​840,"​y":​580,"​wires":​[["​ba7d98c.9efac68"​]]},​{"​id":"​5bf29976.e28098","​type":"​inject","​z":"​2ce2a219.894e3e","​name":"​Prise OFF","​topic":"","​payload":"​OFF","​payloadType":"​str","​repeat":"","​crontab":"","​once":​false,"​onceDelay":​0.1,"​x":​840,"​y":​620,"​wires":​[["​ba7d98c.9efac68"​]]},​{"​id":"​ba7d98c.9efac68","​type":"​http request","​z":"​2ce2a219.894e3e","​name":"​OpenHAB Node4","​method":"​POST","​ret":"​txt","​url":"​http://​192.168.137.93:​8080/​rest/​items/​zwave_device_1b2be295_node4_switch_binary","​tls":"","​x":​1050,"​y":​600,"​wires":​[["​96d0f087.426fa"​]]},​{"​id":"​96d0f087.426fa","​type":"​debug","​z":"​2ce2a219.894e3e","​name":"","​active":​true,"​tosidebar":​true,"​console":​false,"​tostatus":​false,"​complete":"​false","​x":​1260,"​y":​600,"​wires":​[]}] 
- 
-</​code>​ 
- 
- 
-== Loop to read OpenHab sensor value  == 
- 
-<​code>​ 
-[{"​id":"​5e2906c6.ff0a28","​type":"​http request","​z":"​a1550bd9.1468c8","​name":"","​method":"​GET","​ret":"​txt","​url":"​http://​192.168.1.134:​8080/​rest/​items/​zwave_device_1b2be295_node10_sensor_temperature/​state","​tls":"","​x":​406.10003662109375,"​y":​180.1999969482422,"​wires":​[["​abf47735.d71a28"​]]},​{"​id":"​61272c17.7ce984","​type":"​inject","​z":"​a1550bd9.1468c8","​name":"","​topic":"","​payload":"","​payloadType":"​date","​repeat":"​3","​crontab":"","​once":​false,"​onceDelay":​0.1,"​x":​272.1000061035156,"​y":​73,"​wires":​[["​5e2906c6.ff0a28"​]]},​{"​id":"​abf47735.d71a28","​type":"​debug","​z":"​a1550bd9.1468c8","​name":"","​active":​true,"​tosidebar":​true,"​console":​false,"​tostatus":​false,"​complete":"​payload","​x":​624.1000366210938,"​y":​180.40000915527344,"​wires":​[]}] 
-[{"​id":"​a1550bd9.1468c8","​type":"​tab","​label":"​Flow 2","​disabled":​false,"​info":""​},​{"​id":"​5e2906c6.ff0a28","​type":"​http request","​z":"​a1550bd9.1468c8","​name":"","​method":"​GET","​ret":"​txt","​url":"​http://​192.168.1.134:​8080/​rest/​items/​zwave_device_1b2be295_node10_sensor_luminance/​state","​tls":"","​x":​406.10003662109375,"​y":​180.1999969482422,"​wires":​[["​abf47735.d71a28","​89172555.a47bc8"​]]},​{"​id":"​61272c17.7ce984","​type":"​inject","​z":"​a1550bd9.1468c8","​name":"","​topic":"","​payload":"","​payloadType":"​date","​repeat":"​3","​crontab":"","​once":​false,"​onceDelay":​0.1,"​x":​272.1000061035156,"​y":​73,"​wires":​[["​5e2906c6.ff0a28"​]]},​{"​id":"​abf47735.d71a28","​type":"​debug","​z":"​a1550bd9.1468c8","​name":"","​active":​true,"​tosidebar":​true,"​console":​false,"​tostatus":​false,"​complete":"​payload","​x":​624.1000366210938,"​y":​180.40000915527344,"​wires":​[]},​{"​id":"​89172555.a47bc8","​type":"​http request","​z":"​a1550bd9.1468c8","​name":"","​method":"​GET","​ret":"​txt","​url":"​https://​sparks-vm24.i3s.unice.fr/​update?​key=F5OBSRU54WPK0XSA&​field1={{{payload}}}","​tls":"","​x":​519.1000366210938,"​y":​276,"​wires":​[[]]}]-- 
-</​code>​ 
- 
-== Correction for optionnal Home IO manipulations == 
- 
-// Find in the Home I/O installation directory, a zip/csv file that gives the sensors list with prefixes A,B,C ... // 
- 
- 
-   * Dataflow that get boolean sensors information in room A 
- 
-<​code>​ 
-[{"​id":"​72ccc74c.836b88","​type":"​mqtt in","​z":"​2ce2a219.894e3e","​name":"","​topic":"/​home/​A/​Input/​bool/#","​qos":"​2","​broker":"​53b33537.72499c","​x":​200,"​y":​360,"​wires":​[["​7f13ecda.da48c4"​]]},​{"​id":"​7f13ecda.da48c4","​type":"​debug","​z":"​2ce2a219.894e3e","​name":"","​active":​true,"​tosidebar":​true,"​console":​false,"​tostatus":​false,"​complete":"​false","​x":​460,"​y":​360,"​wires":​[]},​{"​id":"​53b33537.72499c","​type":"​mqtt-broker","​z":"","​name":"​localhost","​broker":"​localhost","​port":"​1883","​clientid":"","​usetls":​false,"​compatmode":​true,"​keepalive":"​60","​cleansession":​true,"​birthTopic":"","​birthQos":"​0","​birthPayload":"","​closeTopic":"",​ 
-        "​closeQos":"​0","​closePayload":"","​willTopic":"","​willQos":"​0","​willPayload":""​}] 
-</​code>​ 
- 
-   * Dataflow that controls lights in room A 
-<​code>​ 
-[{"​id":"​18542933.86d2c7","​type":"​mqtt out","​z":"​2ce2a219.894e3e","​name":"","​topic":"/​home/​A/​Output/​bool/​Lights","​qos":"","​retain":"","​broker":"​53b33537.72499c","​x":​540,"​y":​460,"​wires":​[]},​{"​id":"​3b14a0e3.3cf4c","​type":"​inject","​z":"​2ce2a219.894e3e","​name":"​Lampes ON","​topic":"","​payload":"​true","​payloadType":"​bool","​repeat":"","​crontab":"","​once":​false,"​onceDelay":​0.1,"​x":​170,"​y":​440,"​wires":​[["​18542933.86d2c7"​]]},​{"​id":"​9cc3ec49.cc846","​type":"​inject","​z":"​2ce2a219.894e3e","​name":"​Lampes OFF","​topic":"","​payload":"​false","​payloadType":"​bool","​repeat":"","​crontab":"","​once":​false,"​onceDelay":​0.1,"​x":​170,"​y":​480,"​wires":​[["​18542933.86d2c7"​]]},​{"​id":"​53b33537.72499c","​type":"​mqtt-broker","​z":"","​name":"​localhost","​broker":"​localhost","​port":"​1883","​clientid":"","​usetls":​false,"​compatmode":​true,"​keepalive":"​60","​cleansession":​true,"​birthTopic":"","​birthQos":"​0","​birthPayload":"","​closeTopic":"","​closeQos":"​0","​closePayload":"","​willTopic":"","​willQos":"​0","​willPayload":""​}] 
-</​code>​ 
-        
-** Link one Home IO virtual switch to a real light in OpenHab ** 
- 
-<​code>​ 
-[{"​id":"​63cba22a.43de3c","​type":"​mqtt in","​z":"​2ce2a219.894e3e","​name":"","​topic":"/​home/​A/​Input/​bool/​Up-Down_Switch_1_(Up)","​qos":"​2","​broker":"​53b33537.72499c","​x":​310,"​y":​960,"​wires":​[["​88c2d0ba.4c8b9"​]]},​{"​id":"​779f82d3.a80d4c","​type":"​mqtt in","​z":"​2ce2a219.894e3e","​name":"","​topic":"/​home/​A/​Input/​bool/​Up-Down_Switch_1_(Down)","​qos":"​2","​broker":"​53b33537.72499c","​x":​320,"​y":​1020,"​wires":​[["​e44a55cd.753418"​]]},​{"​id":"​88c2d0ba.4c8b9","​type":"​switch","​z":"​2ce2a219.894e3e","​name":"​filter true","​property":"​payload","​propertyType":"​msg","​rules":​[{"​t":"​eq","​v":"​True","​vt":"​str"​}],"​checkall":"​true","​repair":​false,"​outputs":​1,"​x":​600,"​y":​960,"​wires":​[["​529f2ff8.62271"​]]},​{"​id":"​e44a55cd.753418","​type":"​switch","​z":"​2ce2a219.894e3e","​name":"​filter true","​property":"​payload","​propertyType":"​msg","​rules":​[{"​t":"​eq","​v":"​True","​vt":"​str"​}],"​checkall":"​true","​repair":​false,"​outputs":​1,"​x":​600,"​y":​1020,"​wires":​[["​63d5e341.6a145c"​]]},​{"​id":"​529f2ff8.62271","​type":"​change","​z":"​2ce2a219.894e3e","​name":"​convert payload","​rules":​[{"​t":"​set","​p":"​payload","​pt":"​msg","​to":"​ON","​tot":"​str"​}],"​action":"","​property":"","​from":"","​to":"","​reg":​false,"​x":​800,"​y":​960,"​wires":​[["​37074f0a.af995"​]]},​{"​id":"​63d5e341.6a145c","​type":"​change","​z":"​2ce2a219.894e3e","​name":"​convert payload","​rules":​[{"​t":"​set","​p":"​payload","​pt":"​msg","​to":"​OFF","​tot":"​str"​}],"​action":"","​property":"","​from":"","​to":"","​reg":​false,"​x":​800,"​y":​1020,"​wires":​[["​37074f0a.af995"​]]},​{"​id":"​37074f0a.af995","​type":"​mqtt out","​z":"​2ce2a219.894e3e","​name":"","​topic":"​openhab/​zwave_device_1b2be295_node4_switch_binary/​commandssub","​qos":"","​retain":"","​broker":"​aa872460.7dff18","​x":​1230,"​y":​1000,"​wires":​[]},​{"​id":"​53b33537.72499c","​type":"​mqtt-broker","​z":"","​name":"​localhost","​broker":"​localhost","​port":"​1883","​clientid":"","​usetls":​false,"​compatmode":​true,"​keepalive":"​60","​cleansession":​true,"​birthTopic":"","​birthQos":"​0","​birthPayload":"","​closeTopic":"","​closeQos":"​0","​closePayload":"","​willTopic":"","​willQos":"​0","​willPayload":""​},​{"​id":"​aa872460.7dff18","​type":"​mqtt-broker","​z":"","​name":"​192.168.137.93","​broker":"​192.168.137.93","​port":"​1883","​clientid":"","​usetls":​false,"​compatmode":​true,"​keepalive":"​60","​cleansession":​true,"​birthTopic":"","​birthQos":"​0","​birthPayload":"","​closeTopic":"","​closePayload":"","​willTopic":"","​willQos":"​0","​willPayload":""​}] 
-</​code>​ 
- 
-  
 ====== Back to IoT infrastructure concepts ====== ====== Back to IoT infrastructure concepts ======
  
Ligne 232: Ligne 169:
   * GENERAL ELECTRICS PREDIX   * GENERAL ELECTRICS PREDIX
   * SAP   * SAP
 +  * AWS AMAZON CLOUD 
 +
 +
 +
 +
 +
 +
  
 ==== Price and Cost Model of IoT infrastructures ==== ==== Price and Cost Model of IoT infrastructures ====
Ligne 239: Ligne 183:
      * [[https://​azure.microsoft.com/​en-us/​pricing/#​explore-cost|pricing and cost simulator for Microsoft Azure Platform]]      * [[https://​azure.microsoft.com/​en-us/​pricing/#​explore-cost|pricing and cost simulator for Microsoft Azure Platform]]
  
 +==== Use Cases Analysis ====
 +
 +Find here different use cases.
 +
 +What kind of topics should be studied for a company?
 +
 +  * What do you think about technical constraints in the use case you choose?
 +  * What do you think about cost and pricing in the use case you choose?
 +  * Anything else?
 +  * What can you plan to complete this studies?
 +
 +  * {{:​cours:​emotorwerks-iot-case-study.pdf|}}
 +
 +  * {{:​cours:​case-study-kitchen.pdf|}}
  
 +  * {{:​cours:​leading_tools_manufacturer_-_cisco.pdf|}}
  
 +==== Evaluation of the Course ====
  
 +Please fill this form before living: ​
  
 +[[https://​goo.gl/​forms/​gTvX1YHXTxCCr5Al2|Course Evaluation Form]]
cours/ds4h_iot_2018.1539927891.txt.gz · Dernière modification: 2018/10/19 07:44 par tigli