Autor Thema: readingsGroup - Spaltenwerte werden nach einiger Zeit überschrieben  (Gelesen 314 mal)

Offline SusisStrolch

  • Full Member
  • ***
  • Beiträge: 190
Zur Anzeige der RSSI- und Uptime-Werte meiner ESP8266 Landschaft habe ich mir eine ReadingsGroup gebastelt:
Device                          RSSI[dBm]   Uptime [y ddd hh.mm] Last seen
ESPEasy_D1pro_01_sysinfo        -58         0 005 18:22             2018-04-20 12:43:18
ESPEasy_ESP_Proto_4MB_sysinfo   -69         0 005 19:23             2018-04-20 12:43:30
...
Nach kurzer Zeit werden jedoch anstatt der RSSI-Werte in Spalte 2 die Werte aus Spalte 4 angezeigt.
Device                          RSSI[dBm]           Uptime [y ddd hh.mm] Last seen
ESPEasy_D1pro_01_sysinfo        2018-04-20 12:51:21 0 005 18:30             2018-04-20 12:51:21
ESPEasy_ESP_Proto_4MB_sysinfo   2018-04-20 12:51:35 0 005 19:31             2018-04-20 12:51:35
...

Woran kann dies liegen?
Hier die Definition der ReadingsGroup...
defmod rg_ee_si readingsGroup <Device>,<RSSI [dBm]>,<Uptime [y ddd hh.mm]>,<Last seen> TYPE=ESPEasy:RSSI,uptime,RSSI:t TYPE=LaCrosseGateway:RSSI,UpTimeSeconds,RSSI:t
attr rg_ee_si DbLogExclude .*
attr rg_ee_si cellStyle { 'style="margin: 0 20px 0 10px"' }
attr rg_ee_si group RSSI
attr rg_ee_si notime 1
attr rg_ee_si room ESPEasy
attr rg_ee_si sortColumn -4
attr rg_ee_si style style="width:800px;;"
attr rg_ee_si valueColumn { RSSI => 1, uptime => 2, stamp => 3 }
attr rg_ee_si valueFormat {\
 return "" if ($READING ne "uptime" && $READING ne "UpTimeSeconds");;\
 my $m = $VALUE;;\
 $m = $VALUE / 60 if ($READING eq "UpTimeSeconds");;\
 return sprintf "0 000 00:%02d", $m if $m < 60;;\
 my $h = $m / 60;; $m %= 60;;\
 return sprintf "0 000 %02d:%02d", $h, $m if $h < 24;;\
 my $d = $h / 24;; $h %= 24;;\
 return sprintf "0 %03d %02d:%02d", $d, $h, $m if $d <365;;\
 my $y = $d / 365;; $d %= 365;;\
 return sprintf "%d %03d %02d:%02d", $y, $d, $h, $m;;\
}
attr rg_ee_si valueStyle {\
 if ($READING eq "RSSI") {\
  if    ($VALUE >  -75) { undef }\
  else {($VALUE <= -85) ? 'style="color:red"' : 'style="color:orange"' }\
 }\
 elsif ($READING eq "presence") {\
  if ($VALUE eq 'present') {'style="color:green"' }\
  else {'style="color:orange"'}\
 }\
 else { undef }\
}
attr rg_ee_si verbose 3
Synology DS1515+, 16GB RAM, 4x 6TB WD-Red
- Docker (FHEM), MariaDB, MariaDB10, Surveillance Station
Gateways: LCG miniCUL433, LCG miniCUL868, AVR-X4000, VU-Solo SE, Kodi
ESP8266: ESPEasy (S0-Counter, Temp/Hum), Sonoff TH, Sonoff 4ch

 

decade-submarginal