@golemio/microclimate 1.0.1-dev.675426205
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +11 -0
- package/README.md +46 -0
- package/db/example/.config.json +3 -0
- package/db/example/00_truncate_tables.sql +2 -0
- package/db/example/01_microclimate.sql +2 -0
- package/db/migrations/postgresql/.config.json +3 -0
- package/db/migrations/postgresql/20221018165642-init-mongo-to-pg.js +51 -0
- package/db/migrations/postgresql/package.json +3 -0
- package/db/migrations/postgresql/sqls/20221018165642-init-mongo-to-pg-down.sql +2 -0
- package/db/migrations/postgresql/sqls/20221018165642-init-mongo-to-pg-up.sql +48 -0
- package/db/migrations/postgresql/sqls/package.json +3 -0
- package/dist/integration-engine/datasources/MeasurementsDataSourceFactory.d.ts +5 -0
- package/dist/integration-engine/datasources/MeasurementsDataSourceFactory.js +23 -0
- package/dist/integration-engine/datasources/MeasurementsDataSourceFactory.js.map +1 -0
- package/dist/integration-engine/datasources/SensorDevicesDataSourceFactory.d.ts +4 -0
- package/dist/integration-engine/datasources/SensorDevicesDataSourceFactory.js +18 -0
- package/dist/integration-engine/datasources/SensorDevicesDataSourceFactory.js.map +1 -0
- package/dist/integration-engine/index.d.ts +1 -0
- package/dist/integration-engine/index.js +7 -0
- package/dist/integration-engine/index.js.map +1 -0
- package/dist/integration-engine/repositories/MeasurementsRepository.d.ts +6 -0
- package/dist/integration-engine/repositories/MeasurementsRepository.js +39 -0
- package/dist/integration-engine/repositories/MeasurementsRepository.js.map +1 -0
- package/dist/integration-engine/repositories/SensorDevicesRepository.d.ts +6 -0
- package/dist/integration-engine/repositories/SensorDevicesRepository.js +39 -0
- package/dist/integration-engine/repositories/SensorDevicesRepository.js.map +1 -0
- package/dist/integration-engine/repositories/index.d.ts +2 -0
- package/dist/integration-engine/repositories/index.js +20 -0
- package/dist/integration-engine/repositories/index.js.map +1 -0
- package/dist/integration-engine/schema/RefreshMeasurementsByIdTaskSchema.d.ts +4 -0
- package/dist/integration-engine/schema/RefreshMeasurementsByIdTaskSchema.js +21 -0
- package/dist/integration-engine/schema/RefreshMeasurementsByIdTaskSchema.js.map +1 -0
- package/dist/integration-engine/transformations/MeasurementsTransformation.d.ts +8 -0
- package/dist/integration-engine/transformations/MeasurementsTransformation.js +48 -0
- package/dist/integration-engine/transformations/MeasurementsTransformation.js.map +1 -0
- package/dist/integration-engine/transformations/SensorDevicesTransformation.d.ts +9 -0
- package/dist/integration-engine/transformations/SensorDevicesTransformation.js +41 -0
- package/dist/integration-engine/transformations/SensorDevicesTransformation.js.map +1 -0
- package/dist/integration-engine/workers/MicroclimateWorker.d.ts +5 -0
- package/dist/integration-engine/workers/MicroclimateWorker.js +16 -0
- package/dist/integration-engine/workers/MicroclimateWorker.js.map +1 -0
- package/dist/integration-engine/workers/index.d.ts +2 -0
- package/dist/integration-engine/workers/index.js +6 -0
- package/dist/integration-engine/workers/index.js.map +1 -0
- package/dist/integration-engine/workers/tasks/RefreshMeasurementsByIdTask.d.ts +11 -0
- package/dist/integration-engine/workers/tasks/RefreshMeasurementsByIdTask.js +36 -0
- package/dist/integration-engine/workers/tasks/RefreshMeasurementsByIdTask.js.map +1 -0
- package/dist/integration-engine/workers/tasks/RefreshMeasurementsTask.d.ts +11 -0
- package/dist/integration-engine/workers/tasks/RefreshMeasurementsTask.js +39 -0
- package/dist/integration-engine/workers/tasks/RefreshMeasurementsTask.js.map +1 -0
- package/dist/integration-engine/workers/tasks/RefreshSensorDevicesTask.d.ts +10 -0
- package/dist/integration-engine/workers/tasks/RefreshSensorDevicesTask.js +35 -0
- package/dist/integration-engine/workers/tasks/RefreshSensorDevicesTask.js.map +1 -0
- package/dist/integration-engine/workers/tasks/index.d.ts +3 -0
- package/dist/integration-engine/workers/tasks/index.js +20 -0
- package/dist/integration-engine/workers/tasks/index.js.map +1 -0
- package/dist/schema-definitions/Measurements.d.ts +24 -0
- package/dist/schema-definitions/Measurements.js +8 -0
- package/dist/schema-definitions/Measurements.js.map +1 -0
- package/dist/schema-definitions/SensorDevices.d.ts +10 -0
- package/dist/schema-definitions/SensorDevices.js +8 -0
- package/dist/schema-definitions/SensorDevices.js.map +1 -0
- package/dist/schema-definitions/datasources/MeasurementsJsonSchema.d.ts +29 -0
- package/dist/schema-definitions/datasources/MeasurementsJsonSchema.js +38 -0
- package/dist/schema-definitions/datasources/MeasurementsJsonSchema.js.map +1 -0
- package/dist/schema-definitions/datasources/SensorDevicesJsonSchema.d.ts +14 -0
- package/dist/schema-definitions/datasources/SensorDevicesJsonSchema.js +27 -0
- package/dist/schema-definitions/datasources/SensorDevicesJsonSchema.js.map +1 -0
- package/dist/schema-definitions/index.d.ts +2 -0
- package/dist/schema-definitions/index.js +21 -0
- package/dist/schema-definitions/index.js.map +1 -0
- package/dist/schema-definitions/models/MeasurementsModel.d.ts +22 -0
- package/dist/schema-definitions/models/MeasurementsModel.js +49 -0
- package/dist/schema-definitions/models/MeasurementsModel.js.map +1 -0
- package/dist/schema-definitions/models/SensorDevicesModel.d.ts +11 -0
- package/dist/schema-definitions/models/SensorDevicesModel.js +27 -0
- package/dist/schema-definitions/models/SensorDevicesModel.js.map +1 -0
- package/docs/assets/microclimate_erd.png +0 -0
- package/docs/implementation_documentation.md +282 -0
- package/package.json +69 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
# Implementační dokumentace modulu _microclimate_
|
|
2
|
+
|
|
3
|
+
## Záměr
|
|
4
|
+
|
|
5
|
+
Modul slouží k ukládání a poskytování informací o microclimatu.
|
|
6
|
+
|
|
7
|
+
## Vstupní data
|
|
8
|
+
|
|
9
|
+
### Stahujeme data ze dvou zdrojů, zpracováváme je a ukládáme do samostatných tabulek.
|
|
10
|
+
|
|
11
|
+
#### _Protected endpoint at https://api.agdata.cz/sensors/devices_
|
|
12
|
+
|
|
13
|
+
- zdroj dat
|
|
14
|
+
- url: [config.datasources.MicroclimateAgdataCity](https://api.agdata.cz/sensors)
|
|
15
|
+
- apiKey: config.datasources.MicroclimateAgdataCityApikey
|
|
16
|
+
- formát dat
|
|
17
|
+
- protokol: http
|
|
18
|
+
- datový typ: json
|
|
19
|
+
- validační schéma: [sensorDevicesDatasourceJsonSchema](https://gitlab.com/operator-ict/golemio/code/modules/microclimate/-/blob/development/src/integration-engine/datasources/SensorDevicesDataSourceFactory.ts)
|
|
20
|
+
- příklad [vstupních dat](https://gitlab.com/operator-ict/golemio/code/modules/microclimate/-/blob/development/test/integration-engine/data/sensor-devices-datasource.json)
|
|
21
|
+
- frekvence stahování
|
|
22
|
+
- cron definice:
|
|
23
|
+
- cron.dataplatform.microclimate.refreshSensorDevices
|
|
24
|
+
- rabin `0 0 7 * * *`
|
|
25
|
+
- prod `0 0 7 * * *`
|
|
26
|
+
- název rabbitmq fronty
|
|
27
|
+
- dataplatform.microclimate.refreshSensorDevices
|
|
28
|
+
|
|
29
|
+
#### _Protected endpoint at https://api.agdata.cz/sensors?sensorAddr={param1}&dateRange={param2}_
|
|
30
|
+
|
|
31
|
+
- zdroj dat
|
|
32
|
+
- url: [config.datasources.MicroclimateAgdataCity](https://api.agdata.cz/sensors)
|
|
33
|
+
- formát dat
|
|
34
|
+
- protokol: http
|
|
35
|
+
- datový typ: json
|
|
36
|
+
- validační schéma: [measurementsDatasourceJsonSchema](https://gitlab.com/operator-ict/golemio/code/modules/microclimate/-/blob/development/src/integration-engine/datasources/MeasurementsDataSourceFactory.ts)
|
|
37
|
+
- příklad [vstupních dat](https://gitlab.com/operator-ict/golemio/code/modules/microclimate/-/blob/development/test/integration-engine/data/measurements-datasource.json)
|
|
38
|
+
- frekvence stahování
|
|
39
|
+
- cron definice:
|
|
40
|
+
- cron.dataplatform.microclimate.refreshMeasurements
|
|
41
|
+
- rabin `0 */10 * * * *`
|
|
42
|
+
- prod `0 */10 * * * *`
|
|
43
|
+
- název rabbitmq fronty
|
|
44
|
+
- dataplatform.microclimate.refreshMeasurements
|
|
45
|
+
|
|
46
|
+
### Microclimate
|
|
47
|
+
|
|
48
|
+
#### _task: RefreshSensorDevicesTask_
|
|
49
|
+
|
|
50
|
+
- vstupní rabbitmq fronta
|
|
51
|
+
- název: dataplatform.microclimate.refreshSensorDevices
|
|
52
|
+
- bez parametrů
|
|
53
|
+
- datové zdroje
|
|
54
|
+
- SensorDevicesDataSourceFactory
|
|
55
|
+
- transformace
|
|
56
|
+
- [SensorDevicesTransformation.ts](https://gitlab.com/operator-ict/golemio/code/modules/microclimate/-/blob/development/src/integration-engine/transformations/SensorDevicesTransformation.ts) - mapování pro `SensorDevicesRepository`
|
|
57
|
+
|
|
58
|
+
#### _task: RefreshMeasurementsTask_
|
|
59
|
+
|
|
60
|
+
- vstupní rabbitmq fronta
|
|
61
|
+
- název: dataplatform.microclimate.refreshMeasurements
|
|
62
|
+
- datové zdroje
|
|
63
|
+
- SensorDevicesRepository ('sensorAddr' pro message na závislé fronty)
|
|
64
|
+
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
65
|
+
- název: dataplatform.microclimate.refreshMeasurementsById
|
|
66
|
+
|
|
67
|
+
#### _task: RefreshMeasurementsByIdTask_
|
|
68
|
+
|
|
69
|
+
- vstupní rabbitmq fronta
|
|
70
|
+
- název: dataplatform.microclimate.refreshMeasurementsById
|
|
71
|
+
- datové zdroje
|
|
72
|
+
- task: RefreshMeasurementsTask + MeasurementsDataSourceFactory
|
|
73
|
+
- transformace
|
|
74
|
+
- [SensorDevicesTransformation.ts](https://gitlab.com/operator-ict/golemio/code/modules/microclimate/-/blob/development/src/integration-engine/transformations/SensorDevicesTransformation.ts) - mapování pro `MeasurementsRepository`
|
|
75
|
+
|
|
76
|
+
## Uložení dat
|
|
77
|
+
|
|
78
|
+
- typ databáze
|
|
79
|
+
- PSQL
|
|
80
|
+
- databázové schéma
|
|
81
|
+
- 
|
|
82
|
+
|
|
83
|
+
# Popis Integraci datovych sad podle initial issue
|
|
84
|
+
|
|
85
|
+
### Tabulka `microclimate.sensor_devices` (tj. Vysílače):
|
|
86
|
+
|
|
87
|
+
<details>
|
|
88
|
+
<summary>API Request</summary>
|
|
89
|
+
|
|
90
|
+
apiKey: config.datasources.MicroclimateAgdataCityApikey
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
GET "https://api.agdata.cz/sensors/devices" -H "Authorization: Bearer <api-key>"
|
|
94
|
+
|
|
95
|
+
Header:
|
|
96
|
+
Authorization: Bearer (apiKey)
|
|
97
|
+
|
|
98
|
+
Host: https://api.agdata.cz
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
</details>
|
|
102
|
+
|
|
103
|
+
<details>
|
|
104
|
+
<summary>JSON Response</summary>
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"status": "200",
|
|
109
|
+
"statusText": "OK",
|
|
110
|
+
"data": [
|
|
111
|
+
{
|
|
112
|
+
"name": "Tržnice | střed | VO | 1m | #063",
|
|
113
|
+
"address": "323434316F317A18",
|
|
114
|
+
"location": {
|
|
115
|
+
"lat": 50.0989344,
|
|
116
|
+
"lng": 14.4450222
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "Tržnice | střed | VO | 2m | 3m | #190",
|
|
121
|
+
"address": "323434317F317F18",
|
|
122
|
+
"location": {
|
|
123
|
+
"lng": 14.4450222,
|
|
124
|
+
"lat": 50.0989344
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Poznámka: Pořadí proměnných zeměpisné délky a šířky je občas ve výstupu prohozeno.
|
|
132
|
+
|
|
133
|
+
</details>
|
|
134
|
+
|
|
135
|
+
<details>
|
|
136
|
+
<summary>Atributy microclimate_sensor_devices</summary>
|
|
137
|
+
|
|
138
|
+
| Agdata Atribut | Náš Atribut | Náš datový typ | Nullable? | Popis | Příklad | Poznámka |
|
|
139
|
+
| -------------- | ----------- | -------------- | --------- | ---------------------------------------------------------- | ------------------------------------ | ----------------------------------------------------------------- |
|
|
140
|
+
| name | whole_name | string | Nope | Adresa vysílače vč. umístění a polohy jednotlivých senzorů | Tržnice \| střed \| VO \| 1m \| #063 | Viz níže |
|
|
141
|
+
| address | sensor_id | string | Nope | Unikátní id vysílače | 323434316F317A18 | Primary key. Vstupuje do požadavku na volání jednotlivých měření. |
|
|
142
|
+
| lat | lat | float | Nope | zeměpisná šířka | 50.0989344 | - |
|
|
143
|
+
| lng | lng | float | Nope | zeměpisná délka | 14.4450222 | - |
|
|
144
|
+
|
|
145
|
+
**Poznámky:**
|
|
146
|
+
|
|
147
|
+
- _Nullable_ options: "Jop" = NULL hodnoty jsou přípustné/mohou se objevit, "Nope" = přesně naopak
|
|
148
|
+
- Do budoucna by se atribut `whole_name` mohl rozdělit na více sloupců (řešíme změnu a strojovou čitelnost ze strany Agdata)
|
|
149
|
+
|
|
150
|
+
</details>
|
|
151
|
+
|
|
152
|
+
### Tabulka `microclimate.measurements` (tj. Měření):
|
|
153
|
+
|
|
154
|
+
<details>
|
|
155
|
+
<summary>API Request</summary>
|
|
156
|
+
|
|
157
|
+
apiKey: config.datasources.MicroclimateAgdataCityApikey
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
GET "https://api.agdata.cz/sensors?sensorAddr={param1}&dateRange={param2}" -H "Authorization: Bearer <api-key>"
|
|
161
|
+
|
|
162
|
+
Header:
|
|
163
|
+
Authorization: Bearer (apiKey)
|
|
164
|
+
|
|
165
|
+
Host: https://api.agdata.cz
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
#### Query Parameters:
|
|
169
|
+
|
|
170
|
+
- `{param1}: sensorAddr` (_Required_) = představuje unikátní identifikátor vysílače. Ta jsou k dispozici v první tabulce, proměnná `address`. Celkem jsou zatím k dispozici měření ze 44 různých vysílačů (portfolio se bude do konce roku 2022 rozšiřovat).
|
|
171
|
+
|
|
172
|
+
- `{param2}: date` (_Optional_) = časové období. Lze zadat dvěma způsoby. Buďto je možné zadat zvolené časové období pomocí počátečního a koncového data:
|
|
173
|
+
|
|
174
|
+
| Parameter | Type | Description |
|
|
175
|
+
| ---------- | ------ | ------------------------------------------------------ |
|
|
176
|
+
| sensorAddr | string | Unikátní adresa vysílače v podobě id. Povinný parametr |
|
|
177
|
+
| dateFrom | string | Filtruje časové období, formát ISO 8601 |
|
|
178
|
+
| dateTo | string | Filtruje časové období, formát ISO 8601 |
|
|
179
|
+
|
|
180
|
+
**Například:**
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
GET "https://api.agdata.cz/sensors?sensorAddr=323434317F317F18&dateFrom=ISODate&dateTo=ISODate" -H "Authorization: Bearer <api-key>"
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
`{param2}: dateRange` (_Optional_):
|
|
187
|
+
|
|
188
|
+
| Parameter | Type | Description |
|
|
189
|
+
| --------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
190
|
+
| dateRange | string | Časové období: "today", "yesterday", "currentWeek", "previousWeek", "currentMonth", "previousMonth", "currentYear", "previousYear" |
|
|
191
|
+
|
|
192
|
+
**Například:**
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
GET "https://api.agdata.cz/sensors?sensorAddr=323434317F317F18&dateRange=currentYear" -H "Authorization: Bearer <api-key>"
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
</details>
|
|
200
|
+
|
|
201
|
+
<details>
|
|
202
|
+
<summary>JSON Response</summary>
|
|
203
|
+
|
|
204
|
+
```json
|
|
205
|
+
{
|
|
206
|
+
"status": "200",
|
|
207
|
+
"statusText": "OK",
|
|
208
|
+
"data": [
|
|
209
|
+
{
|
|
210
|
+
"id": "62e7a36bc1152d67c92a9c3c",
|
|
211
|
+
"date": "2021-04-01T00:00:00.000Z",
|
|
212
|
+
"sensor": {
|
|
213
|
+
"type": "unitlv"
|
|
214
|
+
},
|
|
215
|
+
"data": {
|
|
216
|
+
"temp1": 5.698664741970408,
|
|
217
|
+
"maxTemp1": 22.4,
|
|
218
|
+
"minTemp1": -5.8,
|
|
219
|
+
"hum1": 75.22095513051848,
|
|
220
|
+
"maxHum1": 100,
|
|
221
|
+
"windDir": "N",
|
|
222
|
+
"windSpeed": 4.317767154430699,
|
|
223
|
+
"maxWindSpeed": 22.029718537839994,
|
|
224
|
+
"windImpact": 34.56,
|
|
225
|
+
"avgWindImpact": 8.165427643450018,
|
|
226
|
+
"volumeMm": 39.55
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**Poznámky:**
|
|
234
|
+
|
|
235
|
+
- Samotné proměnné a jejich pořadí není pevně dané a liší se napříč vysílači, viz [Dokumentace] (https://gitlab.com/operator-ict/golemio/projekty/oict/p0252-mereni-mikroklimatu-meteorologicke-udaje/-/blob/master/datasets/Microclimate%20measurements.md#m%C4%9B%C5%99en%C3%AD-microclimate_measurements).
|
|
236
|
+
|
|
237
|
+
</details>
|
|
238
|
+
|
|
239
|
+
<details>
|
|
240
|
+
<summary>Atributy microclimate_measurements</summary>
|
|
241
|
+
|
|
242
|
+
Proměnné zaslané vysílači se liší, tj. různé vysílače odesílají různá měření/proměnné. Výskyt NULL hodnot je tedy možný (vše se integruje do jedné tabulky).
|
|
243
|
+
|
|
244
|
+
| Agdata Atribut | Náš Atribut | Náš datový typ | Nullable | Popis | Příklad | Poznámka |
|
|
245
|
+
| -------------- | -------------- | -------------- | -------- | ------------------------------- | ------------------------ | ------------------------------------------------------------------------------------------------ |
|
|
246
|
+
| sensor_Addr | sensor_id | string | Nope | Unikátní id vysílače | 3234343176318A18 | Povinný parametr requestu, není v response, foreign key na microclimate_sensor_devices.sensor_id |
|
|
247
|
+
| id | measurement_id | string | Nope | Unikátní id jednotlivých měření | 62fb6460b13033fb7df6dd30 | Primary key |
|
|
248
|
+
| date | measured_at | timestamp | Nope | Datum a čas měření | 2022-08-16T09:33:19.873Z | Ve formátu ISO 8601 |
|
|
249
|
+
| airTemp1 | air_temp | float | Jop | Teplota vzduchu (ve °C) | 26.4 | - |
|
|
250
|
+
| airHum1 | air_hum | float | Jop | Vlhkost vzduchu (v %) | 40.9 | - |
|
|
251
|
+
| pressure | pressure | integer | Jop | Atmosférický tlak (v Pa) | 98600 | - |
|
|
252
|
+
| windDir | wind_dir | string | Jop | Směr větru | N | - |
|
|
253
|
+
| windSpeed | wind_speed | float | Jop | Rychlost větru (v km/h) | 2.3999760002399975 | - |
|
|
254
|
+
| windImpact | wind_impact | float | Jop | Náraz větru (v km/h) | 7.2405 | - |
|
|
255
|
+
| volumeMm | precip | float | Jop | Úhrn srážek (v mm) | 39.55 | Zatím v žádné z odpovědí |
|
|
256
|
+
| irr | sun_irr | integer | Jop | Sluneční záření (v Lux) | 8265 | - |
|
|
257
|
+
| dendroCirc | dendro_circ | float | Jop | Obvod stromu (v mm) | 416.75284830732494 | - |
|
|
258
|
+
| dendroGain | dendro_gain | float | Jop | TBD (v µm) | -33.247151692675075 | - |
|
|
259
|
+
| waterPot | water_pot | float | Jop | Vodní potenciál půdy (v kPa) | -60.888 | - |
|
|
260
|
+
| temp1 | soil_temp | float | Jop | Teplota půdy (v °C) | 12.5 | - |
|
|
261
|
+
|
|
262
|
+
**Poznámky:**
|
|
263
|
+
|
|
264
|
+
- Ze 44 nainstalovaných vysílačů jich zatím 27 vrací "prázdnou odpověď", resp. prázdnou datovou množinu (vysílače, mající pouze číslice v `sensorAddr` - můžu dodat seznam). Tuto odpověď nechceme mít v databázi (řešíme s dodavatelem). Response je tvaru:
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
{'status': 200, 'statusText': 'OK', 'data': []}
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
- Tento typ odpovědi značí pouze chybějící měření (většinou v srpnu), tj. chceme mít zaintegrováno:
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
{'status': 200, 'statusText': 'OK', 'data': [{'sensor': {'type': 'unitlv'}, 'data': {}, 'id': '62f0ce19c1152d67c9362506', 'date': '2022-08-08T08:49:29.015Z', ...}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
- Seznam nemusí být nutně kompletní. Z vysílačů mající v id vysílače (`sensorAddr`) pouze číslice, např. "3234343178318310", získáváme prázdnou odpověď a nevíme tak zatím, jestli nebudou k dispozici další proměnné (vyřeší se během 2. fáze).
|
|
277
|
+
|
|
278
|
+
</details>
|
|
279
|
+
|
|
280
|
+
## Output API
|
|
281
|
+
|
|
282
|
+
TBD
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@golemio/microclimate",
|
|
3
|
+
"version": "1.0.1-dev.675426205",
|
|
4
|
+
"description": "Golemio Microclimate Module",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "rimraf ./dist && ttsc -p ./tsconfig.build.json",
|
|
9
|
+
"build-minimal": "run-s 'build --sourceMap false --declaration false'",
|
|
10
|
+
"build-watch": "run-s 'build --watch --preserveWatchOutput'",
|
|
11
|
+
"migrate-db": "golemio migrate-db up --postgres",
|
|
12
|
+
"pretest": "golemio import-db-data --postgres",
|
|
13
|
+
"test": "cross-env NODE_ENV=test TS_NODE_COMPILER='ttypescript' mocha --exit --check-leaks --timeout 120000 -r ts-node/register -r dotenv/config 'test/**/*.test.ts'",
|
|
14
|
+
"test-debug": "run-s 'test --inspect-brk=9230'",
|
|
15
|
+
"code-coverage": "nyc run-s 'test -r source-map-support/register'",
|
|
16
|
+
"generate-docs": "typedoc --out docs/typedoc src",
|
|
17
|
+
"lint": "eslint \"{src,test}/**/*.ts\""
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"golemio"
|
|
21
|
+
],
|
|
22
|
+
"author": "Operator ICT, a.s.",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://gitlab.com/operator-ict/golemio/code/modules/microclimate"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@commitlint/cli": "^11.0.0",
|
|
30
|
+
"@commitlint/config-conventional": "^11.0.0",
|
|
31
|
+
"@golemio/cli": "1.3.2",
|
|
32
|
+
"@golemio/core": "1.2.17",
|
|
33
|
+
"@golemio/db-common": "1.0.1",
|
|
34
|
+
"@golemio/eslint-config": "1.1.0",
|
|
35
|
+
"@ovos-media/ts-transform-paths": "^1.7.18-1",
|
|
36
|
+
"@types/chai": "4.2.3",
|
|
37
|
+
"@types/chai-as-promised": "7.1.2",
|
|
38
|
+
"@types/geojson": "^7946.0.10",
|
|
39
|
+
"@types/mocha": "^8.2.0",
|
|
40
|
+
"@types/node": "^16.11.35",
|
|
41
|
+
"@types/sinon": "^9.0.10",
|
|
42
|
+
"@types/supertest": "^2.0.10",
|
|
43
|
+
"chai": "4.2.0",
|
|
44
|
+
"chai-as-promised": "7.1.1",
|
|
45
|
+
"cross-env": "^7.0.3",
|
|
46
|
+
"dotenv": "^8.2.0",
|
|
47
|
+
"eslint": "^7.17.0",
|
|
48
|
+
"husky": "^4.3.7",
|
|
49
|
+
"mocha": "^8.2.1",
|
|
50
|
+
"npm-run-all": "^4.1.5",
|
|
51
|
+
"nyc": "^15.1.0",
|
|
52
|
+
"prettier": "^2.2.1",
|
|
53
|
+
"pretty-quick": "^3.1.0",
|
|
54
|
+
"rimraf": "^3.0.2",
|
|
55
|
+
"sinon": "^9.2.3",
|
|
56
|
+
"source-map-support": "0.5.19",
|
|
57
|
+
"supertest": "^6.0.1",
|
|
58
|
+
"ts-node": "^10.7.0",
|
|
59
|
+
"ttypescript": "^1.5.13",
|
|
60
|
+
"typedoc": "^0.22.15",
|
|
61
|
+
"typescript": "4.7.2"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"@golemio/core": "^1.0.0"
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"geojson": "^0.5.0"
|
|
68
|
+
}
|
|
69
|
+
}
|