Neues Modul readingsGroup

Begonnen von Niko, 24 August 2013, 11:59:11

Vorheriges Thema - Nächstes Thema

Xguide

Hallo justme,

ah, da habe ich in die völlig falsche Richtung gedacht.

Also sollte es der Action Detector sein, dann könnte er beispielweise über solch eine rG Definition reinkommen, wenn der Filter nicht funktioniert.

<Gerät>,<letzte Bewegung>,<Helligkeit>,<Batterie> TYPE=CUL_HM:FILTER=NAME=.*_MDIR:lastMotion,brightness,battery

Ist das so erlaubt oder habe ich mir da zuviel von list abgeschaut?

Bzw. es könnte auch folgende rG sein, dort selektiere ich (da ich es nicht besser hinbekommen habe) leider auch einen virtuellen Aktor und die VCCU selbst.


<Alias>,<Model>,<SerNo>,<Battery>,<Level>,<Cover>,<Activity>,<RSSI-1>,<RSSI-2>,<RSSI-3>,<Paired> IODev=HMLAN(1|2|3):alias,!?model,!D-serialNr,!battery,!batteryLevel,!cover,!Activity,!+HMLAN1_RSSI,!+HMLAN2_RSSI,!+HMLAN3_RSSI,!PairedTo


Danke für deine Hilfe!!!
FHEM 5.9 - Intel NUC i3 mit Proxmox im Stretch Container
HomeMatic - VCCU mit 2 x HM-LAN-CFG
Module: SMA Peripheries - Sonos - IPCam(s) - Philips Hue - Sprinkler - TabletUI - DBlog -

justme1968

der filter sollte passen. schau was ein list mit diesem
filter ausgibt und vergleich es mir den devices die du bei einem list auf die readingsGroup in den internals siehst.

schau in die beiden devices eine leeres IODev internal haben.
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

Xguide

Hallo justme,

Zitatschau in die beiden devices eine leeres IODev internal haben.
Das habe ich nicht wirklich verstanden.

Der andere Vergleich war erfolgreich, ein List mit identischem Filter liefert die gleichen Ergebnisse wie die rG. Ferner hat die VCCU und der virtuelle Aktor auch ein IODef eingetragen, das war also eine falsche Vermutung von mir. Der Actiondetector taucht nicht auf.
FHEM 5.9 - Intel NUC i3 mit Proxmox im Stretch Container
HomeMatic - VCCU mit 2 x HM-LAN-CFG
Module: SMA Peripheries - Sonos - IPCam(s) - Philips Hue - Sprinkler - TabletUI - DBlog -

Xguide

Hallo justme,

kurze Info zu meiner Erkenntnis, durch das heute Update musste ich natürlich ein "shutdown restart" machen, danach tauchte stacktrace das erste mal im Log auf und zwar so:


2017.04.20 09:23:13 1: PERL WARNING: Prototype mismatch: sub main::Log ($$) vs none at /opt/fhem//FHEM/33_readingsGroup.pm line 31, <$fh> line 322.
2017.04.20 09:23:13 1: stacktrace:
2017.04.20 09:23:13 1:     main::__ANON__                      called by /opt/fhem//FHEM/33_readingsGroup.pm (31)
2017.04.20 09:23:13 1:     (eval)                              called by fhem.pl (2403)
2017.04.20 09:23:13 1:     (eval)                              called by fhem.pl (2402)
2017.04.20 09:23:13 1:     main::CommandReload                 called by fhem.pl (1817)
2017.04.20 09:23:13 1:     main::LoadModule                    called by fhem.pl (1874)
2017.04.20 09:23:13 1:     main::CommandDefine                 called by fhem.pl (1149)
2017.04.20 09:23:13 1:     main::AnalyzeCommand                called by fhem.pl (1018)
2017.04.20 09:23:13 1:     main::AnalyzeCommandChain           called by fhem.pl (1284)
2017.04.20 09:23:13 1:     main::CommandInclude                called by fhem.pl (1149)
2017.04.20 09:23:13 1:     main::AnalyzeCommand                called by fhem.pl (1018)
2017.04.20 09:23:13 1:     main::AnalyzeCommandChain           called by fhem.pl (1284)
2017.04.20 09:23:13 1:     main::CommandInclude                called by fhem.pl (527)
2017.04.20 09:23:13 1: PERL WARNING: Prototype mismatch: sub main::Log3 ($$$) vs none at /opt/fhem//FHEM/33_readingsGroup.pm line 32, <$fh> line 322.
2017.04.20 09:23:13 1: stacktrace:
2017.04.20 09:23:13 1:     main::__ANON__                      called by /opt/fhem//FHEM/33_readingsGroup.pm (32)
2017.04.20 09:23:13 1:     (eval)                              called by fhem.pl (2403)
2017.04.20 09:23:13 1:     (eval)                              called by fhem.pl (2402)
2017.04.20 09:23:13 1:     main::CommandReload                 called by fhem.pl (1817)
2017.04.20 09:23:13 1:     main::LoadModule                    called by fhem.pl (1874)
2017.04.20 09:23:13 1:     main::CommandDefine                 called by fhem.pl (1149)
2017.04.20 09:23:13 1:     main::AnalyzeCommand                called by fhem.pl (1018)
2017.04.20 09:23:13 1:     main::AnalyzeCommandChain           called by fhem.pl (1284)
2017.04.20 09:23:13 1:     main::CommandInclude                called by fhem.pl (1149)
2017.04.20 09:23:13 1:     main::AnalyzeCommand                called by fhem.pl (1018)
2017.04.20 09:23:13 1:     main::AnalyzeCommandChain           called by fhem.pl (1284)
2017.04.20 09:23:13 1:     main::CommandInclude                called by fhem.pl (527)


Da ich mich in Perl nicht wirklich auskenne, hier die Frage, müssen keine Übergabeparameter definiert werden?

31: sub Log;
32: sub Log3;


Die vorherigen Meldungen:

