README.md 4.11 KB
Newer Older
1 2
# IoT Platform Overview

3 4 5 6 7 8 9 10 11
This project includes the NAIADES IoT Platform source code and DCA components.
It provides the sources for: 
- declarative services files (Dockerfiles and docker-compose)
- platform management scripts (/scripts-admin)scripts 
- examples demonstrating how clients can use IoT Platform services (/scripts)
and more.

Among the IoT platform services we find the following key components:
- context manager (`Orion`)
12 13
- access control (`Wilma`)
- identity management (`Keyrock`)
14 15
- time-series storage (`QuantumLeap`)
- examples for data consumers (e.g. `wms-example`)
16

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


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.
38
We have `IoT sensor for soil moisture`, and `WMS for watering scheduling`, then we could think of the following interactions:
39 40 41


## Interfaces:
42

43
```
44 45
+----------------------+                +-------------------+
|                      |                |                   |
46
|     IoT Platform     +----------------+ WMS - Watering    |
47 48 49 50 51 52 53 54 55 56 57 58 59
|                      |                | weekly scheduler  |
+----------+-----------+                |                   |
           |                            +-------------------+
           |
           |
           |
+----------+-----------+
|                      |
|  Soil Moisture IoT   |
|       sensor         |
|                      |
+----------------------+

60 61 62
```


63

64
## WMS subscribes:
65

66
```
67 68
+----------------------+                +-------------------+
|                      |                |                   |
69
|      IoT Platform    +<---------------+ WMS - Watering    |
70
|                      |  SUBSCRIBE     | weekly scheduler  |
71
+----------------------+  /FlowerBed/soilMoisture           |
72 73 74 75 76 77 78 79 80 81
                                        +-------------------+


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

82 83
```

84 85 86 87


# IoT data update, forwarding data to subscribers

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

105
```
106

107
## WMS gets time-series data (last 100 records on humidity):
108

109
```
110 111
+----------------------+                                    +-------------------+
|                      |                                    |                   |
112
|     IoT Platform     +<-----------------------------------+ WMS - Watering    |
113
|                      |  GET                               | weekly scheduler  |
114
+----------------------+  /FlowerBed/soilMoisture?limit=100 |                   |
115 116 117
                                                            +-------------------+


118 119 120 121 122 123 124
+----------------------+
|                      |
|  Soil Moisture IoT   |
|       sensor         |
|                      |
+----------------------+

125
```
126 127 128 129 130 131 132


## Useful mysql queries for DB querying

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