label aktualisiert sich nicht

Begonnen von TomLee, 25 Mai 2020, 22:40:43

Vorheriges Thema - Nächstes Thema

TomLee

Hallo,

kann mir wer sagen warum sich hier das label nicht alleine aktualisiert und immer eine manuelle Aktualisierung vom Fully-Browser nötig ist ?


<div data-type="popup" data-height="200px" data-width="250px">
   <div data-type="link" data-color="white">
            <div data-type="label"
    data-part="(.*)_.*"
data-device="Google_Abfallkalender"
data-get="nextWaste"
class="top-narrow">
   </div>


in

<header>Müllabfuhr</header>
<div class="vbox">


<div class="bigger bottom-narrow"
            data-device="Google_Abfallkalender"
data-type="symbol"
data-get="nextWaste"
data-get-warn=".*(\d+).*"
data-states='["R.*_([0|1])","B.*_([0|1])","H.*_([0|1])","S.*_([0|1])","R.*_.*","B.*_.*","H.*_.*","S.*_.*"]'
data-colors='["#87837D","#783C00","green","red","#87837D","#783C00","green","red"]'
data-icons='["fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn","fa-trash-o warn","fa-trash-o warn","fa-trash-o warn"]'>
</div>

  <div data-type="popup" data-height="200px" data-width="250px">
   <div data-type="link" data-color="white">
            <div data-type="label"
    data-part="(.*)_.*"
data-device="Google_Abfallkalender"
data-get="nextWaste"
class="top-narrow">
   </div>
   
   
<div class="dialog">
<header>Leerungen</header>

        <div class="top-space inline">
<div class="bold top-narrow">Restabfall/Wertstoffe</div>
</div>
<div class="top-space inline">
<div data-type="label" data-device="Google_Abfallkalender" data-get="L_Restabfall/Wertstoffe" class="hbox"></div>
</div>
<div class="newline"></div>
<div class="top-space inline">
<div class="bold top-narrow">Bioabfall</div>
</div>
<div class="top-space inline">
<div data-type="label" data-device="Google_Abfallkalender" data-get="L_Bioabfall" class="top-narrow"></div>
</div>
<div class="newline"></div>
<div class="top-space inline">
<div data-type="push"
data-device="doif_Muell_Count"
data-set-on="cmd_2"
data-set-off="cmd_2"
data-on-color="white"
data-on-background-color="green"
data-icon="fa-chevron-down">
</div>
</div>
<div class="top-space inline">
<div data-type="push"
data-device="doif_Muell_Count"
data-set-on="cmd_1"
data-set-off="cmd_1"
data-on-color="white"
data-on-background-color="green"
data-icon="fa-chevron-up">
</div>
</div>

        </div>
</div>
</div>


Ohne link und popup klappt das ohne Probleme

<header>Müllabfuhr</header>
        <div class="vbox">
<div class="bigger bottom-narrow"
            data-device="Google_Abfallkalender"
data-type="symbol"
data-get="nextWaste"
data-get-warn=".*(\d+).*"
data-states='["R.*_([0|1])","B.*_([0|1])","H.*_([0|1])","S.*_([0|1])","R.*_.*","B.*_.*","H.*_.*","S.*_.*"]'
data-colors='["#87837D","#783C00","green","red","#87837D","#783C00","green","red"]'
data-icons='["fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn","fa-trash-o warn","fa-trash-o warn","fa-trash-o warn"]'>
        </div>
<div data-type="label"
    data-part="(.*)_.*"
data-device="Google_Abfallkalender"
data-get="nextWaste"
class="top-narrow">
</div>
</div>


Gruß

Thomas

MKeY

hast du es beim link mal mit "nocache" probiert?
https://wiki.fhem.de/wiki/FTUI_Widget_Link

<div data-type="link" data-color="white" class="nocache">
Wer Fehler findet, darf sie behalten!
RPi's, D1Mini
Homematic, Hue, Sonoff, Alexa, Xiaomi, ConBee
Prusa MK2.5, Prusa MK3S (MMU2S vorhanden, aber nervtötend)
Lowrider 2CNC

TomLee

Zitathast du es beim link mal mit "nocache" probiert?

Jetzt mal, Kalendereintrag geändert, Calendar reload gemacht -> das Icon aktualisiert sich weiterhin, das label nicht.

yersinia

