Forum Tiny Control Solution
Export temperatur do sql - Wersja do druku

+- Forum Tiny Control Solution (https://forum.tinycontrol.pl)
+-- Dział: LanKontroler - sprzęt i wersje wsadów, problemy, zastosowanie (https://forum.tinycontrol.pl/forumdisplay.php?fid=3)
+--- Dział: Programy i Serwery (https://forum.tinycontrol.pl/forumdisplay.php?fid=13)
+--- Wątek: Export temperatur do sql (/showthread.php?tid=2608)



Export temperatur do sql - domtel - 12-12-2022

Witam
Czy da się zrobić jakiś mechanizm aby tiny wysyłał temperatury np do sql, xml, xls ? - musze mieć coś takiego dla sanepidu Smile


RE: Export temperatur do sql - wilkxt - 12-12-2022

(12-12-2022, 06:47 PM)domtel napisał(a): Witam
Czy da się zrobić jakiś mechanizm aby tiny wysyłał temperatury np do sql, xml, xls ? - musze mieć coś takiego dla sanepidu Smile

Wysyła po mqtt, http, a po xml, json, możesz odczytywać.


RE: Export temperatur do sql - domtel - 12-13-2022

(12-12-2022, 07:55 PM)wilkxt napisał(a):
(12-12-2022, 06:47 PM)domtel napisał(a): Witam
Czy da się zrobić jakiś mechanizm aby tiny wysyłał temperatury np do sql, xml, xls ? - musze mieć coś takiego dla sanepidu Smile

Wysyła po mqtt, http, a po xml, json, możesz odczytywać.

MQTT to chyba trzeba by było stawiać własny serwer.
A ja ma wysyłać po http? czy to jakimś skryptem na serwerze realizować (http POST,GET)?


RE: Export temperatur do sql - wilkxt - 12-13-2022

LK mozę wysyłąc dane na serwer mqtt lub http.
Mqtt mozesz wysyąłc na własny serwer lub serwer mqtt.ats.pl.
Http mozesz wysyłac na włąsny serwer lub jakis w sieci np. thingspeak.com
lub
Ty (jakis skrypt, program) moze wysyłać zaptania http GET i pobierać dane z LK.
przykladowo odczytany plik json z lk (ip_LK/json/status_per,json)
{
"uptimeSeconds": "45",
"uptimeMinutes": "55",
"uptimeHours": "20",
"uptimeDays": "138",
"time": "1670921711",
"vin": "1187",
"tem": "3100",
"diff1": "0",
"diff2": "0",
"diff3": "0",
"diff4": "0",
"diff5": "0",
"diff6": "0",
"dthTemp": "212",
"dthHum": "307",
"bm280p": "100479",
"bm680q": "-600",
"ds1": "-42",
"ds2": "206",
"ds3": "-600",
"ds4": "-600",
"ds5": "-600",
"ds6": "-600",
"ds7": "-600",
"ds8": "-600",
"out0": "0",
"out1": "0",
"out2": "0",
"out3": "0",
"out4": "0",
"out5": "0",
"inpp1": "453",
"inpp2": "-2340",
"inpp3": "332",
"inpp4": "2",
"inpp5": "4",
"inpp6": "3",
"pwm": "0",
"ind": "15",
"power1": "0",
"power2": "0",
"power3": "0",
"power4": "0",
"power5": "0",
"power6": "0",
"energy1": "1698940",
"energy2": "1685683",
"energy3": "1",
"energy4": "0",
"energy5": "1",
"energy6": "1",
"pm1": "-1",
"pm2": "-1",
"pm4": "-1",
"pm10": "-1",
"co2": "-1",
"pwmd0": "50",
"pwmd1": "50",
"pwmd2": "50",
"pwmd3": "50",
"customReadings": ["0.00",
"0.00",
"1431.86",
"0.00",
"0",
"0",
"0.00",
"0.00",
"9758.65",
"0.0",
"0.00",
"0.0",
"0.00",
"0.00",
"0.00",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0"],
"dewPoint": "32"}


RE: Export temperatur do sql - domtel - 12-13-2022

(12-13-2022, 10:56 AM)wilkxt napisał(a): LK mozę wysyłąc dane na serwer mqtt lub http.
Mqtt mozesz wysyąłc na  własny serwer lub serwer mqtt.ats.pl.
Http mozesz wysyłac na włąsny serwer lub jakis w sieci np. thingspeak.com
lub
Ty (jakis skrypt, program) moze wysyłać zaptania  http GET i pobierać dane z LK.
przykladowo odczytany plik json z lk (ip_LK/json/status_per,json)
{
"uptimeSeconds": "45",
"uptimeMinutes": "55",
"uptimeHours": "20",
"uptimeDays": "138",
"time": "1670921711",
"vin": "1187",
"tem": "3100",
"diff1": "0",
"diff2": "0",
"diff3": "0",
"diff4": "0",
"diff5": "0",
"diff6": "0",
"dthTemp": "212",
"dthHum": "307",
"bm280p": "100479",
"bm680q": "-600",
"ds1": "-42",
"ds2": "206",
"ds3": "-600",
"ds4": "-600",
"ds5": "-600",
"ds6": "-600",
"ds7": "-600",
"ds8": "-600",
"out0": "0",
"out1": "0",
"out2": "0",
"out3": "0",
"out4": "0",
"out5": "0",
"inpp1": "453",
"inpp2": "-2340",
"inpp3": "332",
"inpp4": "2",
"inpp5": "4",
"inpp6": "3",
"pwm": "0",
"ind": "15",
"power1": "0",
"power2": "0",
"power3": "0",
"power4": "0",
"power5": "0",
"power6": "0",
"energy1": "1698940",
"energy2": "1685683",
"energy3": "1",
"energy4": "0",
"energy5": "1",
"energy6": "1",
"pm1": "-1",
"pm2": "-1",
"pm4": "-1",
"pm10": "-1",
"co2": "-1",
"pwmd0": "50",
"pwmd1": "50",
"pwmd2": "50",
"pwmd3": "50",
"customReadings": ["0.00",
"0.00",
"1431.86",
"0.00",
"0",
"0",
"0.00",
"0.00",
"9758.65",
"0.0",
"0.00",
"0.0",
"0.00",
"0.00",
"0.00",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0"],
"dewPoint": "32"}

To jest to co LK zwraca po zapytaniu np: http://admin:admin@172.16.0.30/json/status_per.json


RE: Export temperatur do sql - wilkxt - 12-13-2022

(12-13-2022, 12:36 PM)domtel napisał(a): To jest to co LK zwraca po zapytaniu np: http://admin:admin@172.16.0.30/json/status_per.json
Tak, szczegóły  https://docs.tinycontrol.pl/pl/lk3/responses/