Use of uninitialized value $val in pattern match (m//) at /opt/fhem//FHEM/33_readingsGroup.pm line 261.
Use of uninitialized value in pattern match (m//) at /opt/fhem//FHEM/33_readingsGroup.pm line 121.

kann ich aktuell nicht mehr feststellen - DANKE!

Viele Grüße,

Marcel
FHEM 5.9 - Intel NUC i3 mit Proxmox im Stretch Container
HomeMatic - VCCU mit 2 x HM-LAN-CFG
Module: SMA Peripheries - Sonos - IPCam(s) - Philips Hue - Sprinkler - TabletUI - DBlog -

justme1968

natürlich müssen da übergabe parameter hin. der checken dafür ist gestern hängen geblieben und ich habe es nicht bemerkt.

habe es eben nachgeholt. ab morgen im update

gruss
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

Xguide

Ah Ok,

kannst du mir erklären warum die Funktion dort überhaupt definiert werden muss? Die stand doch früher auch ohne die Definition zur Verfügung!?

Gruß Marcel
FHEM 5.9 - Intel NUC i3 mit Proxmox im Stretch Container
HomeMatic - VCCU mit 2 x HM-LAN-CFG
Module: SMA Peripheries - Sonos - IPCam(s) - Philips Hue - Sprinkler - TabletUI - DBlog -

justme1968

man muss nicht. es hat auch nichts weiter mit deinen meldungen zu tun.

ich teste nur gerade den perl syntax checker und der meckert sonst.
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

frankreed

Hallo,

kann mir jemand einen Tipp geben, wie die angehängte Darstellung erzeugt wird?
Mein VCONTROL-Modul liefert mir viele Werte, die ich gerne wie im Beispiel a) jeweils mit eigenem Icon und b) zweispaltig darstellen möchte.
Danke für die Hilfe.

Frank

Newbee

Aller Guten Dinge sind drei!  ;)

Fehlermeldung aus dem log, wenn ich FHEM neu starte!

2017.05.14 07:58:24 1: PERL WARNING: Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^batteryLevel@{ <-- HERE getDevice($DEVICE)}$/ at ./FHEM/33_readingsGroup.pm line 1381.
2017.05.14 07:58:24 1: PERL WARNING: Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^imposible@{ <-- HERE $DEVICE}$/ at ./FHEM/33_readingsGroup.pm line 1381.
2017.05.14 07:58:24 1: PERL WARNING: Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^state@{ <-- HERE getDevice($DEVICE)}$/ at ./FHEM/33_readingsGroup.pm line 1381.
2017.05.14 07:58:24 1: PERL WARNING: Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^impossible@{ <-- HERE $DEVICE}$/ at ./FHEM/33_readingsGroup.pm line 1381.
2017.05.14 07:58:24 1: PERL WARNING: Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^R-globalBtnLock@{ <-- HERE getDevice($DEVICE)}$/ at ./FHEM/33_readingsGroup.pm line 1381.


Zitat von: Newbee am 29 Dezember 2016, 08:44:00
Hallo,

haben folgende Readings Group. Ist ein Bsp. aus diesem Beitrag https://forum.fhem.de/index.php/topic,26479.msg202888.html#msg202888.
Leider werden aus für mich nicht verständlichen Gründen die pull-down (drop-down) Menüs nicht mehr angezeigt.

List auf die Readingsgroup:

Internals:
   CFGFN      /opt/fhem/FHEM/red.cfg
   DEF        <>,<Ist-,>,<Regler>,<Batterie>,<Tages->,<Werktag>,<>,<Wochenende>,<>,<Wochenplan>