Gibt es aus dem FHEM Device überhaupt ein event wenn sich nextWaste ändert?
viele Grüße, yersinia
----
FHEM 6.4 (SVN) on RPi 4B with RasPi OS Bookworm (perl 5.36.0) | FTUI
nanoCUL->2x868(1x ser2net)@tsculfw, 1x433@Sduino | MQTT2 | Tasmota | ESPEasy
VCCU->14xSEC-SCo, 7xCC-RT-DN, 5xLC-Bl1PBU-FM, 3xTC-IT-WM-W-EU, 1xPB-2-WM55, 1xLC-Sw1PBU-FM, 1xES-PMSw1-Pl

TomLee

Schon, das icon aktualisiert sich ja, wie du oben siehst holen sich das icon und label den Wert aus dem gleichen Reading.

yersinia

Kann es sein, dass dir ein schließendes </div> fehlt?
<div data-type="link" data-color="white">
            <div data-type="label"
    data-part="(.*)_.*"
data-device="Google_Abfallkalender"
data-get="nextWaste"
class="top-narrow">
            </div> <!-- HIER -->
</div>
viele Grüße, yersinia
----
FHEM 6.4 (SVN) on RPi 4B with RasPi OS Bookworm (perl 5.36.0) | FTUI
nanoCUL->2x868(1x ser2net)@tsculfw, 1x433@Sduino | MQTT2 | Tasmota | ESPEasy
VCCU->14xSEC-SCo, 7xCC-RT-DN, 5xLC-Bl1PBU-FM, 3xTC-IT-WM-W-EU, 1xPB-2-WM55, 1xLC-Sw1PBU-FM, 1xES-PMSw1-Pl

TomLee

Ja ein schliessendes div hat gefehlt, es waren zuvor 20 öffnende und 19 schliessende.

Das merkwürdige ist jetzt das ich zweimal aktualisieren muss das label sich aktualisiert, ohne das fehlende </div> wars nur einmal, ob nun mit oder ohne nocache, mehrfach getestet.

<header>Müllabfuhr</header>
<div class="vbox">
            <div class="bigger bottom-narrow"
            data-device="Google_Abfallkalender"
data-type="symbol"
data-get="nextWaste"
data-get-warn=".*(\d+).*"
data-states='["R.*_([0|1])","B.*_([0|1])","H.*_([0|1])","S.*_([0|1])","R.*_.*","B.*_.*","H.*_.*","S.*_.*"]'
data-colors='["#87837D","#783C00","green","red","#87837D","#783C00","green","red"]'
data-icons='["fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn","fa-trash-o warn","fa-trash-o warn","fa-trash-o warn"]'>
            </div>

      <div data-type="popup" data-height="200px" data-width="250px">
                 <div data-type="link" data-color="white" class="nocache">
                 <div data-type="label"
         data-part="(.*)_.*"
     data-device="Google_Abfallkalender"
     data-get="nextWaste"
     class="top-narrow">
                 </div>
                 </div>
       <div class="dialog">
   <header>Leerungen</header>
                  <div class="top-space inline">
              <div class="bold top-narrow">Restabfall/Wertstoffe</div>
          </div>
          <div class="top-space inline">
          <div data-type="label" data-device="Google_Abfallkalender" data-get="L_Restabfall/Wertstoffe" class="hbox"></div>
          </div>
          <div class="newline"></div>
          <div class="top-space inline">
      <div class="bold top-narrow">Bioabfall</div>
          </div>
          <div class="top-space inline">
      <div data-type="label" data-device="Google_Abfallkalender" data-get="L_Bioabfall" class="top-narrow"></div>
          </div>
          <div class="newline"></div>
          <div class="top-space inline">
      <div data-type="push"
  data-device="doif_Muell_Count"
  data-set-on="cmd_2"
  data-on-color="white"
  data-on-background-color="green"
  data-icon="fa-chevron-down">
      </div>
          </div>
          <div class="top-space inline">
      <div data-type="push"
  data-device="doif_Muell_Count"
  data-set-on="cmd_1"
  data-on-color="white"
  data-on-background-color="green"
  data-icon="fa-chevron-up">
      </div>
                  </div>
      </div>
  </div>
</div>

yersinia

Warum nutzt du eigtl ein link-Widget um das label herum? Laut wiki ist die Struktur eher so:
[...]
      <div data-type="popup" data-height="200px" data-width="250px">
                 <div data-type="label"
         data-part="(.*)_.*"
     data-device="Google_Abfallkalender"
     data-get="nextWaste"
     class="top-narrow">
                 </div>
       <div class="dialog">
