Skip to content

Skripten / Logik

Hilfe zu JavaScript, Blockly, TypeScript, Node-RED, Scenes und text2command

16.5k Topics 213.5k Posts

NEWS

Subcategories


  • Hilfe für Skripterstellung mit JavaScript

    2k 49k
    2k Topics
    49k Posts
    S
    das Wetter gehört doch zu einem anderen unternehmen, meine ich.... Also ich habe 3 Api Keys zum testen... Wenn ich einen ausgereizt habe, kann ich einfsch den zweiten nutzen und trotz gleicher IP geht's direkt weiter.....
  • Hilfe für Skripterstellung mit Blockly

    7k 79k
    7k Topics
    79k Posts
    haselchenH
    @Fibricus Passt Du den Threadtitel noch bitte an ( auch wenn gelöst). Mit „Denk ich falsch?“ kann kein User was anfangen .
  • Hilfe für Skripterstellung mit Node-RED

    953 13k
    953 Topics
    13k Posts
    Marc BergM
    Es gibt in der Verson 1.3.0 einen neuen Node: iob-setObject (Stand 10.02.26 noch beta) Mit dem neuen Node kann man ioBroker-Objektdefinitionen (Metadaten) direkt schreiben und ändern. Hauptfunktionen: Instanz-Konfigurationen ändern - z.B. MQTT publish-Pattern, Intervalle, etc. Objekt-Eigenschaften aktualisieren - Namen, Rollen, Einheiten, Min/Max-Werte ändern es gibt zwei Modi: Merge-Modus : Ändert nur die angegebenen Eigenschaften, alle anderen bleiben erhalten Replace-Modus: Überschreibt das komplette Objekt Typischer Workflow: Objekt mit iob-getobject holen Mit Change-Node gewünschte Properties ändern Mit iob-setobject zurückschreiben
  • JavaScript Schleife mit Wildcard [gelöst]

    6
    3
    0 Votes
    6 Posts
    595 Views
    Martin1324M
    @paul53 Vielen Dank!! Das Skript läuft perfekt! lg Martin
  • WARN im Log verhindern wenn getState null ist

    Moved
    10
    0 Votes
    10 Posts
    2k Views
    P
    @paul53 copy & paste Fehler. Habs im Code oben korrigiert.
  • excel Datei mit exceljs.js schreiben

    13
    0 Votes
    13 Posts
    1k Views
    CodierknechtC
    @franzda sagte in excel Datei mit exceljs.js schreiben: Danke für EURE Antwort @franzda @bahnuhr Du kannst auch mehr als einen anderen User direkt ansprechen - so wie ich das hier gemacht habe. Dann muss man sich die Antwort nicht zusammensuchen.
  • Objektbaum mit Werte kopieren [gelöst]

    8
    0 Votes
    8 Posts
    577 Views
    Martin1324M
    @paul53 genau das habe ich gesucht. Vielen vielen Dank!! Hat perfekt funktioniert. lg Martin
  • Durchschnitt der Werte aus InfluxDB v 2.x auswerten

    1
    1
    2 Votes
    1 Posts
    572 Views
    No one has replied
  • On mit Array als Trigger

    3
    0 Votes
    3 Posts
    237 Views
    B
    @paul53 said in On mit Array als Trigger: let i = arSource.indexOf(obj.id); Genial. Vielen Dank!!!!!!!!!!!!!!
  • [gelöst] Balkonkraftwerk - Ertrag / Kosten / Verbrauch

    44
    0 Votes
    44 Posts
    10k Views
    S
    @alexho Würdest du die Scripte zur Verfügung stellen?
  • *gelöst* Script oder geht das einfacher?

    5
    0 Votes
    5 Posts
    201 Views
    G
    @crunchip LastChange nennt sich das.... gefunden...danke...
  • Blockly für Tradfrij 5Button Remote

    4
    0 Votes
    4 Posts
    311 Views
    Jannis FotiouJ
    @der-trollo Hey würdest du mir dein Blockly mal etwas erläutern? Vorallem sagen welche Datenpunkte des Schalters und der Lampe sind? Ich bin absoluter Neuling und könnte hierbei einiges lernen. Wäre dir sehr dankbar. LG Jannis
  • Tado Integration - wie vollen Funktionsumfang nutzen?

    1
    0 Votes
    1 Posts
    172 Views
    No one has replied
  • VU Meter / Treshold / Peak

    11
    0 Votes
    11 Posts
    849 Views
    B
    @paul53 Hut ab, das klappt echt richtig gut! Keinerlei Probleme mit der Performance... Danke auch für den Hinweis mit dem setState().
  • Blockly letzte Aktualisierung von Datenpunkt ermitteln

    5
    1
    0 Votes
    5 Posts
    527 Views
    B
    Perfekt und Merci :-)
  • [Vorlage] trackListHtml-Scrolling für Spotify

    Moved javascript multimedia
    30
    5
    1 Votes
    30 Posts
    6k Views
    M
    Moin, ich wollte gerne den aktuellen Spotify Adapter (v1.2.1) in meiner VIS für ein GaragenMusikTablet (ein altes Fire HD8) einbinden aber so richtig wollten die Scrips in Sachen Tracklist nicht mehr. Ich habe das Script angepasst so das es bei mir jedenfalls funktioniert. Evt. kann es ja jemand gebrauchen. /*************************************************************************************************** * HTML-Tracklist: * Quelle: * https://github.com/twonky4/ioBroker.spotify-premium/wiki/Html-Tracklist * https://forum.iobroker.net/viewtopic.php?p=151165#p151165 * * Dieses Script wurde von twonky entworfen * Es wurde an gewissen Stellen erweitert und engepasst ****************************************************************************************************/ const STATE_PATH = 'javascript.'+ instance + '.' + 'spotify.spotify-supplement.'; createState(STATE_PATH + 'htmlTrackList', '', false); function refreshTrackList() { var current = getState('spotify-premium.0.player.playlist.trackList').val; var source = getState('spotify-premium.0.player.playlist.trackListArray').val; var tracklist; var i; var html = '<table class="spotify-tracklist-table">'; // Prüfe, ob die Tracklist geladen wurde if(source.length > 0) { // JSON parsen tracklist = JSON.parse(source); tracklist.forEach (function (track, index){ i = index; html += '<tr onclick="vis.setValue(\'spotify-premium.0.player.playlist.trackNo\', ' + (i+1) + ');">'; html += '<td>'; /******************************************************************** * Hier muss man dem aktuellen Track und/oder Artist eine ID vergeben ********************************************************************/ var currentSong = (current == i) ? ' id="spotify-current-song"' : ''; // gibt dem aktuellen Song eine ID var currentArtist = (current == i) ? ' id="spotify-current-artist"' : ''; // gibt dem dazugehörigen Artist eine ID /* Wenn man ein Icon hinzufügen möchte, braucht es diese IF-Abfrage, sonst kann sie komplett gelöscht werden */ if(current == i) { html += '<div style="position:absolute;left:0px;width:25px;height:25px;">'; // Formatierung des Icons html += '<img style="width:100%;" src="/vis.0/icons/active_song_speaker_white.png">'; // Pfad zum Icon in deiner Vis html += '</div>'; } html += '<div class="spotify-tracklist-title"' + currentSong + '>' + track.title + '</div>'; html += '<div class="spotify-tracklist-artist"' + currentArtist + '>' + track.artistName + '</div>'; html += '</td></tr>'; //html += '</tr>'; }); } else { // gebe einen Hinweis auf fehlende Trackliste html += '<tr><td>Keine Tracklist geladen.</td></tr>'; } // tabelle schliessen html += '</table>'; /*************************************************************************************************** * Script für automatisches Scrollen des aktuellen Titels * https://forum.iobroker.net/viewtopic.php?f=30&t=18222&p=190991&hilit=javascript+experten#p190365 ****************************************************************************************************/ // Lade das Script nur, wenn die Tracklist auch geladen ist if(source.length > 0) { html += '<script>'; html += 'var el = document.getElementById("spotify-current-song");'; // ID von dem aktuellen DIV in der TABLE oben //html += "el.scrollIntoViewIfNeeded(true)"; //true = Position oben / false = Position unten (Achtung: hier Id:spotify-current-artist angeben) html += "el.scrollIntoView();"; // scroll to current track html += '</script>'; } /***************************************************************************************************/ setState(STATE_PATH + 'htmlTrackList', html, true); } on('spotify-premium.0.player.playlist.trackList', refreshTrackList); on('spotify-premium.0.player.playlist.trackListArray', refreshTrackList); refreshTrackList(); [image: 1668160019757-vis_spotify.png]
  • Ökofen Pelletronic Touch auslesen

    Moved
    56
    0 Votes
    56 Posts
    22k Views
    JanLoebelJ
    @looxer01 @ioBroker-lover habt ihr nochmal irgendwas rausfinden / berechnen können? Ich möchte ebenfalls eine ungefähre Berechnung haben wieviele Pellets wir so verbrauchen. Die Schneckenlaufzeit plane ich über einen Shelly zu messen da muss ich aber mal noch testen wie sich das am besten damit umsetzten lässt. Wenn ich hier Werte raus habe die hinkommen könnten, könnte ich die mit der "PE1 Einschublaufzeit[zs]" abgleichen, da ich diese Werte über das CSV theoretisch auch erhalte.
  • Umrechnung Sekunden in hh:mm:ss

    10
    0 Votes
    10 Posts
    1k Views
    K
    @kkickingereder Ich habe das ganze so gelöst. [image: 1667944856785-a8ad92d4-8a17-47dc-b7ae-9858e1543476-image.png] [image: 1667945127558-06328273-dac0-4ee0-8a12-b64dac6e9a9f-image.png] so hat meine Frau die Restlaufzeit von dem Programm und die Uhrzeit an dem es fertig ist. Blockly: Protokoll Ausgewählte Blöcke exportieren <xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="rI/MU0bb2vx?cMy#]1;h">Dauer</variable> <variable id="jIw-#0$lg4RWth^zia4n">Stunden</variable> <variable id="eDE,{!]85U2wKHr7b#+.">Minuten</variable> <variable id="zKK-|$Mj;MF-v}]?,o14">Sekunden</variable> </variables> <block type="on" id="z6e`6VBk83f9Go+uS?vD" x="112" y="38"> <field name="OID">homeconnect.0.SIEMENS-SN658X06TE-68A40E42FB34.programs.active.options.BSH_Common_Option_RemainingProgramTime</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="variables_set" id="5OO:r9CY/I4.PuLt+uoX"> <field name="VAR" id="rI/MU0bb2vx?cMy#]1;h">Dauer</field> <value name="VALUE"> <block type="get_value" id="+BQHmJD?}9`Lg3uT?8N`"> <field name="ATTR">val</field> <field name="OID">homeconnect.0.SIEMENS-SN658X06TE-68A40E42FB34.programs.active.options.BSH_Common_Option_RemainingProgramTime</field> </block> </value> <next> <block type="variables_set" id="P`1=(VlTq)WG,CD-.5bo"> <field name="VAR" id="jIw-#0$lg4RWth^zia4n">Stunden</field> <value name="VALUE"> <block type="math_round" id="S[;vM1j}t$+RFL;3gf=9"> <field name="OP">ROUNDDOWN</field> <value name="NUM"> <shadow type="math_number" id="{L(wDg$WtYWI6u2/$0(+"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="o=h6OG}c84!{s4Dl^^vZ"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="@{kAY6pA0-GbDWc!9v:V"> <field name="VAR" id="rI/MU0bb2vx?cMy#]1;h">Dauer</field> </block> </value> <value name="B"> <shadow type="math_number" id=",zQ3GVM~%~l|/6Wc+aGZ"> <field name="NUM">1</field> </shadow> <block type="math_number" id="cK2%7i*C?4hD;s-,93f^"> <field name="NUM">3600</field> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="YB98~EjxKRM.E^/RH;^c"> <field name="VAR" id="eDE,{!]85U2wKHr7b#+.">Minuten</field> <value name="VALUE"> <block type="math_round" id="bU`4pk9On/08ov|?CkBl"> <field name="OP">ROUNDDOWN</field> <value name="NUM"> <shadow type="math_number" id="5|KmBVYDfsYBmR7~Wl(9"> <field name="NUM">3.1</field> </shadow> <block type="math_modulo" id="$4Owp|d8.g!a#kaFhqs_"> <value name="DIVIDEND"> <shadow type="math_number" id="?)RI2P}2p!-YxZ88ijf~"> <field name="NUM">64</field> </shadow> <block type="math_arithmetic" id="frY;}ntyuAr*7.#,eo/0"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="COtpj]?(tSnLoo#9_3YI"> <field name="VAR" id="rI/MU0bb2vx?cMy#]1;h">Dauer</field> </block> </value> <value name="B"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="math_number" id="(9{Yo0!tJn1G}nK~j?U+"> <field name="NUM">60</field> </block> </value> </block> </value> <value name="DIVISOR"> <shadow type="math_number" id="_b.9`}PqVBWn+a6+zFp:"> <field name="NUM">60</field> </shadow> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="[uN`$4gdo}]!RaSbDz]7"> <field name="VAR" id="zKK-|$Mj;MF-v}]?,o14">Sekunden</field> <value name="VALUE"> <block type="math_modulo" id="pgcv*`eLN{$4{]6ywy`,"> <value name="DIVIDEND"> <shadow type="math_number"> <field name="NUM">64</field> </shadow> <block type="math_arithmetic" id="ahqj,2ihF{2^=|)D]CDP"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="N=Ptb(8_CCCCn(mzR=$y"> <field name="VAR" id="rI/MU0bb2vx?cMy#]1;h">Dauer</field> </block> </value> <value name="B"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="math_number" id="gu.`t=SE*hv9|?b9XR~Z"> <field name="NUM">60</field> </block> </value> </block> </value> <value name="DIVISOR"> <shadow type="math_number" id="3!Z)0TJTI7g[H$pKG0Qu"> <field name="NUM">60</field> </shadow> </value> </block> </value> <next> <block type="control" id="YQb1D#LU-%kUHcwvqDAr"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Restlaufzeit_Geschirrspuehler</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text_join" id=":gH/~`:Sgc$=D?Le99Yz"> <mutation items="6"></mutation> <value name="ADD0"> <block type="variables_get" id="p+Br~z+{OLmsWTn2,Kd("> <field name="VAR" id="jIw-#0$lg4RWth^zia4n">Stunden</field> </block> </value> <value name="ADD1"> <block type="text" id="Vlv$MjO3eb0S.dl9Q#pu"> <field name="TEXT">Std. </field> </block> </value> <value name="ADD2"> <block type="variables_get" id="b9p+D7=YTP28!$iRn#wv"> <field name="VAR" id="eDE,{!]85U2wKHr7b#+.">Minuten</field> </block> </value> <value name="ADD3"> <block type="text" id="Fx58{XKN/}`:*`Q5Fw`m"> <field name="TEXT">Min. </field> </block> </value> <value name="ADD4"> <block type="variables_get" id="5@a-D./M7FJ6M9/~@K*M" disabled="true"> <field name="VAR" id="zKK-|$Mj;MF-v}]?,o14">Sekunden</field> </block> </value> <value name="ADD5"> <block type="text" id="WM^*N:.`PzQAb~|Y#FZ6" disabled="true"> <field name="TEXT">Sek.</field> </block> </value> </block> </value> <next> <block type="control" id="^W^m+#lm@Z;WqRm|dnT}"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Geschirrspuehler_fertig_um</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="convert_from_date" id=")ZDR7lKID(;F]3#jA_33"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">hh:mm:ss</field> <value name="VALUE"> <block type="math_arithmetic" id="(;Q{j/Th(QpZ,O:NR!gI"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="m#8q|-;wENNJh8{pGvm;"> <field name="NUM">1</field> </shadow> <block type="time_get" id="(tCA%Y)0lpIHk)a5AOJ2"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">object</field> </block> </value> <value name="B"> <shadow type="math_number" id="hYrh.3`33kz7izXNDE_m"> <field name="NUM">6</field> </shadow> <block type="math_arithmetic" id=".=xi3L?p%}AN8CW)H5|]"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="TW.S8F$AG:alUBfpx]R/"> <field name="NUM">1000</field> </shadow> </value> <value name="B"> <shadow type="math_number" id="L~Y~(Rj_O[cg=87|{,b@"> <field name="NUM">0</field> </shadow> <block type="get_value" id="ZZJ{NupDcd8L!-2UZoz0"> <field name="ATTR">val</field> <field name="OID">homeconnect.0.SIEMENS-SN658X06TE-68A40E42FB34.programs.active.options.BSH_Common_Option_RemainingProgramTime</field> </block> </value> </block> </value> </block> </value> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </xml> <xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="rI/MU0bb2vx?cMy#]1;h">Dauer</variable> <variable id="jIw-#0$lg4RWth^zia4n">Stunden</variable> <variable id="eDE,{!]85U2wKHr7b#+.">Minuten</variable> <variable id="zKK-|$Mj;MF-v}]?,o14">Sekunden</variable> </variables> <block type="on" id="z6e`6VBk83f9Go+uS?vD" x="112" y="38"> <field name="OID">homeconnect.0.SIEMENS-SN658X06TE-68A40E42FB34.programs.active.options.BSH_Common_Option_RemainingProgramTime</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="variables_set" id="5OO:r9CY/I4.PuLt+uoX"> <field name="VAR" id="rI/MU0bb2vx?cMy#]1;h">Dauer</field> <value name="VALUE"> <block type="get_value" id="+BQHmJD?}9`Lg3uT?8N`"> <field name="ATTR">val</field> <field name="OID">homeconnect.0.SIEMENS-SN658X06TE-68A40E42FB34.programs.active.options.BSH_Common_Option_RemainingProgramTime</field> </block> </value> <next> <block type="variables_set" id="P`1=(VlTq)WG,CD-.5bo"> <field name="VAR" id="jIw-#0$lg4RWth^zia4n">Stunden</field> <value name="VALUE"> <block type="math_round" id="S[;vM1j}t$+RFL;3gf=9"> <field name="OP">ROUNDDOWN</field> <value name="NUM"> <shadow type="math_number" id="{L(wDg$WtYWI6u2/$0(+"> <field name="NUM">3.1</field> </shadow> <block type="math_arithmetic" id="o=h6OG}c84!{s4Dl^^vZ"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="@{kAY6pA0-GbDWc!9v:V"> <field name="VAR" id="rI/MU0bb2vx?cMy#]1;h">Dauer</field> </block> </value> <value name="B"> <shadow type="math_number" id=",zQ3GVM~%~l|/6Wc+aGZ"> <field name="NUM">1</field> </shadow> <block type="math_number" id="cK2%7i*C?4hD;s-,93f^"> <field name="NUM">3600</field> </block> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="YB98~EjxKRM.E^/RH;^c"> <field name="VAR" id="eDE,{!]85U2wKHr7b#+.">Minuten</field> <value name="VALUE"> <block type="math_round" id="bU`4pk9On/08ov|?CkBl"> <field name="OP">ROUNDDOWN</field> <value name="NUM"> <shadow type="math_number" id="5|KmBVYDfsYBmR7~Wl(9"> <field name="NUM">3.1</field> </shadow> <block type="math_modulo" id="$4Owp|d8.g!a#kaFhqs_"> <value name="DIVIDEND"> <shadow type="math_number" id="?)RI2P}2p!-YxZ88ijf~"> <field name="NUM">64</field> </shadow> <block type="math_arithmetic" id="frY;}ntyuAr*7.#,eo/0"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="COtpj]?(tSnLoo#9_3YI"> <field name="VAR" id="rI/MU0bb2vx?cMy#]1;h">Dauer</field> </block> </value> <value name="B"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="math_number" id="(9{Yo0!tJn1G}nK~j?U+"> <field name="NUM">60</field> </block> </value> </block> </value> <value name="DIVISOR"> <shadow type="math_number" id="_b.9`}PqVBWn+a6+zFp:"> <field name="NUM">60</field> </shadow> </value> </block> </value> </block> </value> <next> <block type="variables_set" id="[uN`$4gdo}]!RaSbDz]7"> <field name="VAR" id="zKK-|$Mj;MF-v}]?,o14">Sekunden</field> <value name="VALUE"> <block type="math_modulo" id="pgcv*`eLN{$4{]6ywy`,"> <value name="DIVIDEND"> <shadow type="math_number"> <field name="NUM">64</field> </shadow> <block type="math_arithmetic" id="ahqj,2ihF{2^=|)D]CDP"> <field name="OP">DIVIDE</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="variables_get" id="N=Ptb(8_CCCCn(mzR=$y"> <field name="VAR" id="rI/MU0bb2vx?cMy#]1;h">Dauer</field> </block> </value> <value name="B"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="math_number" id="gu.`t=SE*hv9|?b9XR~Z"> <field name="NUM">60</field> </block> </value> </block> </value> <value name="DIVISOR"> <shadow type="math_number" id="3!Z)0TJTI7g[H$pKG0Qu"> <field name="NUM">60</field> </shadow> </value> </block> </value> <next> <block type="control" id="YQb1D#LU-%kUHcwvqDAr"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Restlaufzeit_Geschirrspuehler</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text_join" id=":gH/~`:Sgc$=D?Le99Yz"> <mutation items="6"></mutation> <value name="ADD0"> <block type="variables_get" id="p+Br~z+{OLmsWTn2,Kd("> <field name="VAR" id="jIw-#0$lg4RWth^zia4n">Stunden</field> </block> </value> <value name="ADD1"> <block type="text" id="Vlv$MjO3eb0S.dl9Q#pu"> <field name="TEXT">Std. </field> </block> </value> <value name="ADD2"> <block type="variables_get" id="b9p+D7=YTP28!$iRn#wv"> <field name="VAR" id="eDE,{!]85U2wKHr7b#+.">Minuten</field> </block> </value> <value name="ADD3"> <block type="text" id="Fx58{XKN/}`:*`Q5Fw`m"> <field name="TEXT">Min. </field> </block> </value> <value name="ADD4"> <block type="variables_get" id="5@a-D./M7FJ6M9/~@K*M" disabled="true"> <field name="VAR" id="zKK-|$Mj;MF-v}]?,o14">Sekunden</field> </block> </value> <value name="ADD5"> <block type="text" id="WM^*N:.`PzQAb~|Y#FZ6" disabled="true"> <field name="TEXT">Sek.</field> </block> </value> </block> </value> <next> <block type="control" id="^W^m+#lm@Z;WqRm|dnT}"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Geschirrspuehler_fertig_um</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="convert_from_date" id=")ZDR7lKID(;F]3#jA_33"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">hh:mm:ss</field> <value name="VALUE"> <block type="math_arithmetic" id="(;Q{j/Th(QpZ,O:NR!gI"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number" id="m#8q|-;wENNJh8{pGvm;"> <field name="NUM">1</field> </shadow> <block type="time_get" id="(tCA%Y)0lpIHk)a5AOJ2"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">object</field> </block> </value> <value name="B"> <shadow type="math_number" id="hYrh.3`33kz7izXNDE_m"> <field name="NUM">6</field> </shadow> <block type="math_arithmetic" id=".=xi3L?p%}AN8CW)H5|]"> <field name="OP">MULTIPLY</field> <value name="A"> <shadow type="math_number" id="TW.S8F$AG:alUBfpx]R/"> <field name="NUM">1000</field> </shadow> </value> <value name="B"> <shadow type="math_number" id="L~Y~(Rj_O[cg=87|{,b@"> <field name="NUM">0</field> </shadow> <block type="get_value" id="ZZJ{NupDcd8L!-2UZoz0"> <field name="ATTR">val</field> <field name="OID">homeconnect.0.SIEMENS-SN658X06TE-68A40E42FB34.programs.active.options.BSH_Common_Option_RemainingProgramTime</field> </block> </value> </block> </value> </block> </value> </block> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </xml>
  • [gelöst] ReferenceError: materialDesignWidgets

    3
    1
    0 Votes
    3 Posts
    279 Views
    T
    @liv-in-sky danke, das war's. Unter global war das Script deaktiviert. Hatte ich bestimmt mal abgeschaltet, um einem Fehler auf den Grund zu gehen.
  • Licht automatisch abschalten, Türöffnung unterbricht timeout

    6
    1
    0 Votes
    6 Posts
    331 Views
    ChrisPrefectC
    @paul53 Super, dann war das die Lösung. Danke euch beiden! :-D
  • [gelöst]Temperatur kleiner als will nicht triggern.

    11
    2
    0 Votes
    11 Posts
    626 Views
    S
    @homoran Weil ich es noch testen muss. Heute morgen waren es mehr als 11 Grad. Gestern Abend hat es schon mal funktioniert. Also simulierte kurzzeit Test schon mal in Ordnung. Danke für die schnelle Hilfe. Gruß HDM
  • Ich hänge fest, while Schleife [gelöst]

    6
    0 Votes
    6 Posts
    553 Views
    F
    Abend, habs nun so für mich am laufen und funzt. Vielleicht hilft es ja jemandem, Logik: Innerhalb von 15 Minuten darf kein Stromverbrauch auftauchen .... setState("javascript.0.Solar.Script_Spuelmaschine_Status_laeuft", true); let vergangenezeit_spuelm = 1; let sekundenzaehler_spuelm = setInterval(Zeit, 1000); //1000 für Interval 1 Sekunde function Zeit() { vergangenezeit_spuelm++; if (getState("shelly.0.SHPLG2-1#283A90#1.Relay0.Power").val > 1) { vergangenezeit_spuelm = 0; } if (vergangenezeit_spuelm > 900 ) { //900 gleich 15 Minuten da Intervall = 1 Sekunde clearInterval(sekundenzaehler_spuelm); setState("javascript.0.Solar.Spuelm_gestartet",false); setState("javascript.0.Solar.Script_Spuelmaschine_Status_laeuft", false); setState("javascript.0.scriptEnabled.Solar.Spuelmaschine_Status", false); } }
  • Pytonscripte aufrufen mit Rückgabewerte auslesen.

    communication javascript
    2
    0 Votes
    2 Posts
    209 Views
    OliverIOO
    @bertman2000 Du kannst ein Python Skript aufrufen wie jedes pünktlich andere ün Shell Befehl mit exec https://github.com/ioBroker/ioBroker.javascript/blob/master/docs/en/javascript.md#exec---execute-some-os-command-like-cp-file1-file2 Dieser entspricht seiner Struktur dem folgenden Node Befehl https://nodejs.org/api/child_process.html#child_processexeccommand-options-callback Zur Auswertung des Ergebnisses wird dir dann im callback stdout und stderr zurückgegeben.

646

Online

32.6k

Users

82.3k

Topics

1.3m

Posts