<>,<Solltemperatur>,<Lock>,<Modus>,<Temperatur>,<start>,<ende>,<start>,<ende>,<schreiben>
.*_Clima:measured-temp,ValvePosition,batteryLevel@{getDevice($DEVICE)},imposible@{$DEVICE},<{getDayTemp($DEVICE)}>,<{getTime($DEVICE,"R_2_tempListMon","start")}>,<{getTime($DEVICE,"R_2_tempListMon","end")}>,<{getTime($DEVICE,"R_0_tempListSat","start")}>,<{getTime($DEVICE,"R_0_tempListSat","end")}>,state@{getDevice($DEVICE)},<br>,impossible@{$DEVICE},desired-temp,R-globalBtnLock@{getDevice($DEVICE)},imposible@{$DEVICE},controlMode,state@d_dayTemp,state@d_workdayStart,state@d_workdayEnd,state@d_saturdayStart,state@d_saturdayEnd,imposible@{$DEVICE},<%system_fhem_update>
   NAME       Thermostate
   NR         709
   NTFY_ORDER 50-Thermostate
   STATE      Initialized
   TYPE       readingsGroup
   mayBeVisible 1
   Content:
     BR_Thermostat_Clima 1
     DR_Thermostat_Clima 1
     FBR_Thermostat_Clima 1
     FBRn_Thermostat_Clima 1
     KIT_Thermostat_Clima 1
     LR_Thermostat_Clima 1
     MBR_Thermostat_Clima 1
     NBR_Thermostat_Clima 1
     RR_Thermostat_Clima 1
   Content2:
     BR_Thermostat 1
     BR_Thermostat_Clima 1
     DR_Thermostat 1
     DR_Thermostat_Clima 1
     FBR_Thermostat 1
     FBR_Thermostat_Clima 1
     FBRn_Thermostat_Clima 1
     KIT_Thermostat 1
     KIT_Thermostat_Clima 1
     LR_Thermostat 1
     LR_Thermostat_Clima 1
     MBR_Thermostat 1
     MBR_Thermostat_Clima 1
     NBR_Thermostat 1
     NBR_Thermostat_Clima 1
     OF_Thermostat 1
     RR_Thermostat 1
     RR_Thermostat_Clima 1
     d_dayTemp  1
     d_saturdayEnd 1
     d_saturdayStart 1
     d_workdayEnd 1
     d_workdayStart 1
   DEVICES:
     ARRAY(0x6fba0c8)
     ARRAY(0x67642d8)
     ARRAY(0x6763ba0)
     ARRAY(0x6e593f0)
     ARRAY(0x7039aa0)
     ARRAY(0x7021180)
     ARRAY(0x7023648)
     ARRAY(0x6fd9880)
     ARRAY(0x702a600)
     ARRAY(0x6869208)
     ARRAY(0x6722de0)
   DEVICES2:
     ARRAY(0x6fba0c8)
     ARRAY(0x67642d8)
     ARRAY(0x6763ba0)
     ARRAY(0x6e593f0)
     ARRAY(0x7039aa0)
     ARRAY(0x7021180)
     ARRAY(0x7023648)
     ARRAY(0x6fd9880)
     ARRAY(0x702a600)
     ARRAY(0x6869208)
     ARRAY(0x6722de0)
     ARRAY(0x6742d80)
     ARRAY(0x6fdc1a0)
     ARRAY(0x6e5e5c8)
     ARRAY(0x7025278)
     ARRAY(0x6ad3f68)
     ARRAY(0x6ad44f0)
     ARRAY(0x6761c58)
     ARRAY(0x6efc3d0)
     ARRAY(0x674ef78)
     ARRAY(0x674c5e0)
     ARRAY(0x6ece7b0)
     ARRAY(0x676c7a8)
     ARRAY(0x6ace660)
     ARRAY(0x6ad43a0)
     ARRAY(0x673d348)
     ARRAY(0x6841d30)
     ARRAY(0x6756ac0)
     ARRAY(0x701e3c0)
     ARRAY(0x675f008)
     ARRAY(0x7016560)
     ARRAY(0x675a728)
     ARRAY(0x7022ff0)
     ARRAY(0x6f754b0)
     ARRAY(0x6f00838)
     ARRAY(0x6f02990)
     ARRAY(0x6f5aef8)
     ARRAY(0x672fba0)
     ARRAY(0x6764590)
     ARRAY(0x674a828)
     ARRAY(0x6728300)
     ARRAY(0x6ececf0)
     ARRAY(0x6767040)
     ARRAY(0x673db10)
     ARRAY(0x6738b08)
     ARRAY(0x6755110)
     ARRAY(0x6763bb8)
     ARRAY(0x673fad8)
     ARRAY(0x6f599d0)
     ARRAY(0x6ec68f8)
     ARRAY(0x674be18)
     ARRAY(0x6e58d90)
     ARRAY(0x6764338)
     ARRAY(0x6e69ca0)
     ARRAY(0x6e5e268)
     ARRAY(0x6adc4a8)
     ARRAY(0x6ace558)
     ARRAY(0x6ad7030)
     ARRAY(0x6e2b0b8)
     ARRAY(0x6e5e5e0)
     ARRAY(0x6ace108)
   Fhem:
     lastDefChange 3
     last_update 1482922483.55619
   Helper:
     DEF
     commands   { 'controlMode' => 'trigger ntfy_toggleControlMode $DEVICE',  'R-globalBtnLock' => 'trigger ntfy_toggleBtnLock $DEVICE',  'state' => 'state:',  'Thermostate.system_fhem_update' => 'trigger ntfy_setTimeTable $DEVICE'}
     nameStyle  style="font-weight:bold"
     valueStyle { if($READING eq "measured-temp" && $VALUE >= 19){ 'style="color:green;font-weight:bold"' }elsif( $READING eq "measured-temp" && $VALUE < 19 ){ 'style="color:lightblue;font-weight:bold"' }elsif( $READING eq "measured-temp" && $VALUE > 23 ){ 'style="color:red;font-weight:bold"' }else{ 'style="color:gray;font-weight:bold"' }}
     Positions:
       BR_Thermostat.batteryLevel 3:3
       BR_Thermostat.state 3:9
       BR_Thermostat_Clima.ValvePosition 3:2
       BR_Thermostat_Clima.controlMode 4:2
       BR_Thermostat_Clima.desired-temp 4:1
       BR_Thermostat_Clima.measured-temp 3:1
       DR_Thermostat.batteryLevel 5:3
       DR_Thermostat.state 5:9
       DR_Thermostat_Clima.ValvePosition 5:2
       DR_Thermostat_Clima.controlMode 6:2
       DR_Thermostat_Clima.desired-temp 6:1
       DR_Thermostat_Clima.measured-temp 5:1
       FBR_Thermostat.batteryLevel 7:3
       FBR_Thermostat.state 7:9
       FBR_Thermostat_Clima.ValvePosition 7:2
       FBR_Thermostat_Clima.controlMode 8:2
       FBR_Thermostat_Clima.desired-temp 8:1
       FBR_Thermostat_Clima.measured-temp 7:1
       FBRn_Thermostat_Clima.ValvePosition 9:2
       FBRn_Thermostat_Clima.controlMode 10:2
       FBRn_Thermostat_Clima.desired-temp 10:1
       FBRn_Thermostat_Clima.measured-temp 9:1
       KIT_Thermostat.batteryLevel 11:3
       KIT_Thermostat.state 11:9
       KIT_Thermostat_Clima.ValvePosition 11:2
       KIT_Thermostat_Clima.controlMode 12:2
       KIT_Thermostat_Clima.desired-temp 12:1
       KIT_Thermostat_Clima.measured-temp 11:1
       LR_Thermostat.batteryLevel 13:3
       LR_Thermostat.state 13:9
       LR_Thermostat_Clima.ValvePosition 13:2
       LR_Thermostat_Clima.controlMode 14:2
       LR_Thermostat_Clima.desired-temp 14:1
       LR_Thermostat_Clima.measured-temp 13:1
       MBR_Thermostat.batteryLevel 15:3
       MBR_Thermostat.state 15:9
       MBR_Thermostat_Clima.ValvePosition 15:2
       MBR_Thermostat_Clima.controlMode 16:2
       MBR_Thermostat_Clima.desired-temp 16:1
       MBR_Thermostat_Clima.measured-temp 15:1
       NBR_Thermostat.batteryLevel 17:3
       NBR_Thermostat.state 17:9
       NBR_Thermostat_Clima.ValvePosition 17:2
       NBR_Thermostat_Clima.controlMode 18:2
       NBR_Thermostat_Clima.desired-temp 18:1
       NBR_Thermostat_Clima.measured-temp 17:1
       OF_Thermostat.batteryLevel 9:3
       OF_Thermostat.state 9:9
       RR_Thermostat.batteryLevel 19:3
       RR_Thermostat.state 19:9
       RR_Thermostat_Clima.ValvePosition 19:2
       RR_Thermostat_Clima.controlMode 20:2
       RR_Thermostat_Clima.desired-temp 20:1
       RR_Thermostat_Clima.measured-temp 19:1
     Valueformat:
       ValvePosition %0.1f %%
       desired-temp %0.1f &deg;C
       measured-temp %0.1f &deg;C
     Valueicon:
       R-globalBtnLock.off secur_open@red
       R-globalBtnLock.off  secur_open@red
       R-globalBtnLock.on secur_locked@green
       R-globalBtnLock.on  secur_locked@green
       R-globalBtnLock.set_off  secur_open@orange
       R-globalBtnLock.set_on  secur_locked@orange
       battery.low batterie@red
       battery.ok batterie@green
       controlMode.auto sani_heating_automatic@green
       controlMode.manual sani_heating_manual@red
       controlMode.set_auto sani_heating_automatic@orange
       controlMode.set_manual sani_heating_manual@orange
     Values:
       formated:
         undef
         ARRAY(0x67f21c0)
         ARRAY(0x6e6a150)
         ARRAY(0x67f3928)
         undef
         undef
         undef
         undef
         undef
         ARRAY(0x7029f88)
       orig:
         undef
         ARRAY(0x6ad6c70)
         ARRAY(0x675b2e0)
         ARRAY(0x6fd0080)
         undef
         undef
         undef
         undef
         undef
         ARRAY(0x67e32d0)
       prefixsuffix:
         undef
         ARRAY(0x6e77400)
         ARRAY(0x7029d90)
         ARRAY(0x6fcb240)
         undef
         undef
         undef
         undef
         undef
         ARRAY(0x6fdf6d8)