[...]
viele Grüße, yersinia
----
FHEM 6.4 (SVN) on RPi 4B with RasPi OS Bookworm (perl 5.36.0) | FTUI
nanoCUL->2x868(1x ser2net)@tsculfw, 1x433@Sduino | MQTT2 | Tasmota | ESPEasy
VCCU->14xSEC-SCo, 7xCC-RT-DN, 5xLC-Bl1PBU-FM, 3xTC-IT-WM-W-EU, 1xPB-2-WM55, 1xLC-Sw1PBU-FM, 1xES-PMSw1-Pl

TomLee





Zitat von: yersinia am 26 Mai 2020, 13:24:57
Warum nutzt du eigtl ein link-Widget um das label herum?

Weiß nicht mehr, das schon einige Monate wieder her als ich die Abfallanzeige um das popup erweitert habe und dann die Lust daran verloren habe weils ohne nachzufragen nicht weiterging.

Mit deinem letzten Beispiel ist alles wie zuvor mit link, man muss zweimal aktualisieren.


<header>Müllabfuhr</header>
<div class="vbox">
            <div class="bigger bottom-narrow"
            data-device="Google_Abfallkalender"
data-type="symbol"
data-get="nextWaste"
data-get-warn=".*(\d+).*"
data-states='["R.*_([0|1])","B.*_([0|1])","H.*_([0|1])","S.*_([0|1])","R.*_.*","B.*_.*","H.*_.*","S.*_.*"]'
data-colors='["#87837D","#783C00","green","red","#87837D","#783C00","green","red"]'
data-icons='["fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn","fa-trash-o warn","fa-trash-o warn","fa-trash-o warn"]'>
            </div>

      <div data-type="popup" data-height="200px" data-width="250px">
                 <div data-type="label"
         data-part="(.*)_.*"
     data-device="Google_Abfallkalender"
     data-get="nextWaste"
     class="top-narrow">
                 </div>
       <div class="dialog">
   <header>Leerungen</header>
                  <div class="top-space inline">
              <div class="bold top-narrow">Restabfall/Wertstoffe</div>
          </div>
          <div class="top-space inline">
          <div data-type="label" data-device="Google_Abfallkalender" data-get="L_Restabfall/Wertstoffe" class="hbox"></div>
          </div>
          <div class="newline"></div>
          <div class="top-space inline">
      <div class="bold top-narrow">Bioabfall</div>
          </div>
          <div class="top-space inline">
      <div data-type="label" data-device="Google_Abfallkalender" data-get="L_Bioabfall" class="top-narrow"></div>
          </div>
          <div class="newline"></div>
          <div class="top-space inline">
      <div data-type="push"
  data-device="doif_Muell_Count"
  data-set-on="cmd_2"
  data-on-color="white"
  data-on-background-color="green"
  data-icon="fa-chevron-down">
      </div>
          </div>
          <div class="top-space inline">
      <div data-type="push"
  data-device="doif_Muell_Count"
  data-set-on="cmd_1"
  data-on-color="white"
  data-on-background-color="green"
  data-icon="fa-chevron-up">
      </div>
                  </div>
      </div>
  </div>
</div>

yersinia

#9
Ein letzter Versuch, dann wüsste ich auch nicht mehr weiter - außer dass das popup widget das nicht unterstützt (kann ich mir aber nicht vorstellen, da es mit symbol und simplechart auch zu funktionieren scheint).
[...]
      <div data-type="popup" data-height="200px" data-width="250px">
                 <div>
<div data-type="label"
     data-part="(.*)_.*"
     data-device="Google_Abfallkalender"
     data-get="nextWaste"
     class="top-narrow">
</div>
                 </div>
       <div class="dialog">
[...]
viele Grüße, yersinia
----
FHEM 6.4 (SVN) on RPi 4B with RasPi OS Bookworm (perl 5.36.0) | FTUI
nanoCUL->2x868(1x ser2net)@tsculfw, 1x433@Sduino | MQTT2 | Tasmota | ESPEasy
VCCU->14xSEC-SCo, 7xCC-RT-DN, 5xLC-Bl1PBU-FM, 3xTC-IT-WM-W-EU, 1xPB-2-WM55, 1xLC-Sw1PBU-FM, 1xES-PMSw1-Pl

TomLee

Es klappt :), aber ;D:

Jetzt ist es Zufall das das popup auf geht beim tippen auf label, es ist auch nicht mehr genau das label auf das man tippen muss, habs aber noch nicht rausgefunden wo genau, kann tippeln wie ich will mal gehts mal gehts nicht, mal ist es weiter rechts mal weiter links, aber immer unter (sehr viel weiter) unter dem label, hab schon paarmal den Türöffner darunter betätigt.   :P

TomLee

Hab das popup auch mal über das icon gelegt, das klappt, man kann jetzt praktisch irgendwo tippen.
Nachteil das label rutscht weiter hoch. siehe 1. Bild i. A.

Das gleich ich (aber ob das so richtig ist ?) mit class="top-space" in dem div das wir hinzugefügt haben wieder aus. s. 2. Bild i. A.

<header>Müllabfuhr</header>
<div class="vbox">
<div data-type="popup" data-height="200px" data-width="250px">
            <div class="bigger bottom-narrow"
            data-device="Google_Abfallkalender"
data-type="symbol"
data-get="nextWaste"
data-get-warn=".*(\d+).*"
data-states='["R.*_([0|1])","B.*_([0|1])","H.*_([0|1])","S.*_([0|1])","R.*_.*","B.*_.*","H.*_.*","S.*_.*"]'
data-colors='["#87837D","#783C00","green","red","#87837D","#783C00","green","red"]'
data-icons='["fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn","fa-trash-o warn","fa-trash-o warn","fa-trash-o warn"]'>
            </div>
               
             <div class="top-space">
                 <div data-type="label"
         data-part="(.*)_.*"
     data-device="Google_Abfallkalender"
     data-get="nextWaste"
     class="top-narrow" >
                 </div>
                 </div>
       <div class="dialog">
   <header>Leerungen</header>
                  <div class="top-space inline">
              <div class="bold top-narrow">Restabfall/Wertstoffe</div>
          </div>
          <div class="top-space inline">
          <div data-type="label" data-device="Google_Abfallkalender" data-get="L_Restabfall/Wertstoffe" class="hbox"></div>
          </div>
          <div class="newline"></div>
          <div class="top-space inline">
      <div class="bold top-narrow">Bioabfall</div>
          </div>
          <div class="top-space inline">
      <div data-type="label" data-device="Google_Abfallkalender" data-get="L_Bioabfall" class="top-narrow"></div>
          </div>
          <div class="newline"></div>
          <div class="top-space inline">
      <div data-type="push"
  data-device="doif_Muell_Count"
  data-set-on="cmd_2"
  data-on-color="white"
  data-on-background-color="green"
  data-icon="fa-chevron-down">
      </div>
          </div>
          <div class="top-space inline">
      <div data-type="push"
  data-device="doif_Muell_Count"
  data-set-on="cmd_1"
  data-on-color="white"
  data-on-background-color="green"
  data-icon="fa-chevron-up">
      </div>
                  </div>
                  </div>
  </div>
</div>

TomLee

Nächste und letzte Frage, wieder label, im popup-Code:

In dem popup kann ich mit den push-Buttons von den Readings L_Bioabfall/L_Restabfall/Wertstoffe eins subtrahieren oder addieren.

Das klappt auch alles, nur aktualisiert sich auch hier der Wert nicht direkt, die Seite muss auch hier von Hand aktualisiert.

Woran kann das noch liegen oder geht das in einem popup nicht.

TomLee

Die letzte Frage hat sich in Luft aufgelöst, hatte zwischenzeitlich nur noch data-return-time="60" ergänzt und mit der Höhe gespielt, plötzlich gehts 8)


<header>Müllabfuhr</header>
<div class="vbox">
<div data-type="popup" data-height="150px" data-width="250px" data-return-time="60">
            <div class="bigger bottom-narrow"
            data-device="Google_Abfallkalender"
