Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Gelöst: Anzahl der Zigbee Geräte ermitteln

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    17
    1
    541

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    17
    1
    5.4k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.4k

Gelöst: Anzahl der Zigbee Geräte ermitteln

Scheduled Pinned Locked Moved Skripten / Logik
javascript
22 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M michihorn

    @paul53 selector2.png

    paul53P Offline
    paul53P Offline
    paul53
    wrote on last edited by
    #21

    @michihorn
    Versuche es so:

    const ids = $("tuya.1.*.online");
    const idCAS = "0_userdata.0.System.Tuya.CAS_Count";
    const idNL = "0_userdata.0.System.Tuya.NL_Count";
     
    let cntCAS = 0;
    let cntNL = 0;
    ids.each(function(id) {
        id = id.substring(0, id.lastIndexOf('.'));
        const devName = getObject(id).common.name;
        if(devName.includes('CAS')) cntCAS++;
        if(devName.includes('NL')) cntNL++;
    });
    setState(idCAS, cntCAS, true);
    setState(idNL, cntNL, true);
    log('CAS: ' + cntCAS + ', NL: ' + cntNL);
    

    Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
    Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

    M 1 Reply Last reply
    0
    • paul53P paul53

      @michihorn
      Versuche es so:

      const ids = $("tuya.1.*.online");
      const idCAS = "0_userdata.0.System.Tuya.CAS_Count";
      const idNL = "0_userdata.0.System.Tuya.NL_Count";
       
      let cntCAS = 0;
      let cntNL = 0;
      ids.each(function(id) {
          id = id.substring(0, id.lastIndexOf('.'));
          const devName = getObject(id).common.name;
          if(devName.includes('CAS')) cntCAS++;
          if(devName.includes('NL')) cntNL++;
      });
      setState(idCAS, cntCAS, true);
      setState(idNL, cntNL, true);
      log('CAS: ' + cntCAS + ', NL: ' + cntNL);
      
      M Offline
      M Offline
      michihorn
      wrote on last edited by michihorn
      #22

      @paul53

      Ja Paul das funktioniert. Dankeschön

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      Support us

      ioBroker
      Community Adapters
      Donate

      318

      Online

      32.7k

      Users

      82.5k

      Topics

      1.3m

      Posts
      Community
      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
      ioBroker Community 2014-2025
      logo
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Home
      • Recent
      • Tags
      • Unread 0
      • Categories
      • Unreplied
      • Popular
      • GitHub
      • Docu
      • Hilfe