Attributes:
   commands   { 'controlMode' => 'trigger ntfy_toggleControlMode $DEVICE',  'R-globalBtnLock' => 'trigger ntfy_toggleBtnLock $DEVICE',  'state' => 'state:',  'Thermostate.system_fhem_update' => 'trigger ntfy_setTimeTable $DEVICE'}
   nameStyle  style="font-weight:bold"
   room       Heating
   sortDevices 1
   valueFormat { 'desired-temp' => "%0.1f &deg;C", 'measured-temp' => "%0.1f &deg;C", 'ValvePosition' => "%0.1f %%" }
   valueIcon  { 'controlMode.auto' => 'sani_heating_automatic@green','controlMode.set_auto' => 'sani_heating_automatic@orange','controlMode.manual' => 'sani_heating_manual@red','controlMode.set_manual' => 'sani_heating_manual@orange', 'battery.ok' => 'batterie@green', 'battery.low' => 'batterie@red', 'R-globalBtnLock.on' => 'secur_locked@green', 'R-globalBtnLock.on ' => 'secur_locked@green', 'R-globalBtnLock.set_on ' => 'secur_locked@orange', 'R-globalBtnLock.off' => 'secur_open@red', 'R-globalBtnLock.off ' => 'secur_open@red', 'R-globalBtnLock.set_off ' => 'secur_open@orange'}
   valueStyle { if($READING eq "measured-temp" && $VALUE >= 19){ 'style="color:green;font-weight:bold"' }elsif( $READING eq "measured-temp" && $VALUE < 19 ){ 'style="color:light blue;font-weight:bold"' }elsif( $READING eq "measured-temp" && $VALUE > 23 ){ 'style="color:red;font-weight:bold"' }else{ 'style="color:gray;font-weight:bold"' }}


Die Werte für die Menüs sind in dummys abgelegt.

define d_dayTemp dummy
attr d_dayTemp room Unsorted
attr d_dayTemp setList state:5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,10.0,10.5,11.0,11.5,12.0,12.5,13.0,13.5,14.0,14.5,15.0,15.5,16.0,16.5,17.0,17.5,18.0,18.5,19.0,19.5,20.0,20.5,21.0,21.5,22.0,22.5,23.0,23.5,24.0,24.5,25.0,25.5,26.0,26.5,27.0,27.5,28.0,28.5,29.0,29.5,30.0
attr d_dayTemp webCmd state

define d_workdayStart dummy
attr d_workdayStart room Unsorted
attr d_workdayStart setList state:00:00,00:15,00:30,00:45,01:00,01:15,01:30,01:45,02:00,02:15,02:30,02:45,03:00,03:15,03:30,03:45,04:00,04:15,04:30,04:45,05:00,05:15,05:30,05:45,06:00,06:15,06:30,06:45,07:00,07:15,07:30,07:45,08:00,08:15,08:30,08:45,09:00,09:15,09:30,09:45,10:00,10:15,10:30,10:45,11:00,11:15,11:30,11:45,12:00,12:15,12:30,12:45,13:00,13:15,13:30,13:45,14:00,14:15,14:30,14:45,15:00,15:15,15:30,15:45,16:00,16:15,16:30,16:45,17:00,17:15,17:30,17:45,18:00,18:15,18:30,18:45,19:00,19:15,19:30,19:45,20:00,20:15,20:30,20:45,21:00,21:15,21:30,21:45,22:00,22:15,22:30,22:45,23:00,23:15,23:30,23:45,24:00,
attr d_workdayStart webCmd state

define d_workdayEnd dummy
attr d_workdayEnd room Unsorted
attr d_workdayEnd setList state:00:00,00:15,00:30,00:45,01:00,01:15,01:30,01:45,02:00,02:15,02:30,02:45,03:00,03:15,03:30,03:45,04:00,04:15,04:30,04:45,05:00,05:15,05:30,05:45,06:00,06:15,06:30,06:45,07:00,07:15,07:30,07:45,08:00,08:15,08:30,08:45,09:00,09:15,09:30,09:45,10:00,10:15,10:30,10:45,11:00,11:15,11:30,11:45,12:00,12:15,12:30,12:45,13:00,13:15,13:30,13:45,14:00,14:15,14:30,14:45,15:00,15:15,15:30,15:45,16:00,16:15,16:30,16:45,17:00,17:15,17:30,17:45,18:00,18:15,18:30,18:45,19:00,19:15,19:30,19:45,20:00,20:15,20:30,20:45,21:00,21:15,21:30,21:45,22:00,22:15,22:30,22:45,23:00,23:15,23:30,23:45,24:00,
attr d_workdayEnd webCmd state

define d_saturdayStart dummy
attr d_saturdayStart room Unsorted
attr d_saturdayStart setList state:00:00,00:15,00:30,00:45,01:00,01:15,01:30,01:45,02:00,02:15,02:30,02:45,03:00,03:15,03:30,03:45,04:00,04:15,04:30,04:45,05:00,05:15,05:30,05:45,06:00,06:15,06:30,06:45,07:00,07:15,07:30,07:45,08:00,08:15,08:30,08:45,09:00,09:15,09:30,09:45,10:00,10:15,10:30,10:45,11:00,11:15,11:30,11:45,12:00,12:15,12:30,12:45,13:00,13:15,13:30,13:45,14:00,14:15,14:30,14:45,15:00,15:15,15:30,15:45,16:00,16:15,16:30,16:45,17:00,17:15,17:30,17:45,18:00,18:15,18:30,18:45,19:00,19:15,19:30,19:45,20:00,20:15,20:30,20:45,21:00,21:15,21:30,21:45,22:00,22:15,22:30,22:45,23:00,23:15,23:30,23:45,24:00,
attr d_saturdayStart webCmd state

define d_saturdayEnd dummy
attr d_saturdayEnd room Unsorted
attr d_saturdayEnd setList state:00:00,00:15,00:30,00:45,01:00,01:15,01:30,01:45,02:00,02:15,02:30,02:45,03:00,03:15,03:30,03:45,04:00,04:15,04:30,04:45,05:00,05:15,05:30,05:45,06:00,06:15,06:30,06:45,07:00,07:15,07:30,07:45,08:00,08:15,08:30,08:45,09:00,09:15,09:30,09:45,10:00,10:15,10:30,10:45,11:00,11:15,11:30,11:45,12:00,12:15,12:30,12:45,13:00,13:15,13:30,13:45,14:00,14:15,14:30,14:45,15:00,15:15,15:30,15:45,16:00,16:15,16:30,16:45,17:00,17:15,17:30,17:45,18:00,18:15,18:30,18:45,19:00,19:15,19:30,19:45,20:00,20:15,20:30,20:45,21:00,21:15,21:30,21:45,22:00,22:15,22:30,22:45,23:00,23:15,23:30,23:45,24:00,
attr d_saturdayEnd webCmd state

