Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. English
    3. Scripting / Logic
    4. JavaScript
    5. how to stop instance of an adapter ?

    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

    how to stop instance of an adapter ?

    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      koburg last edited by

      how do I stop an instance of an adapter like Synology.0.stop don't seem to work

      please make a small script example if you like to help me.

      i want to stop the instance when a variable is true.

      paul53 1 Reply Last reply Reply Quote 0
      • paul53
        paul53 @koburg last edited by paul53

        @koburg
        See example for function extendObject()

        K 1 Reply Last reply Reply Quote 0
        • K
          koburg @paul53 last edited by

          @paul53

          great so script if a variable get true something like this ?

          
          if (getState("0_userdata.0.allan.New_object").val == true) {
            extendObject('adapter.system.synology.0', {common: {enabled: false}});
          }
          
          

          what else would I need ?

          paul53 1 Reply Last reply Reply Quote 0
          • paul53
            paul53 @koburg last edited by paul53

            @koburg
            Better with trigger:

            on({id: "0_userdata.0.allan.New_object", val: true}, function() {
               extendObject('adapter.system.synology.0', {common: {enabled: false}});
            });
            
            K 1 Reply Last reply Reply Quote 0
            • K
              koburg @paul53 last edited by

              @paul53 sorry but I can not get it working if the variable is true it is not disable/pause the instance nothing happen.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              Support us

              ioBroker
              Community Adapters
              Donate

              449
              Online

              31.9k
              Users

              80.1k
              Topics

              1.3m
              Posts

              3
              5
              661
              Loading More Posts
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes
              Reply
              • Reply as topic
              Log in to reply
              Community
              Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
              The ioBroker Community 2014-2023
              logo