Merge branch 'development' of https://github.com/arendst/Tasmota into device-groups-3

This commit is contained in:
Paul C Diem 2020-03-16 17:08:11 -05:00
commit 9b0fc0985b
37 changed files with 483 additions and 302 deletions

View File

@ -105,6 +105,7 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
- Add Zigbee features and improvements - Add Zigbee features and improvements
- Add Zigbee support for Hue emulation by Stefan Hadinger - Add Zigbee support for Hue emulation by Stefan Hadinger
- Add HAss Discovery support for Button and Switch triggers by Federico Leoni (#7901) - Add HAss Discovery support for Button and Switch triggers by Federico Leoni (#7901)
- Add Dew Point to Temperature and Humidity sensors
- Add optional support for Prometheus using file xsns_91_prometheus.ino (#7216) - Add optional support for Prometheus using file xsns_91_prometheus.ino (#7216)
- Add support for gzipped binaries - Add support for gzipped binaries
- Add support for Romanian language translations by Augustin Marti - Add support for Romanian language translations by Augustin Marti

View File

@ -6,6 +6,7 @@
- Add support for HDC1080 Temperature and Humidity sensor by Luis Teixeira (#7888) - Add support for HDC1080 Temperature and Humidity sensor by Luis Teixeira (#7888)
- Add commands ``SwitchMode 13`` PushOn and ``SwitchMode 14`` PushOnInverted (#7912) - Add commands ``SwitchMode 13`` PushOn and ``SwitchMode 14`` PushOnInverted (#7912)
- Add Zigbee support for Hue emulation by Stefan Hadinger - Add Zigbee support for Hue emulation by Stefan Hadinger
- Add Dew Point to Temperature and Humidity sensors
### 8.1.0.10 20200227 ### 8.1.0.10 20200227

View File

@ -52,6 +52,7 @@
#define D_JSON_CURRENT "Current" // As in Voltage and Current #define D_JSON_CURRENT "Current" // As in Voltage and Current
#define D_JSON_DARKNESS "Darkness" #define D_JSON_DARKNESS "Darkness"
#define D_JSON_DATA "Data" #define D_JSON_DATA "Data"
#define D_JSON_DEWPOINT "DewPoint"
#define D_JSON_DISTANCE "Distance" #define D_JSON_DISTANCE "Distance"
#define D_JSON_DNSSERVER "DNSServer" #define D_JSON_DNSSERVER "DNSServer"
#define D_JSON_DONE "Done" #define D_JSON_DONE "Done"
@ -630,7 +631,8 @@ const char S_JSON_DRIVER_INDEX_NVALUE[] PROGMEM = "{\"" D_CMND_DRIVE
const char S_JSON_DRIVER_INDEX_SVALUE[] PROGMEM = "{\"" D_CMND_DRIVER "%d\":\"%s\"}"; const char S_JSON_DRIVER_INDEX_SVALUE[] PROGMEM = "{\"" D_CMND_DRIVER "%d\":\"%s\"}";
const char JSON_SNS_TEMP[] PROGMEM = ",\"%s\":{\"" D_JSON_TEMPERATURE "\":%s}"; const char JSON_SNS_TEMP[] PROGMEM = ",\"%s\":{\"" D_JSON_TEMPERATURE "\":%s}";
const char JSON_SNS_TEMPHUM[] PROGMEM = ",\"%s\":{\"" D_JSON_TEMPERATURE "\":%s,\"" D_JSON_HUMIDITY "\":%s}"; //const char JSON_SNS_TEMPHUM[] PROGMEM = ",\"%s\":{\"" D_JSON_TEMPERATURE "\":%s,\"" D_JSON_HUMIDITY "\":%s}";
const char JSON_SNS_TEMPHUMDEW[] PROGMEM = ",\"%s\":{\"" D_JSON_TEMPERATURE "\":%s,\"" D_JSON_HUMIDITY "\":%s,\"" D_JSON_DEWPOINT "\":%s}";
const char JSON_SNS_ILLUMINANCE[] PROGMEM = ",\"%s\":{\"" D_JSON_ILLUMINANCE "\":%d}"; const char JSON_SNS_ILLUMINANCE[] PROGMEM = ",\"%s\":{\"" D_JSON_ILLUMINANCE "\":%d}";
const char JSON_SNS_MOISTURE[] PROGMEM = ",\"%s\":{\"" D_JSON_MOISTURE "\":%d}"; const char JSON_SNS_MOISTURE[] PROGMEM = ",\"%s\":{\"" D_JSON_MOISTURE "\":%d}";
@ -667,6 +669,7 @@ const float kSpeedConversionFactor[] = {1, // none
// {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr> // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
const char HTTP_SNS_TEMP[] PROGMEM = "{s}%s " D_TEMPERATURE "{m}%s&deg;%c{e}"; const char HTTP_SNS_TEMP[] PROGMEM = "{s}%s " D_TEMPERATURE "{m}%s&deg;%c{e}";
const char HTTP_SNS_HUM[] PROGMEM = "{s}%s " D_HUMIDITY "{m}%s%%{e}"; const char HTTP_SNS_HUM[] PROGMEM = "{s}%s " D_HUMIDITY "{m}%s%%{e}";
const char HTTP_SNS_DEW[] PROGMEM = "{s}%s " D_DEWPOINT "{m}%s&deg;%c{e}";
const char HTTP_SNS_PRESSURE[] PROGMEM = "{s}%s " D_PRESSURE "{m}%s %s{e}"; const char HTTP_SNS_PRESSURE[] PROGMEM = "{s}%s " D_PRESSURE "{m}%s %s{e}";
const char HTTP_SNS_SEAPRESSURE[] PROGMEM = "{s}%s " D_PRESSUREATSEALEVEL "{m}%s %s{e}"; const char HTTP_SNS_SEAPRESSURE[] PROGMEM = "{s}%s " D_PRESSUREATSEALEVEL "{m}%s %s{e}";
const char HTTP_SNS_ANALOG[] PROGMEM = "{s}%s " D_ANALOG_INPUT "%d{m}%d{e}"; const char HTTP_SNS_ANALOG[] PROGMEM = "{s}%s " D_ANALOG_INPUT "%d{m}%d{e}";

View File

@ -79,6 +79,7 @@
#define D_DATA "Данни" #define D_DATA "Данни"
#define D_DARKLIGHT "Тъмна" #define D_DARKLIGHT "Тъмна"
#define D_DEBUG "Дебъгване" #define D_DEBUG "Дебъгване"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Забранен" #define D_DISABLED "Забранен"
#define D_DISTANCE "Разстояние" #define D_DISTANCE "Разстояние"
#define D_DNS_SERVER "DNS Сървър" #define D_DNS_SERVER "DNS Сървър"
@ -513,12 +514,12 @@
#define D_TX20_WEST "З" #define D_TX20_WEST "З"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -79,6 +79,7 @@
#define D_DATA "Data" #define D_DATA "Data"
#define D_DARKLIGHT "Tmavý" #define D_DARKLIGHT "Tmavý"
#define D_DEBUG "Debug" #define D_DEBUG "Debug"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Zablokováno" #define D_DISABLED "Zablokováno"
#define D_DISTANCE "Distance" #define D_DISTANCE "Distance"
#define D_DNS_SERVER "Server DNS" #define D_DNS_SERVER "Server DNS"
@ -513,12 +514,12 @@
#define D_TX20_WEST "Z" #define D_TX20_WEST "Z"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -79,6 +79,7 @@
#define D_DATA "Daten" #define D_DATA "Daten"
#define D_DARKLIGHT "dunkel" #define D_DARKLIGHT "dunkel"
#define D_DEBUG "debug" #define D_DEBUG "debug"
#define D_DEWPOINT "Taupunkt"
#define D_DISABLED "deaktiviert" #define D_DISABLED "deaktiviert"
#define D_DISTANCE "Abstand" #define D_DISTANCE "Abstand"
#define D_DNS_SERVER "DNS-Server" #define D_DNS_SERVER "DNS-Server"

View File

@ -79,6 +79,7 @@
#define D_DATA "Δεδομένα" #define D_DATA "Δεδομένα"
#define D_DARKLIGHT "Σκοτεινό" #define D_DARKLIGHT "Σκοτεινό"
#define D_DEBUG "Debug" #define D_DEBUG "Debug"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Ανενεργό" #define D_DISABLED "Ανενεργό"
#define D_DISTANCE "Απόσταση" #define D_DISTANCE "Απόσταση"
#define D_DNS_SERVER "Διακομιστής DNS" #define D_DNS_SERVER "Διακομιστής DNS"
@ -513,12 +514,12 @@
#define D_TX20_WEST "Δ" #define D_TX20_WEST "Δ"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -79,6 +79,7 @@
#define D_DATA "Data" #define D_DATA "Data"
#define D_DARKLIGHT "Dark" #define D_DARKLIGHT "Dark"
#define D_DEBUG "Debug" #define D_DEBUG "Debug"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Disabled" #define D_DISABLED "Disabled"
#define D_DISTANCE "Distance" #define D_DISTANCE "Distance"
#define D_DNS_SERVER "DNS Server" #define D_DNS_SERVER "DNS Server"

View File

@ -79,6 +79,7 @@
#define D_DATA "Datos" #define D_DATA "Datos"
#define D_DARKLIGHT "Oscuro" #define D_DARKLIGHT "Oscuro"
#define D_DEBUG "Debug" #define D_DEBUG "Debug"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Deshabilitado" #define D_DISABLED "Deshabilitado"
#define D_DISTANCE "Distancia" #define D_DISTANCE "Distancia"
#define D_DNS_SERVER "Servidor DNS" #define D_DNS_SERVER "Servidor DNS"
@ -513,12 +514,12 @@
#define D_TX20_WEST "O" #define D_TX20_WEST "O"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total de Entrada" #define D_TPWRIN "Energía Total-Entrada"
#define D_TPWROUT "Total de Salida" #define D_TPWROUT "Energía Total-Salida"
#define D_TPWRCURR "Corriente-En/Sal" #define D_TPWRCURR "Potencia-En/Sal"
#define D_TPWRCURR1 "Corriente-Entr p1" #define D_TPWRCURR1 "Potencia-Entr p1"
#define D_TPWRCURR2 "Corriente-Entr p2" #define D_TPWRCURR2 "Potencia-Entr p2"
#define D_TPWRCURR3 "Corriente-Entr p3" #define D_TPWRCURR3 "Potencia-Entr p3"
#define D_Strom_L1 "Corriente L1" #define D_Strom_L1 "Corriente L1"
#define D_Strom_L2 "Corriente L2" #define D_Strom_L2 "Corriente L2"
#define D_Strom_L3 "Corriente L3" #define D_Strom_L3 "Corriente L3"
@ -530,7 +531,7 @@
#define D_GasIN "Contador" #define D_GasIN "Contador"
#define D_H2oIN "Contador" #define D_H2oIN "Contador"
#define D_StL1L2L3 "Corriente L1+L2+L3" #define D_StL1L2L3 "Corriente L1+L2+L3"
#define D_SpL1L2L3 "Voltage L1+L2+L3/3" #define D_SpL1L2L3 "Voltaje L1+L2+L3/3"
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box // tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "Ninguno" #define D_SENSOR_NONE "Ninguno"

View File

@ -79,6 +79,7 @@
#define D_DATA "Donnée" #define D_DATA "Donnée"
#define D_DARKLIGHT "Sombre" #define D_DARKLIGHT "Sombre"
#define D_DEBUG "Debug" #define D_DEBUG "Debug"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Désactivé" #define D_DISABLED "Désactivé"
#define D_DISTANCE "Distance" #define D_DISTANCE "Distance"
#define D_DNS_SERVER "Serveur DNS" #define D_DNS_SERVER "Serveur DNS"
@ -513,12 +514,12 @@
#define D_TX20_WEST "O" #define D_TX20_WEST "O"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -79,6 +79,7 @@
#define D_DATA "נתונים" #define D_DATA "נתונים"
#define D_DARKLIGHT "חושך" #define D_DARKLIGHT "חושך"
#define D_DEBUG "באגים" #define D_DEBUG "באגים"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "מבוטל" #define D_DISABLED "מבוטל"
#define D_DISTANCE "מרחק" #define D_DISTANCE "מרחק"
#define D_DNS_SERVER "DNS שרת" #define D_DNS_SERVER "DNS שרת"
@ -513,12 +514,12 @@
#define D_TX20_WEST "W" #define D_TX20_WEST "W"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -79,6 +79,7 @@
#define D_DATA "Adat" #define D_DATA "Adat"
#define D_DARKLIGHT "Min. fényerő" #define D_DARKLIGHT "Min. fényerő"
#define D_DEBUG "Debug" #define D_DEBUG "Debug"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Letiltva" #define D_DISABLED "Letiltva"
#define D_DISTANCE "Távolság" #define D_DISTANCE "Távolság"
#define D_DNS_SERVER "DNS szerver" #define D_DNS_SERVER "DNS szerver"
@ -513,12 +514,12 @@
#define D_TX20_WEST "NY" #define D_TX20_WEST "NY"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -79,6 +79,7 @@
#define D_DATA "Dati" #define D_DATA "Dati"
#define D_DARKLIGHT "Scuro" #define D_DARKLIGHT "Scuro"
#define D_DEBUG "Debug" #define D_DEBUG "Debug"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Disabilitato" #define D_DISABLED "Disabilitato"
#define D_DISTANCE "Distanza" #define D_DISTANCE "Distanza"
#define D_DNS_SERVER "DNS Server" #define D_DNS_SERVER "DNS Server"
@ -513,12 +514,12 @@
#define D_TX20_WEST "O" #define D_TX20_WEST "O"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -79,6 +79,7 @@
#define D_DATA "Data" #define D_DATA "Data"
#define D_DARKLIGHT "어둡게" #define D_DARKLIGHT "어둡게"
#define D_DEBUG "디버그" #define D_DEBUG "디버그"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "사용안함" #define D_DISABLED "사용안함"
#define D_DISTANCE "거리" #define D_DISTANCE "거리"
#define D_DNS_SERVER "DNS 서버" #define D_DNS_SERVER "DNS 서버"
@ -513,12 +514,12 @@
#define D_TX20_WEST "W" #define D_TX20_WEST "W"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -79,6 +79,7 @@
#define D_DATA "Data" #define D_DATA "Data"
#define D_DARKLIGHT "Donker" #define D_DARKLIGHT "Donker"
#define D_DEBUG "Debug" #define D_DEBUG "Debug"
#define D_DEWPOINT "Dauwpunt"
#define D_DISABLED "Uitgeschakeld" #define D_DISABLED "Uitgeschakeld"
#define D_DISTANCE "Afstand" #define D_DISTANCE "Afstand"
#define D_DNS_SERVER "DNS Server" #define D_DNS_SERVER "DNS Server"
@ -513,12 +514,12 @@
#define D_TX20_WEST "W" #define D_TX20_WEST "W"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -79,6 +79,7 @@
#define D_DATA "Data" #define D_DATA "Data"
#define D_DARKLIGHT "Ciemny" #define D_DARKLIGHT "Ciemny"
#define D_DEBUG "Debug" #define D_DEBUG "Debug"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Wyłączony" #define D_DISABLED "Wyłączony"
#define D_DISTANCE "Odległość" #define D_DISTANCE "Odległość"
#define D_DNS_SERVER "Serwer DNS" #define D_DNS_SERVER "Serwer DNS"
@ -513,12 +514,12 @@
#define D_TX20_WEST "W" #define D_TX20_WEST "W"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -79,6 +79,7 @@
#define D_DATA "Dados" #define D_DATA "Dados"
#define D_DARKLIGHT "Luz escura" #define D_DARKLIGHT "Luz escura"
#define D_DEBUG "Depurar" #define D_DEBUG "Depurar"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Desabilitado" #define D_DISABLED "Desabilitado"
#define D_DISTANCE "Distância" #define D_DISTANCE "Distância"
#define D_DNS_SERVER "Servidor DNS" #define D_DNS_SERVER "Servidor DNS"
@ -513,12 +514,12 @@
#define D_TX20_WEST "O" #define D_TX20_WEST "O"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -79,6 +79,7 @@
#define D_DATA "Dados" #define D_DATA "Dados"
#define D_DARKLIGHT "Luz Escura" #define D_DARKLIGHT "Luz Escura"
#define D_DEBUG "Depurar" #define D_DEBUG "Depurar"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Disabilitado" #define D_DISABLED "Disabilitado"
#define D_DISTANCE "Distância" #define D_DISTANCE "Distância"
#define D_DNS_SERVER "Servidor DNS" #define D_DNS_SERVER "Servidor DNS"
@ -513,12 +514,12 @@
#define D_TX20_WEST "O" #define D_TX20_WEST "O"
//xsns_53_sml.ino //xsns_53_sml.ino
#define D_TPWRIN "Total-Consumo" #define D_TPWRIN "Energia-Consumo"
#define D_TPWROUT "Total-Geração" #define D_TPWROUT "Energia-Geração"
#define D_TPWRCURR "Corrente-Consumo/Geração" #define D_TPWRCURR "Potência Ativa-Consumo/Geração"
#define D_TPWRCURR1 "Corrente-Consumo F1" #define D_TPWRCURR1 "Potência Ativa-Consumo F1"
#define D_TPWRCURR2 "Corrente-Consumo F2" #define D_TPWRCURR2 "Potência Ativa-Consumo F2"
#define D_TPWRCURR3 "Corrente-Consumo F3" #define D_TPWRCURR3 "Potência Ativa-Consumo F3"
#define D_Strom_L1 "Corrente F1" #define D_Strom_L1 "Corrente F1"
#define D_Strom_L2 "Corrente F2" #define D_Strom_L2 "Corrente F2"
#define D_Strom_L3 "Corrente F3" #define D_Strom_L3 "Corrente F3"
@ -527,8 +528,8 @@
#define D_Spannung_L3 "Tensão F3" #define D_Spannung_L3 "Tensão F3"
#define D_METERNR "Número_Contador" #define D_METERNR "Número_Contador"
#define D_METERSID "ID Serviço" #define D_METERSID "ID Serviço"
#define D_GasIN "Contador" #define D_GasIN "Contagem"
#define D_H2oIN "Contador" #define D_H2oIN "Contagem"
#define D_StL1L2L3 "Corrente F1+F2+F3" #define D_StL1L2L3 "Corrente F1+F2+F3"
#define D_SpL1L2L3 "Tensão F1+F2+F3/3" #define D_SpL1L2L3 "Tensão F1+F2+F3/3"

View File

@ -79,6 +79,7 @@
#define D_DATA "Date" #define D_DATA "Date"
#define D_DARKLIGHT "Întunecat" #define D_DARKLIGHT "Întunecat"
#define D_DEBUG "Depanare" #define D_DEBUG "Depanare"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Dezactivat" #define D_DISABLED "Dezactivat"
#define D_DISTANCE "Distanță" #define D_DISTANCE "Distanță"
#define D_DNS_SERVER "Server DNS" #define D_DNS_SERVER "Server DNS"
@ -513,12 +514,12 @@
#define D_TX20_WEST "V" #define D_TX20_WEST "V"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -79,6 +79,7 @@
#define D_DATA "Данные" #define D_DATA "Данные"
#define D_DARKLIGHT "Темный" #define D_DARKLIGHT "Темный"
#define D_DEBUG "Отладка" #define D_DEBUG "Отладка"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Блокирован" #define D_DISABLED "Блокирован"
#define D_DISTANCE "Distance" #define D_DISTANCE "Distance"
#define D_DNS_SERVER "DNS Сервер" #define D_DNS_SERVER "DNS Сервер"
@ -513,12 +514,12 @@
#define D_TX20_WEST "W" #define D_TX20_WEST "W"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -80,6 +80,7 @@
#define D_FLOW_RATE "Flow rate" #define D_FLOW_RATE "Flow rate"
#define D_DARKLIGHT "Tmavý" #define D_DARKLIGHT "Tmavý"
#define D_DEBUG "Debug" #define D_DEBUG "Debug"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Zablokované" #define D_DISABLED "Zablokované"
#define D_DISTANCE "Vzdialenosť" #define D_DISTANCE "Vzdialenosť"
#define D_DNS_SERVER "Server DNS" #define D_DNS_SERVER "Server DNS"
@ -513,12 +514,12 @@
#define D_TX20_WEST "Z" #define D_TX20_WEST "Z"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -79,6 +79,7 @@
#define D_DATA "Data" #define D_DATA "Data"
#define D_DARKLIGHT "Mörkt" #define D_DARKLIGHT "Mörkt"
#define D_DEBUG "Debug" #define D_DEBUG "Debug"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Inaktiverad" #define D_DISABLED "Inaktiverad"
#define D_DISTANCE "Distans" #define D_DISTANCE "Distans"
#define D_DNS_SERVER "DNS-server" #define D_DNS_SERVER "DNS-server"
@ -513,12 +514,12 @@
#define D_TX20_WEST "V" #define D_TX20_WEST "V"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -79,6 +79,7 @@
#define D_DATA "Data" #define D_DATA "Data"
#define D_DARKLIGHT "Karanlık" #define D_DARKLIGHT "Karanlık"
#define D_DEBUG "Hata Ayıklama" #define D_DEBUG "Hata Ayıklama"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Etkin Değil" #define D_DISABLED "Etkin Değil"
#define D_DISTANCE "Mesage" #define D_DISTANCE "Mesage"
#define D_DNS_SERVER "DNS Sunucu" #define D_DNS_SERVER "DNS Sunucu"
@ -513,12 +514,12 @@
#define D_TX20_WEST "W" #define D_TX20_WEST "W"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -79,6 +79,7 @@
#define D_DATA "Дані" #define D_DATA "Дані"
#define D_DARKLIGHT "Темний" #define D_DARKLIGHT "Темний"
#define D_DEBUG "Налагодження" #define D_DEBUG "Налагодження"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "Вимкнено" #define D_DISABLED "Вимкнено"
#define D_DISTANCE "Відстань" #define D_DISTANCE "Відстань"
#define D_DNS_SERVER "Сервер DNS" #define D_DNS_SERVER "Сервер DNS"
@ -513,12 +514,12 @@
#define D_TX20_WEST "Зх" #define D_TX20_WEST "Зх"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -79,6 +79,7 @@
#define D_DATA "数据:" #define D_DATA "数据:"
#define D_DARKLIGHT "暗" #define D_DARKLIGHT "暗"
#define D_DEBUG "调试" #define D_DEBUG "调试"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "禁用" #define D_DISABLED "禁用"
#define D_DISTANCE "距离" #define D_DISTANCE "距离"
#define D_DNS_SERVER "DNS服务器" #define D_DNS_SERVER "DNS服务器"
@ -513,12 +514,12 @@
#define D_TX20_WEST "西" #define D_TX20_WEST "西"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -79,6 +79,7 @@
#define D_DATA "數據:" #define D_DATA "數據:"
#define D_DARKLIGHT "Dark" #define D_DARKLIGHT "Dark"
#define D_DEBUG "除錯" #define D_DEBUG "除錯"
#define D_DEWPOINT "Dew point"
#define D_DISABLED "停用" #define D_DISABLED "停用"
#define D_DISTANCE "Distance" #define D_DISTANCE "Distance"
#define D_DNS_SERVER "DNS伺服器" #define D_DNS_SERVER "DNS伺服器"
@ -513,12 +514,12 @@
#define D_TX20_WEST "W" #define D_TX20_WEST "W"
// xsns_53_sml.ino // xsns_53_sml.ino
#define D_TPWRIN "Total-In" #define D_TPWRIN "Energy Total-In"
#define D_TPWROUT "Total-Out" #define D_TPWROUT "Energy Total-Out"
#define D_TPWRCURR "Current-In/Out" #define D_TPWRCURR "Active Power-In/Out"
#define D_TPWRCURR1 "Current-In p1" #define D_TPWRCURR1 "Active Power-In p1"
#define D_TPWRCURR2 "Current-In p2" #define D_TPWRCURR2 "Active Power-In p2"
#define D_TPWRCURR3 "Current-In p3" #define D_TPWRCURR3 "Active Power-In p3"
#define D_Strom_L1 "Current L1" #define D_Strom_L1 "Current L1"
#define D_Strom_L2 "Current L2" #define D_Strom_L2 "Current L2"
#define D_Strom_L3 "Current L3" #define D_Strom_L3 "Current L3"

View File

@ -623,6 +623,24 @@ float ConvertHumidity(float h)
return h; return h;
} }
float CalcTempHumToDew(float t, float h)
{
if (isnan(h) || isnan(t)) { return 0.0; }
if (Settings.flag.temperature_conversion) { // SetOption8 - Switch between Celsius or Fahrenheit
t = (t - 32) / 1.8; // Celsius
}
// float gamma = log(h / 100) + 17.62 * t / (243.5 + t);
float gamma = TaylorLog(h / 100) + 17.62 * t / (243.5 + t);
float result = (243.5 * gamma / (17.62 - gamma));
if (Settings.flag.temperature_conversion) { // SetOption8 - Switch between Celsius or Fahrenheit
result = result * 1.8 + 32; // Fahrenheit
}
return result;
}
float ConvertPressure(float p) float ConvertPressure(float p)
{ {
float result = p; float result = p;

View File

@ -667,6 +667,38 @@ void MqttPublishTeleState(void)
#endif // USE_SCRIPT #endif // USE_SCRIPT
} }
void TempHumDewShow(bool json, bool pass_on, const char *types, float f_temperature, float f_humidity)
{
char temperature[33];
dtostrfd(f_temperature, Settings.flag2.temperature_resolution, temperature);
char humidity[33];
dtostrfd(f_humidity, Settings.flag2.humidity_resolution, humidity);
float f_dewpoint = CalcTempHumToDew(f_temperature, f_humidity);
char dewpoint[33];
dtostrfd(f_dewpoint, Settings.flag2.temperature_resolution, dewpoint);
if (json) {
ResponseAppend_P(JSON_SNS_TEMPHUMDEW, types, temperature, humidity, dewpoint);
#ifdef USE_DOMOTICZ
if (pass_on) {
DomoticzTempHumSensor(temperature, humidity);
}
#endif // USE_DOMOTICZ
#ifdef USE_KNX
if (pass_on) {
KnxSensor(KNX_TEMPERATURE, f_temperature);
KnxSensor(KNX_HUMIDITY, f_humidity);
}
#endif // USE_KNX
#ifdef USE_WEBSERVER
} else {
WSContentSend_PD(HTTP_SNS_TEMP, types, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_HUM, types, humidity);
WSContentSend_PD(HTTP_SNS_DEW, types, dewpoint, TempUnit());
#endif // USE_WEBSERVER
}
}
bool MqttShowSensor(void) bool MqttShowSensor(void)
{ {
ResponseAppendTime(); ResponseAppendTime();

View File

@ -240,7 +240,7 @@ void DhtEverySecond(void)
} }
} }
} }
/*
void DhtShow(bool json) void DhtShow(bool json)
{ {
for (uint32_t i = 0; i < dht_sensors; i++) { for (uint32_t i = 0; i < dht_sensors; i++) {
@ -270,6 +270,13 @@ void DhtShow(bool json)
} }
} }
} }
*/
void DhtShow(bool json)
{
for (uint32_t i = 0; i < dht_sensors; i++) {
TempHumDewShow(json, ((0 == tele_period) && (0 == i)), Dht[i].stype, Dht[i].t, Dht[i].h);
}
}
/*********************************************************************************************\ /*********************************************************************************************\
* Interface * Interface

View File

@ -179,7 +179,7 @@ void ShtEverySecond(void)
} }
} }
} }
/*
void ShtShow(bool json) void ShtShow(bool json)
{ {
if (sht_valid) { if (sht_valid) {
@ -209,6 +209,13 @@ void ShtShow(bool json)
} }
} }
} }
*/
void ShtShow(bool json)
{
if (sht_valid) {
TempHumDewShow(json, (0 == tele_period), sht_types, sht_temperature, sht_humidity);
}
}
/*********************************************************************************************\ /*********************************************************************************************\
* Interface * Interface

View File

@ -237,7 +237,7 @@ void HtuEverySecond(void)
} }
} }
} }
/*
void HtuShow(bool json) void HtuShow(bool json)
{ {
if (htu_valid) { if (htu_valid) {
@ -267,6 +267,13 @@ void HtuShow(bool json)
} }
} }
} }
*/
void HtuShow(bool json)
{
if (htu_valid) {
TempHumDewShow(json, (0 == tele_period), htu_types, htu_temperature, htu_humidity);
}
}
/*********************************************************************************************\ /*********************************************************************************************\
* Interface * Interface

View File

@ -91,7 +91,7 @@ void Sht3xDetect(void)
} }
} }
} }
/*
void Sht3xShow(bool json) void Sht3xShow(bool json)
{ {
for (uint32_t i = 0; i < sht3x_count; i++) { for (uint32_t i = 0; i < sht3x_count; i++) {
@ -129,6 +129,19 @@ void Sht3xShow(bool json)
} }
} }
} }
*/
void Sht3xShow(bool json)
{
for (uint32_t i = 0; i < sht3x_count; i++) {
float t;
float h;
if (Sht3xRead(t, h, sht3x_sensors[i].address)) {
char types[11];
snprintf_P(types, sizeof(types), PSTR("%s%c0x%02X"), sht3x_sensors[i].types, IndexSeparator(), sht3x_sensors[i].address); // "SHT3X-0xXX"
TempHumDewShow(json, ((0 == tele_period) && (0 == i)), types, t, h);
}
}
}
/*********************************************************************************************\ /*********************************************************************************************\
* Interface * Interface

View File

@ -113,8 +113,8 @@ struct METER_DESC {
struct METER_DESC const meter_desc[METERS_USED]={ struct METER_DESC const meter_desc[METERS_USED]={
[0]={3,'o',0,SML_BAUDRATE,"OBIS",-1,1,0}}; [0]={3,'o',0,SML_BAUDRATE,"OBIS",-1,1,0}};
const uint8_t meter[]= const uint8_t meter[]=
"1,1-0:1.8.0*255(@1," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "1,1-0:1.8.0*255(@1," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
"1,1-0:2.8.0*255(@1," D_TPWROUT ",KWh," DJ_TPWROUT ",4|" "1,1-0:2.8.0*255(@1," D_TPWROUT ",kWh," DJ_TPWROUT ",4|"
"1,1-0:21.7.0*255(@1," D_TPWRCURR1 ",W," DJ_TPWRCURR1 ",0|" "1,1-0:21.7.0*255(@1," D_TPWRCURR1 ",W," DJ_TPWRCURR1 ",0|"
"1,1-0:41.7.0*255(@1," D_TPWRCURR2 ",W," DJ_TPWRCURR2 ",0|" "1,1-0:41.7.0*255(@1," D_TPWRCURR2 ",W," DJ_TPWRCURR2 ",0|"
"1,1-0:61.7.0*255(@1," D_TPWRCURR3 ",W," DJ_TPWRCURR3 ",0|" "1,1-0:61.7.0*255(@1," D_TPWRCURR3 ",W," DJ_TPWRCURR3 ",0|"
@ -131,8 +131,8 @@ const uint8_t meter[]=
struct METER_DESC const meter_desc[METERS_USED]={ struct METER_DESC const meter_desc[METERS_USED]={
[0]={3,'o',0,SML_BAUDRATE,"OBIS",-1,1,0}}; [0]={3,'o',0,SML_BAUDRATE,"OBIS",-1,1,0}};
const uint8_t meter[]= const uint8_t meter[]=
"1,1-0:1.8.1*255(@1," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "1,1-0:1.8.1*255(@1," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
"1,1-0:2.8.1*255(@1," D_TPWROUT ",KWh," DJ_TPWROUT ",4|" "1,1-0:2.8.1*255(@1," D_TPWROUT ",kWh," DJ_TPWROUT ",4|"
"1,=d 2 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|" "1,=d 2 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|"
"1,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0"; "1,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0";
#endif #endif
@ -147,9 +147,9 @@ struct METER_DESC const meter_desc[METERS_USED]={
// 2 Richtungszähler EHZ SML 8 bit 9600 baud, binär // 2 Richtungszähler EHZ SML 8 bit 9600 baud, binär
const uint8_t meter[]= const uint8_t meter[]=
//0x77,0x07,0x01,0x00,0x01,0x08,0x00,0xff //0x77,0x07,0x01,0x00,0x01,0x08,0x00,0xff
"1,77070100010800ff@1000," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "1,77070100010800ff@1000," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
//0x77,0x07,0x01,0x00,0x02,0x08,0x00,0xff //0x77,0x07,0x01,0x00,0x02,0x08,0x00,0xff
"1,77070100020800ff@1000," D_TPWROUT ",KWh," DJ_TPWROUT ",4|" "1,77070100020800ff@1000," D_TPWROUT ",kWh," DJ_TPWROUT ",4|"
//0x77,0x07,0x01,0x00,0x10,0x07,0x00,0xff //0x77,0x07,0x01,0x00,0x10,0x07,0x00,0xff
"1,77070100100700ff@1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|" "1,77070100100700ff@1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|"
//0x77,0x07,0x01,0x00,0x00,0x00,0x09,0xff //0x77,0x07,0x01,0x00,0x00,0x00,0x09,0xff
@ -167,9 +167,9 @@ struct METER_DESC const meter_desc[METERS_USED]={
// verbrauch total // verbrauch total
const uint8_t meter[]= const uint8_t meter[]=
//0x77,0x07,0x01,0x00,0x01,0x08,0x00,0xff //0x77,0x07,0x01,0x00,0x01,0x08,0x00,0xff
"1,77070100010800ff@1000," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "1,77070100010800ff@1000," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
//0x77,0x07,0x01,0x00,0x01,0x08,0x01,0xff //0x77,0x07,0x01,0x00,0x01,0x08,0x01,0xff
"1,77070100020800ff@1000," D_TPWROUT ",KWh," DJ_TPWROUT ",4|" "1,77070100020800ff@1000," D_TPWROUT ",kWh," DJ_TPWROUT ",4|"
//0x77,0x07,0x01,0x00,0x0f,0x07,0x00,0xff //0x77,0x07,0x01,0x00,0x0f,0x07,0x00,0xff
"1,770701000f0700ff@1," D_TPWRCURR ",W," DJ_TPWRCURR ",0"; "1,770701000f0700ff@1," D_TPWRCURR ",W," DJ_TPWRCURR ",0";
#endif #endif
@ -185,9 +185,9 @@ struct METER_DESC const meter_desc[METERS_USED]={
// verbrauch total // verbrauch total
const uint8_t meter[]= const uint8_t meter[]=
//0x77,0x07,0x01,0x00,0x01,0x08,0x00,0xff //0x77,0x07,0x01,0x00,0x01,0x08,0x00,0xff
"1,77070100010800ff@1000," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "1,77070100010800ff@1000," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
//0x77,0x07,0x01,0x00,0x01,0x08,0x01,0xff //0x77,0x07,0x01,0x00,0x01,0x08,0x01,0xff
"1,77070100020801ff@1000," D_TPWROUT ",KWh," DJ_TPWROUT ",4|" "1,77070100020801ff@1000," D_TPWROUT ",kWh," DJ_TPWROUT ",4|"
//0x77,0x07,0x01,0x00,0x0f,0x07,0x00,0xff //0x77,0x07,0x01,0x00,0x0f,0x07,0x00,0xff
"1,770701000f0700ff@1," D_TPWRCURR ",W," DJ_TPWRCURR ",0"; "1,770701000f0700ff@1," D_TPWRCURR ",W," DJ_TPWRCURR ",0";
#endif #endif
@ -199,13 +199,13 @@ struct METER_DESC const meter_desc[METERS_USED]={
[0]={3,'s',0,SML_BAUDRATE,"strom",-1,1,0}}; [0]={3,'s',0,SML_BAUDRATE,"strom",-1,1,0}};
const uint8_t meter[]= const uint8_t meter[]=
//0x77,0x07,0x01,0x00,0x01,0x08,0x00,0xff //0x77,0x07,0x01,0x00,0x01,0x08,0x00,0xff
"1,77070100010800ff@1000," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "1,77070100010800ff@1000," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
// .. // ..
"1,77070100020800ff@1000," D_TPWROUT ",KWh," DJ_TPWROUT ",4|" "1,77070100020800ff@1000," D_TPWROUT ",kWh," DJ_TPWROUT ",4|"
//0x77,0x07,0x01,0x00,0x01,0x08,0x01,0xff //0x77,0x07,0x01,0x00,0x01,0x08,0x01,0xff
"1,77070100010801ff@1000," D_TPWRCURR1 ",KWh," DJ_TPWRCURR1 ",4|" "1,77070100010801ff@1000," D_TPWRCURR1 ",kWh," DJ_TPWRCURR1 ",4|"
//0x77,0x07,0x01,0x00,0x01,0x08,0x02,0xff //0x77,0x07,0x01,0x00,0x01,0x08,0x02,0xff
"1,77070100010802ff@1000," D_TPWRCURR2 ",KWh," DJ_TPWRCURR2 ",4|" "1,77070100010802ff@1000," D_TPWRCURR2 ",kWh," DJ_TPWRCURR2 ",4|"
// 77 07 01 00 10 07 00 FF // 77 07 01 00 10 07 00 FF
"1,77070100100700ff@1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|" "1,77070100100700ff@1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|"
// .. // ..
@ -222,9 +222,9 @@ struct METER_DESC const meter_desc[METERS_USED]={
[0]={3,'s',0,SML_BAUDRATE,"SML",-1,1,0}}; [0]={3,'s',0,SML_BAUDRATE,"SML",-1,1,0}};
const uint8_t meter[]= const uint8_t meter[]=
//0x77,0x07,0x01,0x00,0x01,0x08,0x01,0xff //0x77,0x07,0x01,0x00,0x01,0x08,0x01,0xff
"1,77070100010800ff@1000," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "1,77070100010800ff@1000," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
//0x77,0x07,0x01,0x00,0x02,0x08,0x01,0xff //0x77,0x07,0x01,0x00,0x02,0x08,0x01,0xff
"1,77070100020801ff@1000," D_TPWROUT ",KWh," DJ_TPWROUT ",4|" "1,77070100020801ff@1000," D_TPWROUT ",kWh," DJ_TPWROUT ",4|"
//0x77,0x07,0x01,0x00,0x01,0x07,0x00,0xff //0x77,0x07,0x01,0x00,0x01,0x07,0x00,0xff
"1,77070100010700ff@1," D_TPWRCURR ",W," DJ_TPWRCURR ",0"; "1,77070100010700ff@1," D_TPWRCURR ",W," DJ_TPWRCURR ",0";
#endif #endif
@ -241,18 +241,18 @@ struct METER_DESC const meter_desc[METERS_USED]={
// 3 Zähler definiert // 3 Zähler definiert
const uint8_t meter[]= const uint8_t meter[]=
"1,1-0:1.8.0*255(@1," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "1,1-0:1.8.0*255(@1," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
"1,1-0:2.8.0*255(@1," D_TPWROUT ",KWh," DJ_TPWROUT ",4|" "1,1-0:2.8.0*255(@1," D_TPWROUT ",kWh," DJ_TPWROUT ",4|"
"1,1-0:21.7.0*255(@1," D_TPWRCURR1 ",W," DJ_TPWRCURR1 ",0|" "1,1-0:21.7.0*255(@1," D_TPWRCURR1 ",W," DJ_TPWRCURR1 ",0|"
"1,1-0:41.7.0*255(@1," D_TPWRCURR2 ",W," DJ_TPWRCURR2 ",0|" "1,1-0:41.7.0*255(@1," D_TPWRCURR2 ",W," DJ_TPWRCURR2 ",0|"
"1,1-0:61.7.0*255(@1," D_TPWRCURR3 ",W," DJ_TPWRCURR3 ",0|" "1,1-0:61.7.0*255(@1," D_TPWRCURR3 ",W," DJ_TPWRCURR3 ",0|"
"1,=m 3+4+5 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|" "1,=m 3+4+5 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|"
"1,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0|" "1,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0|"
"2,77070100010800ff@1000," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "2,77070100010800ff@1000," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
"2,77070100020800ff@1000," D_TPWROUT ",KWh," DJ_TPWROUT ",4|" "2,77070100020800ff@1000," D_TPWROUT ",kWh," DJ_TPWROUT ",4|"
"2,77070100100700ff@1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|" "2,77070100100700ff@1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|"
"3,1-0:1.8.1*255(@1," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "3,1-0:1.8.1*255(@1," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
"3,1-0:2.8.1*255(@1," D_TPWROUT ",KWh," DJ_TPWROUT ",4|" "3,1-0:2.8.1*255(@1," D_TPWROUT ",kWh," DJ_TPWROUT ",4|"
"3,=d 2 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|" "3,=d 2 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|"
"3,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0"; "3,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0";
@ -269,13 +269,13 @@ struct METER_DESC const meter_desc[METERS_USED]={
// 2 Zähler definiert // 2 Zähler definiert
const uint8_t meter[]= const uint8_t meter[]=
"1,1-0:1.8.1*255(@1," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "1,1-0:1.8.1*255(@1," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
"1,1-0:2.8.1*255(@1," D_TPWROUT ",KWh," DJ_TPWROUT ",4|" "1,1-0:2.8.1*255(@1," D_TPWROUT ",kWh," DJ_TPWROUT ",4|"
"1,=d 2 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|" "1,=d 2 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|"
"1,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0|" "1,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0|"
"2,1-0:1.8.1*255(@1," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "2,1-0:1.8.1*255(@1," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
"2,1-0:2.8.1*255(@1," D_TPWROUT ",KWh," DJ_TPWROUT ",4|" "2,1-0:2.8.1*255(@1," D_TPWROUT ",kWh," DJ_TPWROUT ",4|"
"2,=d 6 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|" "2,=d 6 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|"
"2,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0"; "2,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0";
@ -293,18 +293,18 @@ struct METER_DESC const meter_desc[METERS_USED]={
// 3 Zähler definiert // 3 Zähler definiert
const uint8_t meter[]= const uint8_t meter[]=
"1,=h --- Zähler Nr 1 ---|" "1,=h --- Zähler Nr 1 ---|"
"1,1-0:1.8.1*255(@1," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "1,1-0:1.8.1*255(@1," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
"1,1-0:2.8.1*255(@1," D_TPWROUT ",KWh," DJ_TPWROUT ",4|" "1,1-0:2.8.1*255(@1," D_TPWROUT ",kWh," DJ_TPWROUT ",4|"
"1,=d 2 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|" "1,=d 2 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|"
"1,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0|" "1,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0|"
"2,=h --- Zähler Nr 2 ---|" "2,=h --- Zähler Nr 2 ---|"
"2,1-0:1.8.1*255(@1," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "2,1-0:1.8.1*255(@1," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
"2,1-0:2.8.1*255(@1," D_TPWROUT ",KWh," DJ_TPWROUT ",4|" "2,1-0:2.8.1*255(@1," D_TPWROUT ",kWh," DJ_TPWROUT ",4|"
"2,=d 6 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|" "2,=d 6 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|"
"2,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0|" "2,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0|"
"3,=h --- Zähler Nr 3 ---|" "3,=h --- Zähler Nr 3 ---|"
"3,1-0:1.8.1*255(@1," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "3,1-0:1.8.1*255(@1," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
"3,1-0:2.8.1*255(@1," D_TPWROUT ",KWh," DJ_TPWROUT ",4|" "3,1-0:2.8.1*255(@1," D_TPWROUT ",kWh," DJ_TPWROUT ",4|"
"3,=d 10 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|" "3,=d 10 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|"
"3,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0"; "3,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0";
@ -318,7 +318,7 @@ const uint8_t meter[]=
struct METER_DESC const meter_desc[METERS_USED]={ struct METER_DESC const meter_desc[METERS_USED]={
[0]={3,'o',0,SML_BAUDRATE,"OBIS",-1,1,0}}; [0]={3,'o',0,SML_BAUDRATE,"OBIS",-1,1,0}};
const uint8_t meter[]= const uint8_t meter[]=
"1,1-0:1.8.1*255(@1," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "1,1-0:1.8.1*255(@1," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
"1,=d 1 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|" "1,=d 1 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|"
"1,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0"; "1,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0";
#endif #endif
@ -333,13 +333,13 @@ struct METER_DESC const meter_desc[METERS_USED]={
// 2 direction meter EHZ SML 8 bit 9600 baud, binary // 2 direction meter EHZ SML 8 bit 9600 baud, binary
const uint8_t meter[]= const uint8_t meter[]=
//0x77,0x07,0x01,0x00,0x01,0x08,0x00,0xff //0x77,0x07,0x01,0x00,0x01,0x08,0x00,0xff
"1,77070100010800ff@1000," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "1,77070100010800ff@1000," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
//0x77,0x07,0x01,0x00,0x02,0x08,0x00,0xff //0x77,0x07,0x01,0x00,0x02,0x08,0x00,0xff
"1,77070100020800ff@1000," D_TPWROUT ",KWh," DJ_TPWROUT ",4|" "1,77070100020800ff@1000," D_TPWROUT ",kWh," DJ_TPWROUT ",4|"
//0x77,0x07,0x01,0x00,0x01,0x08,0x01,0xff //0x77,0x07,0x01,0x00,0x01,0x08,0x01,0xff
"1,77070100010801ff@1000," D_TPWRCURR1 ",KWh," DJ_TPWRCURR1 ",4|" "1,77070100010801ff@1000," D_TPWRCURR1 ",kWh," DJ_TPWRCURR1 ",4|"
//0x77,0x07,0x01,0x00,0x01,0x08,0x02,0xff //0x77,0x07,0x01,0x00,0x01,0x08,0x02,0xff
"1,77070100010802ff@1000," D_TPWRCURR2 ",KWh," DJ_TPWRCURR2 ",4|" "1,77070100010802ff@1000," D_TPWRCURR2 ",kWh," DJ_TPWRCURR2 ",4|"
//0x77,0x07,0x01,0x00,0x10,0x07,0x00,0xff //0x77,0x07,0x01,0x00,0x10,0x07,0x00,0xff
"1,77070100100700ff@1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|" "1,77070100100700ff@1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|"
//0x77,0x07,0x01,0x00,0x00,0x00,0x09,0xff //0x77,0x07,0x01,0x00,0x00,0x00,0x09,0xff
@ -357,8 +357,8 @@ struct METER_DESC const meter_desc[METERS_USED]={
// 3 meters defined // 3 meters defined
const uint8_t meter[]= const uint8_t meter[]=
"1,1-0:1.8.1*255(@1," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" "1,1-0:1.8.1*255(@1," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
"1,1-0:2.8.1*255(@1," D_TPWROUT ",KWh," DJ_TPWROUT ",4|" "1,1-0:2.8.1*255(@1," D_TPWROUT ",kWh," DJ_TPWROUT ",4|"
"1,=d 2 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|" "1,=d 2 10 @1," D_TPWRCURR ",W," DJ_TPWRCURR ",0|"
"1,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0|" "1,1-0:0.0.0*255(@#)," D_METERNR ",," DJ_METERNR ",0|"
@ -389,7 +389,7 @@ const uint8_t meter[]=
//----------------------------Stromzähler-EHZ363W5--sensor53 d0---------------------------- //----------------------------Stromzähler-EHZ363W5--sensor53 d0----------------------------
"3,=h==================|" "3,=h==================|"
//0x77,0x07,0x01,0x00,0x01,0x08,0x00,0xff //0x77,0x07,0x01,0x00,0x01,0x08,0x00,0xff
"3,77070100010800ff@1000," D_TPWRIN ",KWh," DJ_TPWRIN ",3|" // 3 Zählerstand Total "3,77070100010800ff@1000," D_TPWRIN ",kWh," DJ_TPWRIN ",3|" // 3 Zählerstand Total
"3,=h==================|" "3,=h==================|"
//0x77,0x07,0x01,0x00,0x10,0x07,0x00,0xff //0x77,0x07,0x01,0x00,0x10,0x07,0x00,0xff
"3,77070100100700ff@1," D_TPWRCURR ",W," DJ_TPWRCURR ",2|" // 4 Aktuelle Leistung "3,77070100100700ff@1," D_TPWRCURR ",W," DJ_TPWRCURR ",2|" // 4 Aktuelle Leistung
@ -1548,7 +1548,7 @@ nextsect:
} }
} }
//"1-0:1.8.0*255(@1," D_TPWRIN ",KWh," DJ_TPWRIN ",4|" //"1-0:1.8.0*255(@1," D_TPWRIN ",kWh," DJ_TPWRIN ",4|"
void SML_Immediate_MQTT(const char *mp,uint8_t index,uint8_t mindex) { void SML_Immediate_MQTT(const char *mp,uint8_t index,uint8_t mindex) {
char tpowstr[32]; char tpowstr[32];
char jname[24]; char jname[24];

View File

@ -92,7 +92,7 @@ void Hih6EverySecond(void)
} }
} }
} }
/*
void Hih6Show(bool json) void Hih6Show(bool json)
{ {
if (Hih6.valid) { if (Hih6.valid) {
@ -122,6 +122,13 @@ void Hih6Show(bool json)
} }
} }
} }
*/
void Hih6Show(bool json)
{
if (Hih6.valid) {
TempHumDewShow(json, (0 == tele_period), Hih6.types, Hih6.temperature, Hih6.humidity);
}
}
/*********************************************************************************************\ /*********************************************************************************************\
* Interface * Interface

View File

@ -86,7 +86,7 @@ void Dht12EverySecond(void)
} }
} }
} }
/*
void Dht12Show(bool json) void Dht12Show(bool json)
{ {
if (Dht12.valid) { if (Dht12.valid) {
@ -116,6 +116,13 @@ void Dht12Show(bool json)
} }
} }
} }
*/
void Dht12Show(bool json)
{
if (Dht12.valid) {
TempHumDewShow(json, (0 == tele_period), Dht12.name, Dht12.temperature, Dht12.humidity);
}
}
/*********************************************************************************************\ /*********************************************************************************************\
* Interface * Interface

View File

@ -38,129 +38,178 @@
#define XSNS_63 63 #define XSNS_63 63
#define XI2C_43 43 // See I2CDEVICES.md #define XI2C_43 43 // See I2CDEVICES.md
#define AHT10_ADDR 0x38 #define AHT1X_ADDR1 0x38
#define AHT1X_ADDR2 0x39
uint8_t eSensorCalibrateCmd[3] = {0xE1, 0x08, 0x00}; #define AHT1X_MAX_SENSORS 2
uint8_t eSensorMeasureCmd[3] = {0xAC, 0x33, 0x00};
uint8_t eSensorResetCmd = 0xBA;
struct AHT10 { #define AHT_HUMIDITY_CONST 100
#define AHT_TEMPERATURE_CONST 200
#define AHT_TEMPERATURE_OFFSET 50
#define KILOBYTE_CONST 1048576.0f
#define AHT1X_CMD_DELAY 40
#define AHT1X_RST_DELAY 30
#define AHT1X_MEAS_DELAY 80 // over 75ms in datasheet
uint8_t AHTSetCalCmd[3] = {0xE1, 0x08, 00}; //load factory calibration coeff
uint8_t AHTSetCycleCmd[3] = {0xE1, 0x28, 00}; //enable cycle mode
uint8_t AHTMeasureCmd[3] = {0xAC, 0x33, 00}; //start measurment command
uint8_t AHTResetCmd = 0xBA; //soft reset command
const char ahtTypes[] PROGMEM = "AHT1X|AHT1X";
uint8_t aht1x_addresses[] = { AHT1X_ADDR1, AHT1X_ADDR2 };
uint8_t aht1x_count = 0;
uint8_t aht1x_Pcount = 0;
struct AHT1XSTRUCT
{
float humidity = NAN; float humidity = NAN;
float temperature = NAN; float temperature = NAN;
uint8_t valid = 0; uint8_t address; // bus address
uint8_t count = 0; char types[6]; // Sensor type name and address -
char name[6] = "AHT1x"; } aht1x_sensors[AHT1X_MAX_SENSORS];
} AHT10;
bool AHT10Read(void) bool AHT1XWrite(uint8_t aht1x_idx)
{ {
if (AHT10.valid) { AHT10.valid--; } Wire.beginTransmission(aht1x_sensors[aht1x_idx].address);
Wire.write(AHTMeasureCmd, 3);
if (Wire.endTransmission() != 0)
return false;
}
bool AHT1XRead(uint8_t aht1x_idx)
{
uint8_t data[6]; uint8_t data[6];
Wire.requestFrom(aht1x_sensors[aht1x_idx].address, (uint8_t) 6);
Wire.beginTransmission(AHT10_ADDR); for(uint8_t i = 0; Wire.available() > 0; i++){
Wire.write(eSensorMeasureCmd, 3);
Wire.endTransmission();
delay(80);
Wire.requestFrom(AHT10_ADDR, 6);
for (uint32_t i = 0; Wire.available() > 0; i++) {
data[i] = Wire.read(); data[i] = Wire.read();
} }
if ((data[0] & 0x80) == 0x80) return false; //device is busy
uint32_t result_h = ((data[1] << 16) | (data[2] << 8) | data[3]) >> 4; aht1x_sensors[aht1x_idx].humidity = (((data[1] << 12)| (data[2] << 4) | data[3] >> 4) * AHT_HUMIDITY_CONST / KILOBYTE_CONST);
uint32_t result_t = ((data[3] & 0x0F) << 16) | (data[4] << 8) | data[5]; aht1x_sensors[aht1x_idx].temperature = ((AHT_TEMPERATURE_CONST * (((data[3] & 0x0F) << 16) | (data[4] << 8) | data[5]) / KILOBYTE_CONST) - AHT_TEMPERATURE_OFFSET);
float humidity = result_h * 100 / 1048576; return (!isnan(aht1x_sensors[aht1x_idx].temperature) && !isnan(aht1x_sensors[aht1x_idx].humidity) && (aht1x_sensors[aht1x_idx].humidity != 0));
float temperature = ((200 * result_t) / 1048576) - 50;
if (isnan(temperature) || isnan(humidity)) { return false; }
AHT10.humidity = ConvertHumidity(humidity);
AHT10.temperature = ConvertTemp(temperature);
AHT10.valid = SENSOR_MAX_MISS;
return true;
} }
/********************************************************************************************/ /********************************************************************************************/
bool AHT10Init(void) // Test for Polling the device without delays
// Incompatible with other devices on I2C bus
void AHT1XPoll(void) // We have 100ms for read. Sensor needs 80-95 ms
{ {
Wire.begin(AHT10_ADDR); aht1x_Pcount++;
Wire.beginTransmission(AHT10_ADDR); switch (aht1x_Pcount) {
Wire.write(eSensorCalibrateCmd, 3); // init with internal temp coef. case 10:
Wire.endTransmission(); AHT1XWrite(0);
break;
delay(40); // after tests, its ok case 11:
if (AHT1XRead(0)){
return (0x08 == (AHT10ReadStatus() & 0x68)); ConvertTemp(aht1x_sensors[0].temperature); // Set global temperature
ConvertHumidity(aht1x_sensors[0].humidity); // Set global humidity
}
aht1x_Pcount = 0;
break;
}
} }
uint8_t AHT10ReadStatus(void) unsigned char AHT1XReadStatus(uint8_t aht1x_address)
{ {
Wire.requestFrom(AHT10_ADDR, 1); uint8_t result = 0;
uint8_t result = Wire.read(); Wire.requestFrom(aht1x_address, (uint8_t) 1);
result = Wire.read();
return result; return result;
} }
void AHT10Reset(void) void AHT1XReset(uint8_t aht1x_address)
{ {
Wire.beginTransmission(AHT10_ADDR); Wire.beginTransmission(aht1x_address);
Wire.write(eSensorResetCmd); Wire.write(AHTResetCmd);
Wire.endTransmission(); Wire.endTransmission();
delay(20); delay(AHT1X_RST_DELAY);
} }
/********************************************************************************************/ /********************************************************************************************/
bool AHT1XInit(uint8_t aht1x_address)
void AHT10Detect(void)
{ {
if (I2cActive(AHT10_ADDR)) { return; } Wire.beginTransmission(aht1x_address);
Wire.write(AHTSetCalCmd, 3);
if (AHT10Init()) { if (Wire.endTransmission() != 0) return false;
I2cSetActiveFound(AHT10_ADDR, AHT10.name); delay(AHT1X_CMD_DELAY);
AHT10.count = 1; if((AHT1XReadStatus(aht1x_address) & 0x68) == 0x08) // Sensor calcoef aktiv
} return true;
return false;
} }
void AHT10EverySecond(void) void AHT1XDetect(void)
{ {
if (uptime &1) { for (uint8_t i = 0; i < AHT1X_MAX_SENSORS; i++) {
// AHT10: 55mS if (I2cActive(aht1x_addresses[i])) { continue; }
if (!AHT10Read()) { if (AHT1XInit(aht1x_addresses[i]))
AddLogMissed(AHT10.name, AHT10.valid); {
aht1x_sensors[aht1x_count].address = aht1x_addresses[i];
GetTextIndexed(aht1x_sensors[aht1x_count].types, sizeof(aht1x_sensors[aht1x_count].types), i, ahtTypes);
I2cSetActiveFound(aht1x_sensors[aht1x_count].address, aht1x_sensors[aht1x_count].types);
aht1x_count = 1;
break; // Only one Sensor allowed at the moment (I2C Sensor-Bug)
} }
} }
} }
/*
void AHT10Show(bool json) void AHT1XShow(bool json)
{ {
if (AHT10.valid) { for (uint8_t i = 0; i < aht1x_count; i++)
{
float tem = ConvertTemp(aht1x_sensors[i].temperature);
float hum = ConvertHumidity(aht1x_sensors[i].humidity);
float dew = CalcTemHumToDew(aht1x_sensors[i].humidity, aht1x_sensors[i].temperature);
char types[11]; // AHT1X-0x38
snprintf_P(types, sizeof(types), PSTR("%s%c0x%02X"), aht1x_sensors[i].types, IndexSeparator(), aht1x_sensors[i].address); // "X-0xXX"
char temperature[33]; char temperature[33];
dtostrfd(AHT10.temperature, Settings.flag2.temperature_resolution, temperature); dtostrfd(tem, Settings.flag2.temperature_resolution, temperature);
char humidity[33]; char humidity[33];
dtostrfd(AHT10.humidity, Settings.flag2.humidity_resolution, humidity); dtostrfd(hum, Settings.flag2.humidity_resolution, humidity);
char dewpoint[33];
dtostrfd(dew, Settings.flag2.temperature_resolution, dewpoint);
if (json) { if (json) {
ResponseAppend_P(JSON_SNS_TEMPHUM, AHT10.name, temperature, humidity); //ResponseAppend_P(JSON_SNS_TEMPHUM, types, temperature, humidity);
#ifdef USE_DOMOTICZ ResponseAppend_P(JSON_SNS_TEMPHUMDEW, types, temperature, humidity, dewpoint);
if ((0 == tele_period)) { #ifdef USE_DOMOTICZ
if ((0 == tele_period) && (0 == i)); // <-- fails
{
DomoticzTempHumSensor(temperature, humidity); DomoticzTempHumSensor(temperature, humidity);
} }
#endif // USE_DOMOTICZ #endif // USE_DOMOTICZ
#ifdef USE_KNX #ifdef USE_KNX
if (0 == tele_period) { if (0 == tele_period)
KnxSensor(KNX_TEMPERATURE, AHT10.temperature); {
KnxSensor(KNX_HUMIDITY, AHT10.humidity); KnxSensor(KNX_TEMPERATURE, tem);
KnxSensor(KNX_HUMIDITY, hum);
} }
#endif // USE_KNX #endif // USE_KNX
#ifdef USE_WEBSERVER #ifdef USE_WEBSERVER
} else {
WSContentSend_PD(HTTP_SNS_TEMP, AHT10.name, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_HUM, AHT10.name, humidity);
#endif // USE_WEBSERVER
} }
else
{
WSContentSend_PD(HTTP_SNS_TEMP, types, temperature, TempUnit());
WSContentSend_PD(HTTP_SNS_HUM, types, humidity);
WSContentSend_PD(HTTP_SNS_DEW, types, dewpoint,TempUnit());
#endif // USE_WEBSERVER
}
}
}
*/
void AHT1XShow(bool json)
{
for (uint32_t i = 0; i < aht1x_count; i++) {
float tem = ConvertTemp(aht1x_sensors[i].temperature);
float hum = ConvertHumidity(aht1x_sensors[i].humidity);
char types[11]; // AHT1X-0x38
snprintf_P(types, sizeof(types), PSTR("%s%c0x%02X"), aht1x_sensors[i].types, IndexSeparator(), aht1x_sensors[i].address); // "X-0xXX"
TempHumDewShow(json, ((0 == tele_period) && (0 == i)), types, tem, hum);
} }
} }
@ -171,29 +220,28 @@ void AHT10Show(bool json)
bool Xsns63(uint8_t function) bool Xsns63(uint8_t function)
{ {
if (!I2cEnabled(XI2C_43)) { return false; } if (!I2cEnabled(XI2C_43)) { return false; }
bool result = false; bool result = false;
if (FUNC_INIT == function) { if (FUNC_INIT == function) {
AHT10Detect(); AHT1XDetect();
} }
else if (AHT10.count) { else if (aht1x_count){
switch (function) { switch (function) {
case FUNC_EVERY_SECOND: case FUNC_EVERY_100_MSECOND:
AHT10EverySecond(); AHT1XPoll();
break; break;
case FUNC_JSON_APPEND: case FUNC_JSON_APPEND:
AHT10Show(1); AHT1XShow(1);
break; break;
#ifdef USE_WEBSERVER #ifdef USE_WEBSERVER
case FUNC_WEB_SENSOR: case FUNC_WEB_SENSOR:
AHT10Show(0); AHT1XShow(0);
break; break;
#endif // USE_WEBSERVER #endif // USE_WEBSERVER
} }
} }
return result; return result;
} }
#endif // USE_AHT10 #endif // USE_AHT1X
#endif // USE_I2C #endif // USE_I2C

View File

@ -272,6 +272,7 @@ void HdcEverySecond(void) {
* the MQTT messages, and so on. * the MQTT messages, and so on.
* *
*/ */
/*
void HdcShow(bool json) { void HdcShow(bool json) {
if (hdc_valid) { if (hdc_valid) {
char temperature[33]; char temperature[33];
@ -301,6 +302,12 @@ void HdcShow(bool json) {
} }
} }
} }
*/
void HdcShow(bool json) {
if (hdc_valid) {
TempHumDewShow(json, (0 == tele_period), hdc_type_name, hdc_temperature, hdc_humidity);
}
}
/*********************************************************************************************\ /*********************************************************************************************\
* Interface * Interface