data-type="symbol"
data-get="nextWaste"
data-get-warn=".*(\d+).*"
data-states='["R.*_([0|1])","B.*_([0|1])","H.*_([0|1])","S.*_([0|1])","R.*_.*","B.*_.*","H.*_.*","S.*_.*"]'
data-colors='["#87837D","#783C00","green","red","#87837D","#783C00","green","red"]'
data-icons='["fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn fa-spin","fa-trash-o warn","fa-trash-o warn","fa-trash-o warn","fa-trash-o warn"]'>
            </div>

                 
             <div class="top-space" >
                 <div data-type="label"
         data-part="(.*)_.*"
     data-device="Google_Abfallkalender"
     data-get="nextWaste"
     class="top-narrow" >
                 </div>
                 </div>
       <div class="dialog">
   <header>Leerungen</header>
                  <div class="top-space inline">
              <div class="bold top-narrow">Restabfall/Wertstoffe</div>
          </div>
          <div class="top-space inline">
          <div data-type="label" data-device="Google_Abfallkalender" data-get="L_Restabfall/Wertstoffe" class="hbox"></div>
          </div>
          <div class="newline"></div>
          <div class="top-space inline">
      <div class="bold top-narrow">Bioabfall</div>
          </div>
          <div class="top-space inline">
      <div data-type="label" data-device="Google_Abfallkalender" data-get="L_Bioabfall" class="top-narrow"></div>
          </div>
          <div class="newline"></div>
          <div class="top-space inline">
      <div data-type="push"
  data-device="doif_Muell_Count"
  data-set-on="cmd_2"
  data-on-color="white"
  data-on-background-color="green"
  data-icon="fa-chevron-down">
      </div>
          </div>
          <div class="top-space inline">
      <div data-type="push"
  data-device="doif_Muell_Count"
  data-set-on="cmd_1"
  data-on-color="white"
  data-on-background-color="green"
  data-icon="fa-chevron-up">
      </div>
                  </div>
                  </div>
  </div>
</div>



Danke noch für den Tipp aus #9

TomLee

Zitat von: yersinia am 26 Mai 2020, 13:24:57
Warum nutzt du eigtl ein link-Widget um das label herum? Laut

Jetzt wieder entdeckt, weil ich mich wohl an folgendem, seit rd. 4 Jahren existierenden popup orientiert habe, welches ich damals in ähnlicher Form irgendwo abkupferte und es damit problemlos funzt.

Hat wohl was mit dem vbox-div zu tun, dass das zusätzliche div in Müllabfuhr gebraucht wird, aber nicht weiter mit beschäftigt.

   <header>Rollladen</header>
<div data-type="symbol" data-device="Rollo_EG_Kueche" data-get="pct" data-states='[0,1]' data-colors='["red","green"]'  data-icon="fa-align-justify" class="narrow"></div>
<div data-type="label" data-device="Rollo_EG_Kueche" data-get="pct" data-unit="%" class="narrow big thin"></div>

<div data-type="popup" data-height="190px" data-width="250px" data-return-time="60">
<div data-type="link" data-color="grey" data-border-color="grey" data-icon="fa-sort" class="top-space round">auf / ab</div>
<div class="dialog">
<header>Rollladen</header>
<div class="top-space inline">
<div data-type="switch"
data-device="Rollo_EG_Kueche"


data-get-on="down"
data-get-off="((?!down).)*"

data-set-on="down"
data-set-off="down"

data-on-color="white"
data-on-background-color="green"
data-icon="fa-chevron-down">
</div>
<div class="mini">10%</div>
</div>
<div class="top-space inline">
<div data-type="switch"
data-device="Rollo_EG_Kueche"
data-get="pct"
data-get-on="38"
data-get-off="((?!38).)*"
data-set="pct"
data-set-on="38"
data-set-off="38"
data-on-color="white"
data-on-background-color="green"
data-icon="fa-bars">
</div>
<div class="mini">Mitte</div>
</div>
<div class="top-space inline">
<div data-type="switch"
data-device="Rollo_EG_Kueche"

data-get-on="up"
data-get-off="((?!up).)*"

data-set-on="up"
data-set-off="up"
data-on-color="white"
data-on-background-color="green"
data-icon="fa-chevron-up">
</div>
<div class="mini">10%</div>
</div>
<div class="newline"></div>
<div class="top-space inline">
<div data-type="switch"
data-device="Rollo_EG_Kueche"
data-get="pct"
data-get-on="0"
data-get-off="((?!0).)*"
data-set="pct"
data-set-on="0"
data-set-off="0"
data-on-color="white"
data-on-background-color="green"
data-icon="fa-chevron-down">
</div>
<div class="mini">zu</div>
</div>
<div class="top-space inline">
<div data-type="switch"
data-device="Rollo_EG_Kueche"
data-get="pct"
data-get-on="100"
data-get-off="((?!100).)*"
data-set="pct"
data-set-on="100"
data-set-off="100"
data-on-color="white"
data-on-background-color="green"
data-icon="fa-chevron-up">
</div>
<div class="mini">auf</div>
</div>
</div>