define d_sundayStart dummy
attr d_sundayStart room Unsorted
attr d_sundayStart setList state:00:00,00:15,00:30,00:45,01:00,01:15,01:30,01:45,02:00,02:15,02:30,02:45,03:00,03:15,03:30,03:45,04:00,04:15,04:30,04:45,05:00,05:15,05:30,05:45,06:00,06:15,06:30,06:45,07:00,07:15,07:30,07:45,08:00,08:15,08:30,08:45,09:00,09:15,09:30,09:45,10:00,10:15,10:30,10:45,11:00,11:15,11:30,11:45,12:00,12:15,12:30,12:45,13:00,13:15,13:30,13:45,14:00,14:15,14:30,14:45,15:00,15:15,15:30,15:45,16:00,16:15,16:30,16:45,17:00,17:15,17:30,17:45,18:00,18:15,18:30,18:45,19:00,19:15,19:30,19:45,20:00,20:15,20:30,20:45,21:00,21:15,21:30,21:45,22:00,22:15,22:30,22:45,23:00,23:15,23:30,23:45,24:00,
attr d_sundayStart webCmd state

define d_sundayEnd dummy
attr d_sundayEnd room Unsorted
attr d_sundayEnd setList state:00:00,00:15,00:30,00:45,01:00,01:15,01:30,01:45,02:00,02:15,02:30,02:45,03:00,03:15,03:30,03:45,04:00,04:15,04:30,04:45,05:00,05:15,05:30,05:45,06:00,06:15,06:30,06:45,07:00,07:15,07:30,07:45,08:00,08:15,08:30,08:45,09:00,09:15,09:30,09:45,10:00,10:15,10:30,10:45,11:00,11:15,11:30,11:45,12:00,12:15,12:30,12:45,13:00,13:15,13:30,13:45,14:00,14:15,14:30,14:45,15:00,15:15,15:30,15:45,16:00,16:15,16:30,16:45,17:00,17:15,17:30,17:45,18:00,18:15,18:30,18:45,19:00,19:15,19:30,19:45,20:00,20:15,20:30,20:45,21:00,21:15,21:30,21:45,22:00,22:15,22:30,22:45,23:00,23:15,23:30,23:45,24:00,
attr d_sundayEnd webCmd state

define ntfy_toggleControlMode notify ntfy_toggleControlMode {toggleMode($EVENT)}

define ntfy_toggleBtnLock notify ntfy_toggleBtnLock {toggleLock($EVENT)}

define ntfy_setTimeTable notify ntfy_setTimeTable {setTimeTable($EVENT)}


Ergänzend noch der MyUtils Code.

sub getDevice($){
my $device = shift;
return InternalVal($device,"device","error");
}

sub toggleMode($){
my $device = shift;
my $Mode = ReadingsVal($device,"controlMode","error");

if ($Mode eq "manual")
  {fhem("set $device controlMode auto")}
elsif ($Mode eq "auto")
  {fhem("set $device controlMode manual")}
elsif ($Mode eq "set_manual")
  {fhem("set $device controlMode auto")}
elsif ($Mode eq "set_auto")
  {fhem("set $device controlMode manual")};
}

sub toggleLock($){
my $device = shift;
my $lockState = ReadingsVal($device,"R-globalBtnLock","error");

if ($lockState eq "on "){
  {fhem("set $device regSet globalBtnLock off")}
  {fhem ("set $device getConfig")}}
elsif ($lockState eq "off "){
  {fhem("set $device regSet globalBtnLock on")}
  {fhem ("set $device getConfig")}}
elsif ($lockState eq "on"){
  {fhem("set $device regSet globalBtnLock off")}
  {fhem ("set $device getConfig")}}
elsif ($lockState eq "off"){
  {fhem("set $device regSet globalBtnLock on")}
  {fhem ("set $device getConfig")}}
else
  {return $lockState.$device};
}

sub getDayTemp($){
my $device = shift;
my $timeTable = ReadingsVal($device,"R_2_tempListMon","error Reading");
my $dayTemp = substr $timeTable, 17, 5;

return ($dayTemp." °C");
}

sub getTime($$$){
my $device = shift;
my $reading = shift;
my $status = shift;
my $timeTable = ReadingsVal($device,$reading,"error Reading");
my $time = "error Return";

if ($status eq "start")
  {$time = substr $timeTable, 0, 6}
elsif ($status eq "end")
  {$time = substr $timeTable, 11, 6}

return $time;
}
sub setTimeTable($){
my $device = shift;
my $dayTemp = ReadingsVal("d_dayTemp","state","dt error");
my $nightTemp = "15.0";
my $startWorkday = ReadingsVal("d_workdayStart","state","eds error");
my $endWorkday = ReadingsVal("d_workdayEnd","state","wde error");
my $startSaturday = ReadingsVal("d_saturdayStart","state","sds error");
my $endSaturday = ReadingsVal("d_saturdayEnd","state","sde error");
my $startSunday = ReadingsVal("d_sundayStart","state","snds error");
my $endSunday = ReadingsVal("d_sundayEnd","state","snde error");

{ fhem ("set $device tempListMon prep $startWorkday $nightTemp $endWorkday $dayTemp 24:00 $nightTemp")};
{ fhem ("set $device tempListTue prep $startWorkday $nightTemp $endWorkday $dayTemp 24:00 $nightTemp")};
{ fhem ("set $device tempListWed prep $startWorkday $nightTemp $endWorkday $dayTemp 24:00 $nightTemp")};
{ fhem ("set $device tempListThu prep $startWorkday $nightTemp $endWorkday $dayTemp 24:00 $nightTemp")};
{ fhem ("set $device tempListFri prep $startWorkday $nightTemp $endWorkday $dayTemp 24:00 $nightTemp")};
{ fhem ("set $device tempListSat prep $startSaturday $nightTemp $endSaturday $dayTemp 24:00 $nightTemp")};
{ fhem ("set $device tempListSun exec $startSunday $nightTemp $endSunday $dayTemp 24:00 $nightTemp")};
}


Folgende Fehlermeldung bekomme ich im Log

siehe oben....

Wer hat bitte eine Tipp für mich.

Danke vorab

Gruß
Intel-NUC mit ubuntu server 20.04; FHEM 6.0
HM, Dect, Netatmo, Hue

grappa24

ich hab mir eine ReadingsGroup gebaut mit Einträgen von AgroWeather. (Wie) kann man denn verhindern, dass die manchmal auftretenden langen Texte den Platz auf meinem floorplan "sprengen"?
FHEM 6.1, 2 x RasPi 3B+, Debian Buster; KNX, FS20, HM, HUE, Tradfri, Shellies, KLF200
Rollo-/Lichtsteuerung/-szenarien, T-Sensoren, Fensterkontakte, Heizungssteuerung, HEOS, Sprachsteuerung mit Alexa-FHEM, Netatmo, Nuki, ...

Elektrolurch

Du könntest z.B. über das Attribut valueFormat eine Längenbegrenzung des Textes berechnen lassen.

Elektrolurch
configDB und Windows befreite Zone!

Elektrolurch

Hallo Andre,

ich bin jetzt über einen kleinen Schönheitsfehler gestolpert:

Wird das Attribut valueIcon für ein reading gesetzt z.B.
valueIcon {'Play' => '{MakeIconwithLabel("rc_PLAY.svg",$VALUE,"abspielen")}',...
und dann $VALUE z.B. im Attribut commands verwendet, dann ist in $VALUE nicht mehr der Wert des readings vorhanden, sondern der vom valueIcon.
Bei valueFormat will man ja vermutlich den modifizierten Wert vom reading weiter verwenden, bei valueIcon macht das aber keinen Sinn.
Ich habe mir den html-Quelltext der Seite angesehen, und man sieht im command-Bereich für das anklickbare Icon den Text, den valueIcon errechnet hat.

Gruß

Elektrolurch
h

configDB und Windows befreite Zone!

moonsorrox

#1692
ich habe eine RG erstellt und möchte gern zugehörige Icons positionieren. Dies Wettericons sollen zentriert werden in der jeweiligen Spalte
Es gelingt mir leider nicht das hinzubekommen. Ich dachte das ich es mit "cellStyle" hinbekomme dem ist nicht so. Die Icons befinden sich in "r:2" - hier habe ich schon mit "center" einige Versuche aber ich bekomme es nicht hin

Ich hänge mal das list von der RG ran, evtl. weiß es jemand und kann mir das sagen.  ;)
Internals:
   CFGFN      ./FHEM/Wetter.cfg
   DEF        WUweather:<%weather_cloudy@AntiqueWhite>,fc0_title,fc0_title_night,fc1_title,fc1_title_night,fc2_title,fc2_title_night,fc3_title,fc3_title_night
WUweather:<>,fc0_icon,fc0_icon_night,fc1_icon,fc1_icon_night,fc2_icon,fc2_icon_night,fc3_icon,fc3_icon_night
WUweather:<>,fc0_condition,fc1_condition,fc2_condition,fc3_condition
WUweather:<Vorhersage>,fc0_text,fc0_text_night,fc1_text,fc1_text_night,fc2_text,fc2_text_night,fc3_text,fc3_text_night
WUweather:<Regenwahrscheinlichkeit/-menge>,fc0_pop,fc0_pop_night,fc1_pop,fc1_pop_night,fc2_pop,fc2_pop_night,fc3_pop,fc3_pop_night
WUweather:<Schnee>,fc0_snow_day,fc0_snow_night,fc1_snow_day,fc1_snow_night,fc2_snow_day,fc2_snow_night,fc3_snow_day,fc3_snow_night
WUweather:<Temperatur&nbsp;min|max>,fc0_low_c,fc1_low_c,fc2_low_c,fc3_low_c
WUweather:<rel.&nbsp;Luftfeuchtigkeit>,fc0_humidity,fc1_humidity,fc2_humidity,fc3_humidity
WUweather:<Wind&nbsp;(Böen)>,fc0_wind_speed,fc1_wind_speed,fc2_wind_speed,fc3_wind_speed
   NAME       rg_WUweather
   NR         1771
   NTFY_ORDER 50-rg_WUweather
   STATE      Initialized
   TYPE       readingsGroup
   mayBeVisible 1
   CONTENT:
     WUweather  1
   CONTENT2:
   DEVICES:
     ARRAY(0x89d72a0)
     ARRAY(0x8daac00)
     ARRAY(0x98babe8)
     ARRAY(0x8d8ee28)
     ARRAY(0x89fea68)
     ARRAY(0x89fe618)
     ARRAY(0x9024fc8)
     ARRAY(0x8dc5d18)
     ARRAY(0x8230d40)
   fhem:
     lastDefChange 49
     last_update 1501686583.31866
   helper:
     DEF
     valueFormat {
fc0_low_c => "{'$VALUE °C | ' . ReadingsVal('WUweather','fc0_high_c',0) .  ' °C'}" , fc1_low_c => "{'$VALUE °C | ' . ReadingsVal('WUweather','fc1_high_c',0) .  ' °C'}" , fc2_low_c => "{'$VALUE °C | ' . ReadingsVal('WUweather','fc2_high_c',0) .  ' °C'}" , fc3_low_c => "{'$VALUE °C | ' . ReadingsVal('WUweather','fc3_high_c',0) .  ' °C'}" ,
fc0_humidity => '%.0f %%' , fc1_humidity => '%.0f %%' , fc2_humidity => '%.0f %%' , fc3_humidity => '%.0f %%' ,
fc0_wind_speed => "{'$VALUE km/h (' . ReadingsVal('WUweather','fc0_wind_speed_max','') . ' km/h) ' }" , fc1_wind_speed => "{'$VALUE km/h (' . ReadingsVal('WUweather','fc1_wind_speed_max','') . ' km/h) ' }" , fc2_wind_speed => "{'$VALUE km/h (' . ReadingsVal('WUweather','fc2_wind_speed_max','') . ' km/h) ' }" , fc3_wind_speed => "{'$VALUE km/h (' . ReadingsVal('WUweather','fc3_wind_speed_max','') . ' km/h) ' }" ,
fc0_pop => "{'$VALUE % | ' . ReadingsVal('WUweather','fc0_rain_day','') . ' mm'}" , fc0_pop_night => "{'$VALUE % | ' . ReadingsVal('WUweather','fc0_rain_night','') . ' mm'}" , fc1_pop => "{'$VALUE % | ' . ReadingsVal('WUweather','fc1_rain_day','') . ' mm'}" , fc1_pop_night => "{'$VALUE % | ' . ReadingsVal('WUweather','fc1_rain_night','') . ' mm'}"  , fc2_pop => "{'$VALUE % | ' . ReadingsVal('WUweather','fc2_rain_day','') . ' mm'}" , fc2_pop_night => "{'$VALUE % | ' . ReadingsVal('WUweather','fc2_rain_night','') . ' mm'}"  , fc3_pop => "{'$VALUE % | ' . ReadingsVal('WUweather','fc3_rain_day','') . ' mm'}" , fc3_pop_night => "{'$VALUE % | ' . ReadingsVal('WUweather','fc3_rain_night','') . ' mm'}" ,
fc0_snow_day => '%.0f mm' , fc0_snow_night => '%.0f mm' , fc1_snow_day => '%.0f mm' , fc1_snow_night => '%.0f mm'  , fc2_snow_day => '%.0f mm' , fc2_snow_night => '%.0f mm'  , fc3_snow_day => '%.0f mm' , fc3_snow_night => '%.0f mm' ,
}
     valueStyle {return 'style="text-align:center;font-weight:normal"' if($READING =~ m/title/); return 'style="text-align:center"'}
     cellStyle:
       c:1        style="font-weight:normal;font-size:14px;text-align:left;padding-left:0pt;color:LightSteelBlue;"
       r:1        style="font-weight:normal;font-size:14px;text-align:center;color:LightSteelBlue;"
       r:2        style="font-weight:normal;font-size:14px;text-align:center;padding-left:0pt;color:LightSteelBlue;"
       r:3        style="font-weight:normal;font-size:14px;text-align:center;color:RoyalBlue;"
       r:4        style="font-weight:italic;font-size:14px;text-align:center;color:AntiqueWhite;"
       r:5        style="font-weight:normal;font-size:14px;text-align:left;padding-left:0pt;color:RoyalBlue;"
     positions:
       WUweather.fc0_condition 3:2
       WUweather.fc0_humidity 8:2
       WUweather.fc0_icon 2:2
       WUweather.fc0_icon_night 2:3
       WUweather.fc0_low_c 7:2
       WUweather.fc0_pop 5:2
       WUweather.fc0_pop_night 5:3
       WUweather.fc0_snow_day 6:2
       WUweather.fc0_snow_night 6:3
       WUweather.fc0_text 4:2
       WUweather.fc0_text_night 4:3
       WUweather.fc0_title 1:2
       WUweather.fc0_title_night 1:3
       WUweather.fc0_wind_speed 9:2
       WUweather.fc1_condition 3:3
       WUweather.fc1_humidity 8:3
       WUweather.fc1_icon 2:4
       WUweather.fc1_icon_night 2:5
       WUweather.fc1_low_c 7:3
       WUweather.fc1_pop 5:4
       WUweather.fc1_pop_night 5:5
       WUweather.fc1_snow_day 6:4
       WUweather.fc1_snow_night 6:5
       WUweather.fc1_text 4:4
       WUweather.fc1_text_night 4:5
       WUweather.fc1_title 1:4
       WUweather.fc1_title_night 1:5
       WUweather.fc1_wind_speed 9:3
       WUweather.fc2_condition 3:4
       WUweather.fc2_humidity 8:4
       WUweather.fc2_icon 2:6
       WUweather.fc2_icon_night 2:7
       WUweather.fc2_low_c 7:4
       WUweather.fc2_pop 5:6
       WUweather.fc2_pop_night 5:7
       WUweather.fc2_snow_day 6:6
       WUweather.fc2_snow_night 6:7
       WUweather.fc2_text 4:6
       WUweather.fc2_text_night 4:7
       WUweather.fc2_title 1:6
       WUweather.fc2_title_night 1:7
       WUweather.fc2_wind_speed 9:4
       WUweather.fc3_condition 3:5
       WUweather.fc3_humidity 8:5
       WUweather.fc3_icon 2:8
       WUweather.fc3_icon_night 2:9
       WUweather.fc3_low_c 7:5
       WUweather.fc3_pop 5:8
       WUweather.fc3_pop_night 5:9
       WUweather.fc3_snow_day 6:8
       WUweather.fc3_snow_night 6:9
       WUweather.fc3_text 4:8
       WUweather.fc3_text_night 4:9
       WUweather.fc3_title 1:8
       WUweather.fc3_title_night 1:9
       WUweather.fc3_wind_speed 9:5
     valueColumns:
       fc0_condition colspan="2"
       fc0_humidity colspan="2"
       fc0_low_c  colspan="2"
       fc0_wind_speed colspan="2"
       fc1_condition colspan="2"
       fc1_humidity colspan="2"
       fc1_low_c  colspan="2"
       fc1_wind_speed colspan="2"
       fc2_condition colspan="2"
       fc2_humidity colspan="2"
       fc2_low_c  colspan="2"
       fc2_wind_speed colspan="2"
       fc3_condition colspan="2"
       fc3_humidity colspan="2"
       fc3_low_c  colspan="2"
       fc3_wind_speed colspan="2"
     valueIcon:
       fc0_icon   wunderground/black/svg/%VALUE
       fc0_icon_night wunderground/black/svg/%VALUE
       fc1_icon   wunderground/black/svg/%VALUE
       fc1_icon_night wunderground/black/svg/%VALUE
       fc2_icon   wunderground/black/svg/%VALUE
       fc2_icon_night wunderground/black/svg/%VALUE
       fc3_icon   wunderground/black/svg/%VALUE
       fc3_icon_night wunderground/black/svg/%VALUE
     values:
       formated:
         undef
         undef
         ARRAY(0x8d4b278)
         ARRAY(0x8c0f7f8)
         ARRAY(0x949f040)
         ARRAY(0x91bd680)
         ARRAY(0x8d7e3d8)
         ARRAY(0x8dc8450)
         ARRAY(0x98baac8)
         ARRAY(0x8958258)
       orig:
         undef
         undef
         ARRAY(0x9b45058)
         ARRAY(0x9165928)
         ARRAY(0x90276e8)
         ARRAY(0x9119790)
         ARRAY(0x8da1580)
         ARRAY(0x8bc02d8)
         ARRAY(0x8d71408)
         ARRAY(0x8e820d8)
       prefixsuffix:
         undef
         undef
         ARRAY(0x8db2978)
         ARRAY(0x8da55c8)
         ARRAY(0x895fe08)
         ARRAY(0x89d6b80)
         ARRAY(0x8a72e80)
         ARRAY(0x8d74718)
         ARRAY(0x8f38208)
         ARRAY(0x8d54c98)
