ioBroker / ioBroker.vis

Visualisation for ioBroker platform.
MIT License
301 stars 70 forks source link

binding formel hat umlaut problem #423

Open liv-in-sky opened 2 years ago

liv-in-sky commented 2 years ago

ist im 2 definierten dp ein umlaut (üöä) enthalten kommt ein fehler im browser log und die formel funktioniert nicht

forum: https://forum.iobroker.net/post/705384

beispiel fehler (biomüll): {dp2:trashschedule.0.type.restmüll.daysLeft; dp1:trashschedule.0.type.biomüll.daysLeft; dp2 == 13 || dp1==8 ? 0 : 100 } beispiel ohne fehler (papierTonne): {dp2:trashschedule.0.type.restmüll.daysLeft; dp1:trashschedule.0.type.papierTonne.daysLeft; dp2 == 13 || dp1==8 ? 0 : 100 }

ArnoD15 commented 2 years ago

Die Formel funktioniert auch nicht, wenn im zweiten dp eine # enthalten ist. Forum: https://forum.iobroker.net/topic/49473/vis-binding-und-verkn%C3%BCpfung-mehrerer-variablen/17

Beispiel: {v1:e3dc-rscp.0.BAT.BAT#0.DCB#0.DCB_CELL_TEMPERATURE.06;v2:e3dc-rscp.0.BAT.BAT#0.DCB#0.DCB_CELL_TEMPERATURE.07;v1-v2}

th4git commented 2 years ago

Kann ich bestätigen: Sobald mehr als ein DP im Binding einer Variablen zugewiesen und verarbeitet wird (hier "secondDP") und diese weiteren DPs Umlaute enthalten, z.B. {firstDP:0_userdata.0.UmlautÄ; secondDP:0_userdata.0.UmlautÖ; firstDP=="true" && secondDP=="true"} kommt es bei der Code-Ausführung im anzeigenden Webbrowser auf der Console zum Fehler ReferenceError: secondDP is not defined und das gesamte Binding ist nicht funktional. Wird nur ein DP mit Umlaut im Binding verwendet, funktioniert es, z.B. {firstDP:0_userdata.0.UmlautÄ; firstDP=="true"}

@GermanBluefox

th4git commented 2 years ago

Wäre klasse, wenn der eingangs beschriebene Binding-Bug mit Umlauten in State-IDs bei nächster Gelegenheit beseitigt werden könnte - damit man das echt gute VIS (danke an die Engagierten) richtig ausreizen kann. :-) @GermanBluefox

th4git commented 2 years ago

Problem besteht auch noch mit Adapter v1.4.12.

Fehlermeldungen dazu in der Webbrowser-Console (Chrome):

vis.js:2594 Error in eval[value]: {firstDP:0_userdata.0.UmlautÄ; secondDP:0_userdata.0.UmlautÖ; firstDP=="true" && secondDP=="true"}
formatBinding @ vis.js:2594
updateStates @ vis.js:3181
(anonymous) @ vis.js:2976
(anonymous) @ conn.js:801
r.onack @ socket.io.js:8
r.onpacket @ socket.io.js:8
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
r.ondecoded @ socket.io.js:6
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
a.add @ socket.io.js:6
r.ondata @ socket.io.js:6
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
r.onPacket @ socket.io.js:6
(anonymous) @ socket.io.js:6
r.emit @ socket.io.js:6
r.onPacket @ socket.io.js:7
r.onData @ socket.io.js:7
ws.onmessage @ socket.io.js:8
vis.js:2595 Error in eval[script]: var firstDP = "false";return  secondDP:0_userdata.0.UmlautÖ;
formatBinding @ vis.js:2595
updateStates @ vis.js:3181
(anonymous) @ vis.js:2976
(anonymous) @ conn.js:801
r.onack @ socket.io.js:8
r.onpacket @ socket.io.js:8
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
r.ondecoded @ socket.io.js:6
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
a.add @ socket.io.js:6
r.ondata @ socket.io.js:6
(anonymous) @ socket.io.js:8
r.emit @ socket.io.js:6
r.onPacket @ socket.io.js:6
(anonymous) @ socket.io.js:6
r.emit @ socket.io.js:6
r.onPacket @ socket.io.js:7
r.onData @ socket.io.js:7
ws.onmessage @ socket.io.js:8
vis.js:2596 Error in eval[error]: SyntaxError: Unexpected token ':'

@GermanBluefox

Parodontitis commented 2 years ago

In die Falle bin ich auch getappt. Adapter 1.4.15.

  1. {a:alias.0.Smartmeter.Zählerstand.Abgabe;b:alias.0.Smartmeter.Zählerstand.Abgabe;a}
  2. {a:alias.0.Smartmeter.Zählerstand.Abgabe;b:alias.0.Smartmeter.Zählerstand.Abgabe;b}
  3. {a:alias.0.Smartmeter.Zählerstand.Abgabe;b:alias.0.Smartmeter.Zählerstand.Abgabe;a + " und " + b}

Ergibt:

  1. 7
  2. 0
  3. 0

Danke und Gruß

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Please check if the issue is still relevant in the most current version of the adapter and tell us. Also check that all relevant details, logs and reproduction steps are included and update them if needed. Thank you for your contributions. Dieses Problem wurde automatisch als veraltet markiert, da es in letzter Zeit keine Aktivitäten gab. Es wird geschlossen, wenn nicht innerhalb der nächsten 7 Tage weitere Aktivitäten stattfinden. Bitte überprüft, ob das Problem auch in der aktuellsten Version des Adapters noch relevant ist, und teilt uns dies mit. Überprüft auch, ob alle relevanten Details, Logs und Reproduktionsschritte enthalten sind bzw. aktualisiert diese. Vielen Dank für Eure Unterstützung.

micw421 commented 1 year ago

Gleiches Problem. Habe ewig versucht, eine einfache Berechnung auszuführen, die einfach nicht klappen wollte. Jetzt diesen Bug entdeckt.

th4git commented 1 year ago

Will there be any progress with this issue/bug? It's open for almost 1 year now and I expect it can be fixed within 30 minutes... @GermanBluefox

oweitman commented 9 months ago

potentieller fix für das umlaut/raute-problem allerdings zunächst zum testen mit umfangreicheren visualisierungen. Anweisungen für den manuellen patch in einer iobroker-test-instanz https://forum.iobroker.net/topic/69004/rechnen-im-html-widget-geht-nicht-mehr/18