Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. tobi

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    T
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Best 0
    • Groups 0

    tobi

    @tobi

    0
    Reputation
    11
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    tobi Follow

    Latest posts made by tobi

    • RE: [Gelöst] Nur ein Zustand in Scene aktivieren

      Du könntest die Logik direkt im Skript integrieren.

      createState("javascript.0.TVEin", 0); // Generiert beim starten den Datenpunkt, wenn nicht vorhanden
      var wol = require('wake_on_lan'); // Lädt von ioBroker die das nötige Paket
      var myTV = "xx:xx:xx:xx:xx:xx:xx"; // MAC definieren
      
      // Ab hier automatisch
      on({id: "javascript.0.TVEin", change: 'any'}, function (obj) {
          if (obj.state.val) { //Fernseher wird eingeschaltet
          	wol.wake(myTV);
          	log("Script WOL – TV aufgeweckt", "info");
          } else { //Fernseher wird ausgeschaltet
          	setState("samsung.0.POWER_OFF", true);
          }
      });
      
      
      posted in Skripten / Logik
      T
      tobi
    Community
    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
    The ioBroker Community 2014-2023
    logo