Navigation

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

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    I
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Best 0
    • Groups 0

    intershopper

    @intershopper

    0
    Reputation
    14
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    intershopper Follow

    Latest posts made by intershopper

    • RE: Fhem adapter - auf Aliasname von obj zugreifen

      Danke. Funktioniert

       var id = [color]obj.id.substr[/color](0, obj.id.indexOf('.state'));
        id = id + '.Attributes.alias';
        var name = getState(id).val;
      
      

      Gruß Frank

      posted in Skripten / Logik
      I
      intershopper
    • Fhem adapter - auf Aliasname von obj zugreifen

      Hallo,

      ich habe einen einfachen trgger geschrieben und will den alias des fhem devices in log schreiben. Leider klappt das nicht so ganz

      var timeout;
      var waitTime =1000*10;
      var reg = new RegExp("^fhem\\.\\d+\\.MAX_\\d*\\.state$");
      on(reg , function (obj) {
      
        var name = obj.alias;
        var value = obj.state.val;
        var oldValue = obj.oldState.val;
        var aussentemp = getState("fhem.1.WPL13.AUSSENTEMP").val
      
        if (aussentemp < 15 && value == 'opened') {
          timeout = setTimeout(function () {
            log(name+'ist seit '+(waitTime/1000)+' Sekunden offen und draußen sind es nur '+aussentemp+ "°C");
          }, waitTime);
        } else {
          (function () {if (timeout) {clearTimeout(timeout); timeout = null;}})();
        }
      
       });
      
      

      obj.name ist undefined, obwohl in den objects der fhem alias korrekt angezeigt. Ich habe auch schon

      `obj.channel

      obj.channel.val

      obj.state.alias

      obj.state.alias.val`

      probiert. Leider ohne Erfolg.

      Was mache ich falsch?

      Gruß Frank
      9139_iobroker_objects.png

      posted in Skripten / Logik
      I
      intershopper
    Community
    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
    The ioBroker Community 2014-2023
    logo