Ogólnie uznałem że muszę dodać kartę sd do projektu i działać na zasadzie
1) Odczyt BT x sekund
1.1.1) Odczytaj urządzenie
1.1.2) Zapis wynik do SD
1.2.1) Odczytaj urządzenie
1.2.2) Zapis wynik do SD
1.n.1) Odczytaj urządzenie
1.n.2) Zapis wynik do SD
2) Wysyłka na serwer supli
2.1) Znajdź ostatni plik z odczytami
2.1.1) Wyślij odczyt
2.1.n) Wyślij odczyt
3) Skasuj nadmiarowe pliki
i tak w kółko...
Chcę w konfiguracji opchnąć wszystko na co supla pozwala.
Code: Select all
{
"wifi": {
"ssid": "TwojaSiecWiFi",
"password": "TwojeHasloWiFi"
},
"sensors": [
{
"mac_address": "A4:C1:38:60:FC:EF",
"name": "Thermometer1",
"description": "",
"channels": [
{
"number": 1,
"type": "ThermHygroMeter",
"mapping": {
"channel_to_sensor": [
{"input": "temp", "sensor_field": "temperature"},
{"input": "humi", "sensor_field": "humidity"},
{"input": "batery", "sensor_field": "battery"}
]
},
"unit_before": "",
"unit_after": "",
"precision": 0
}
]
},
{
"mac_address": "A4:C1:38:61:26:3A",
"name": "Thermometer2",
"description": "",
"channels": [
{
"number": 2,
"type": "ThermHygroMeter",
"mapping": {
"channel_to_sensor": [
{"input": "temp", "sensor_field": "temperature"},
{"input": "humi", "sensor_field": "humidity"},
{"input": "batery", "sensor_field": "battery"}
]
},
"unit_before": "",
"unit_after": "",
"precision": 0
}
]
},
{
"mac_address": "A4:C1:38:13:AF:AE",
"name": "Thermometer3",
"description": "",
"channels": [
{
"number": 3,
"type": "ThermHygroMeter",
"mapping": {
"channel_to_sensor": [
{"input": "temp", "sensor_field": "temperature"},
{"input": "humi", "sensor_field": "humidity"},
{"input": "batery", "sensor_field": "battery"}
]
},
"unit_before": "",
"unit_after": "",
"precision": 0
}
]
},
{
"mac_address": "A4:C1:38:20:BA:C6",
"name": "Thermometer4",
"description": "",
"channels": [
{
"number": 4,
"type": "ThermHygroMeter",
"mapping": {
"channel_to_sensor": [
{"input": "temp", "sensor_field": "temperature"},
{"input": "humi", "sensor_field": "humidity"},
{"input": "batery", "sensor_field": "battery"}
]
},
"unit_before": "",
"unit_after": "",
"precision": 0
}
]
},
{
"mac_address": "A4:C1:38:A8:42:99",
"name": "Thermometer5",
"description": "",
"channels": [
{
"number": 5,
"type": "ThermHygroMeter",
"mapping": {
"channel_to_sensor": [
{"input": "temp", "sensor_field": "temperature"},
{"input": "humi", "sensor_field": "humidity"},
{"input": "batery", "sensor_field": "battery"}
]
},
"unit_before": "",
"unit_after": "",
"precision": 0
}
]
},
{
"mac_address": "A4:C1:38:51:11:84",
"name": "Thermometer6",
"description": "",
"channels": [
{
"number": 6,
"type": "ThermHygroMeter",
"mapping": {
"channel_to_sensor": [
{"input": "temp", "sensor_field": "temperature"},
{"input": "humi", "sensor_field": "humidity"},
{"input": "batery", "sensor_field": "battery"}
]
},
"unit_before": "",
"unit_after": "",
"precision": 0
}
]
},
{
"mac_address": "A4:C1:38:35:9E:27",
"name": "Thermometer7",
"description": "",
"channels": [
{
"number": 7,
"type": "ThermHygroMeter",
"mapping": {
"channel_to_sensor": [
{"input": "temp", "sensor_field": "temperature"},
{"input": "humi", "sensor_field": "humidity"},
{"input": "batery", "sensor_field": "battery"}
]
},
"unit_before": "",
"unit_after": "",
"precision": 0
}
]
},
{
"mac_address": "A4:C1:38:7B:61:C9",
"name": "Thermometer8",
"description": "",
"channels": [
{
"number": 8,
"type": "ThermHygroMeter",
"mapping": {
"channel_to_sensor": [
{"input": "temp", "sensor_field": "temperature"},
{"input": "humi", "sensor_field": "humidity"},
{"input": "batery", "sensor_field": "battery"}
]
},
"unit_before": "",
"unit_after": "",
"precision": 0
}
]
}
],
"scan_interval": 5000,
"history_entries": 100
}