Attributes:
   alias      4 - Tages Vorschau
   cellStyle  { "c:1"=>'style="font-weight:normal;font-size:14px;text-align:left;padding-left:0pt;color:LightSteelBlue;"', "r:1"=>'style="font-weight:normal;font-size:14px;text-align:center;color:LightSteelBlue;"', "r:2"=>'style="font-weight:normal;font-size:14px;text-align:center;padding-left:0pt;color:LightSteelBlue;"', "r:3"=>'style="font-weight:normal;font-size:14px;text-align:center;color:RoyalBlue;"', "r:4"=>'style="font-weight:italic;font-size:14px;text-align:center;color:AntiqueWhite;"', "r:5"=>'style="font-weight:normal;font-size:14px;text-align:left;padding-left:0pt;color:RoyalBlue;"'}
   group      Resse Wetter
   nonames    1
   nostate    1
   room       Wettervorhersage
   sortby     51
   style      style="border:0px;background:none;box-shadow:none"
   valueColumns { 'fc0_condition' => 'colspan="2"', 'fc1_condition' => 'colspan="2"', 'fc2_condition' => 'colspan="2"', 'fc3_condition' => 'colspan="2"', 'fc0_low_c' => 'colspan="2"', 'fc1_low_c' => 'colspan="2"', 'fc2_low_c' => 'colspan="2"', 'fc3_low_c' => 'colspan="2"', 'fc0_humidity' => 'colspan="2"', 'fc1_humidity' => 'colspan="2"', 'fc2_humidity' => 'colspan="2"', 'fc3_humidity' => 'colspan="2"', 'fc0_wind_speed' => 'colspan="2"', 'fc1_wind_speed' => 'colspan="2"', 'fc2_wind_speed' => 'colspan="2"', 'fc3_wind_speed' => 'colspan="2"' }
   valueFormat {
fc0_low_c => "{'$VALUE °C | ' . ReadingsVal('WUweather','fc0_high_c',0) .  ' °C'}" , fc1_low_c => "{'$VALUE °C | ' . ReadingsVal('WUweather','fc1_high_c',0) .  ' °C'}" , fc2_low_c => "{'$VALUE °C | ' . ReadingsVal('WUweather','fc2_high_c',0) .  ' °C'}" , fc3_low_c => "{'$VALUE °C | ' . ReadingsVal('WUweather','fc3_high_c',0) .  ' °C'}" ,
fc0_humidity => '%.0f %%' , fc1_humidity => '%.0f %%' , fc2_humidity => '%.0f %%' , fc3_humidity => '%.0f %%' ,
fc0_wind_speed => "{'$VALUE km/h (' . ReadingsVal('WUweather','fc0_wind_speed_max','') . ' km/h) ' }" , fc1_wind_speed => "{'$VALUE km/h (' . ReadingsVal('WUweather','fc1_wind_speed_max','') . ' km/h) ' }" , fc2_wind_speed => "{'$VALUE km/h (' . ReadingsVal('WUweather','fc2_wind_speed_max','') . ' km/h) ' }" , fc3_wind_speed => "{'$VALUE km/h (' . ReadingsVal('WUweather','fc3_wind_speed_max','') . ' km/h) ' }" ,
fc0_pop => "{'$VALUE % | ' . ReadingsVal('WUweather','fc0_rain_day','') . ' mm'}" , fc0_pop_night => "{'$VALUE % | ' . ReadingsVal('WUweather','fc0_rain_night','') . ' mm'}" , fc1_pop => "{'$VALUE % | ' . ReadingsVal('WUweather','fc1_rain_day','') . ' mm'}" , fc1_pop_night => "{'$VALUE % | ' . ReadingsVal('WUweather','fc1_rain_night','') . ' mm'}"  , fc2_pop => "{'$VALUE % | ' . ReadingsVal('WUweather','fc2_rain_day','') . ' mm'}" , fc2_pop_night => "{'$VALUE % | ' . ReadingsVal('WUweather','fc2_rain_night','') . ' mm'}"  , fc3_pop => "{'$VALUE % | ' . ReadingsVal('WUweather','fc3_rain_day','') . ' mm'}" , fc3_pop_night => "{'$VALUE % | ' . ReadingsVal('WUweather','fc3_rain_night','') . ' mm'}" ,
fc0_snow_day => '%.0f mm' , fc0_snow_night => '%.0f mm' , fc1_snow_day => '%.0f mm' , fc1_snow_night => '%.0f mm'  , fc2_snow_day => '%.0f mm' , fc2_snow_night => '%.0f mm'  , fc3_snow_day => '%.0f mm' , fc3_snow_night => '%.0f mm' ,
}
   valueIcon  { 'fc0_icon' => 'wunderground/black/svg/%VALUE' , 'fc1_icon' => 'wunderground/black/svg/%VALUE' , 'fc2_icon' => 'wunderground/black/svg/%VALUE' , 'fc3_icon' => 'wunderground/black/svg/%VALUE' , 'fc0_icon_night' => 'wunderground/black/svg/%VALUE' , 'fc1_icon_night' => 'wunderground/black/svg/%VALUE' , 'fc2_icon_night' => 'wunderground/black/svg/%VALUE' , 'fc3_icon_night' => 'wunderground/black/svg/%VALUE' }
   valueStyle {return 'style="text-align:center;font-weight:normal"' if($READING =~ m/title/); return 'style="text-align:center"'
Intel-NUC i5: FHEM-Server 6.1 :: Perl v5.18.2

Homematic: HM-USB-CFG2,HM-CFG-LAN Adapter, HM-LC-BL1-FM, HM-LC-Sw1PBU-FM, HM-LC-Sw1-PI-2, HM-WDS10-TH-O, HM-CC-TC, HM-LC-SW2-FM

Elektrolurch

Hallo,

da sind wir ja schon zwei im Bunde.

Zitat:
       r:1        style="font-weight:normal;font-size:14px;text-align:center;color:LightSteelBlue;"
       r:2        style="font-weight:normal;font-size:14px;text-align:center;padding-left:0pt;color:LightSteelBlue;"
       r:3        style="font-weight:normal;font-size:14px;text-align:center;color:RoyalBlue;"
       r:4        style="font-weight:italic;font-size:14px;text-align:center;color:AntiqueWhite;"
       r:5        style="font-weight:normal;font-size:14px;text-align:left;padding-left:0pt;color:RoyalBlue;"

Das sind alles nur style - Angaben für den Text. Für die Zelle gibt es:
vertical-align:center; horizontal-align:center;

Aber bei mir klappt es trotzdem nicht.
Wenn man sich den html - Code ansieht für eine Zelle:

<td><div style=... Die angaben von cellStyle> ...Icon und Text </div></td>

Ich bin mir nicht sicher, ob die styles für die Zellausrichtung nicht schon im <td> - Teil stehen müssten, dafür bin ich zu wenig vertraut mit dem htmp / css - Kram.

Was ich noch probiert habe, ist die cellStyle - Definitionen in eine eigene css - Datei zu legen, wäre nämlich eleganter:

attr WEBphone CssFiles pgm2/darkiphone.css

und dort steht dann bspw:

/* Datei darkiphone.css */
#ButtonIcon {vertical-align:center; horizontal-align:center;
text-align: center; 
     font-size:10px;
font-color:#ffffff;
}


Das Attribut für eine Zelle in der rg sollte dann so lauten:

attr rg cellStyle {'r:1,c:2' => 'id="ButtonIcon"'}

Klappt aber nicht. Vielleicht liest hier ein css - Experte mit und kann da helfen.

Elektrolurch
configDB und Windows befreite Zone!

moonsorrox

Zitat von: Elektrolurch am 03 August 2017, 10:24:17
Das sind alles nur style - Angaben für den Text. Für die Zelle gibt es:
vertical-align:center; horizontal-align:center;

Ja, dass ist mir schon klar... habe es damit ja auch probiert und so wie du es sagst es funktionierte bei mir auch nicht, deshalb habe ich es gar nicht erst erwähnt  ;)

Na mal schauen ob jemand das hinbekommt...!
Intel-NUC i5: FHEM-Server 6.1 :: Perl v5.18.2

Homematic: HM-USB-CFG2,HM-CFG-LAN Adapter, HM-LC-BL1-FM, HM-LC-Sw1PBU-FM, HM-LC-Sw1-PI-2, HM-WDS10-TH-O, HM-CC-TC, HM-LC-SW2-FM