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] Listener/Events/ext. Subscriptions stoppen, wie?

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.8k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    2.2k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    16
    1
    3.2k

[gelöst] Listener/Events/ext. Subscriptions stoppen, wie?

Scheduled Pinned Locked Moved Skripten / Logik
22 Posts 5 Posters 4.5k Views
  • 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.
  • R Offline
    R Offline
    redoced
    wrote on last edited by
    #21

    Der stopPoll Aufruf bekommt eigentlich ein callback, was im original code allerdings nicht genutzt wird.

    Ändere deinen Code auf folgendes:

    
    onStop(function skriptStop () {
        try{
            co2Monitor.co2Endpoint.stopPoll(function(){
                log("Polling gestoppt");
                co2Monitor.co2Interface.release(true, (error) => {
    				if(error) {
    					co2Monitor.emit('error', error);
    				}
    				else {
    				    log("Interface released");
    					co2Monitor.co2Device.close();
    					log("Device geschlossen");
    					cb(true);
    				}
    			});
            });
        } catch (e) {
            log(e);
            // hat nicht geklappt
        }
        log("---------------------- **** Skript wurde gestoppt **** ----------------------");
    }, 100 /*ms*/);
    
    
    1 Reply Last reply
    0
    • ruhr70R Offline
      ruhr70R Offline
      ruhr70
      wrote on last edited by
      #22

      @redoced:

      Der stopPoll Aufruf bekommt eigentlich ein callback, was im original code allerdings nicht genutzt wird.

      Ändere deinen Code auf folgendes: `

      Danke!!! :D

      Das hat funktioniert :!: . Dein Post hatte ich nicht gesehen. Und als ich nun das Thema noch einmal angehen wollte habe ich ihn zum Glück gefunden.

      Hat auf Anhieb geklappt, auch wenn ich keine Ahnung habe, was da abläuft :?

      Adapter: Fritzbox, Unify Circuit
      Skripte: dynamic hue, Bluetooth Scan, Multi-Ereignisliste

      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

      705

      Online

      32.4k

      Users

      81.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