README.md 4.03 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
# IoT Platform Overview

This includes the NAIADES IoT Platform source code, shipping code (Dockerfiles and docker-compose), and scripts examples
demonstrating how clients can use IoT Platform services (a.k.a NAIADES SDK).

SDK shows how to use NAIADES IoT Platform services, among these services we have:
- message broker (`Orion`)
- access control (`Wilma`)
- identity management (`Keyrock`)
- time-series storage and API (`QuantumLeap`)
- how to build your own services (e.g. `weather-data-collection-carouge`)

13 14 15
This is inspired from [FIWARE tutorial](https://github.com/Fiware/tutorials.PEP-Proxy/blob/master/README.md)


16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
# More

You can find more info about how to use the platform at the [wiki home page](https://gitlab.distantaccess.com/naiades/naiades-platform-poc/-/wikis/home) 

# Deploying the platform on your own

Please see [wiki article](https://gitlab.distantaccess.com/naiades/naiades-platform-poc/-/wikis/NAIADES-IoT-Platform-installation)

# Using the platform APIs

You use the platform services through its API, either if you have deployed it by yourself, or using the `development platform`

Please see [wiki article](https://gitlab.distantaccess.com/naiades/naiades-platform-poc/-/wikis/API-client-examples-(curl-and-python-scripts))


# Use Case Example

Using the `Carouge Watering` use case for exemplifying the interactions.
We have `IoT sensor for humidity`, and `WMS for watering scheduling`, then we could think of the following interactions:


## Interfaces:
38

39
```
40 41
+----------------------+                +-------------------+
|                      |                |                   |
42
|     IoT Platform     +----------------+ WMS - Watering    |
43 44 45 46 47 48 49 50 51 52 53 54 55
|                      |                | weekly scheduler  |
+----------+-----------+                |                   |
           |                            +-------------------+
           |
           |
           |
+----------+-----------+
|                      |
|  Soil Moisture IoT   |
|       sensor         |
|                      |
+----------------------+

56 57 58
```


59

60
## WMS subscribes:
61

62
```
63 64
+----------------------+                +-------------------+
|                      |                |                   |
65
|      IoT Platform    +<---------------+ WMS - Watering    |
66
|                      |  SUBSCRIBE     | weekly scheduler  |
67
+----------------------+  /FlowerBed/soilMoisture           |
68 69 70 71 72 73 74 75 76 77
                                        +-------------------+


+----------------------+
|                      |
|  Soil Moisture IoT   |
|       sensor         |
|                      |
+----------------------+

78 79
```

80 81 82 83


# IoT data update, forwarding data to subscribers

84
```
85 86
+----------------------+                +-------------------+
|                      |                |                   |
87
|     IoT Platform     +--------------->+ WMS - Watering    |
88
|                      |   POST         | weekly scheduler  |
89
+-----+----------------+  /FlowerBed/soilMoisture           |
90 91
      ^                                 +-------------------+
UPDATE|
92
/FlowerBed/soilMoisture
93 94 95 96 97 98 99 100
      |
+-----+----------------+
|                      |
|  Soil Moisture IoT   |
|       sensor         |
|                      |
+----------------------+

101
```
102

103
## WMS gets time-series data (last 100 records on humidity):
104

105
```
106 107
+----------------------+                                    +-------------------+
|                      |                                    |                   |
108
|     IoT Platform     +<-----------------------------------+ WMS - Watering    |
109
|                      |  GET                               | weekly scheduler  |
110
+----------------------+  /FlowerBed/soilMoisture?limit=100 |                   |
111 112 113
                                                            +-------------------+


114 115 116 117 118 119 120
+----------------------+
|                      |
|  Soil Moisture IoT   |
|       sensor         |
|                      |
+----------------------+

121
```
122 123 124 125 126 127 128


## Useful mysql queries for DB querying

```mysql-sql
SELECT time_index, entity_id, soilMoisture FROM mtcarouge.etflowerbed  ORDER BY time_index DESC  limit 100;
```