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. JavaScript
  5. [gelöst/verschwunden] Warnung bei setState eines Alias

NEWS

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

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

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.4k

[gelöst/verschwunden] Warnung bei setState eines Alias

Scheduled Pinned Locked Moved JavaScript
javascript
9 Posts 5 Posters 693 Views 4 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.
  • SchmakusS Offline
    SchmakusS Offline
    Schmakus
    Developer
    wrote on last edited by Schmakus
    #1

    Hallo zusammen,

    ich bin jetzt wirklich schon einige Jahre am JS programmieren und habe auch schon Adapter entwickelt, aber ich komme nicht darauf, warum mir ein Script ne Warnung ausspuckt, wenn ich einen Alias-State setzen möchte.
    Wenn ich mit denselben Parametern den original state setze, passt alles.

    Frage: Was ist am Alias anders? (Der Alias, wie auch der Original sind vom typ boolean)

    javascript.1	22:06:21.678	warn	at handleManualControl (script.js.common.Pool.Pooltechnik:386:31)
    javascript.1	22:06:21.678	warn	at Object.<anonymous> (script.js.common.Pool.Pooltechnik:329:9)
    

    Hier ein Auszug aus dem Script:

    const DP = {
        PUMP_POWER: 'alias.0.Steckdosen.Pooltechnik.state',
        PUMP_ENERGY: 'alias.0.Steckdosen.Pooltechnik.power',
        SALT_POWER: 'alias.0.Steckdosen.Pooltechnik.Chlorinator_state',
        SALT_ENERGY: 'alias.0.Steckdosen.Pooltechnik.Chlorinator_power',
        TELEGRAM: 'telegram.0'
    };
    
    async function handleManualControl(type, hours) {
       try {
    	const isPump = type === 'pump';
    	const powerDp = isPump ? DP.PUMP_POWER : DP.SALT_POWER;
    	await setStateAsync(powerDp, { val: true, ack: false });
       } catch (err) {
    	log(`❗ Fehler in handleManualControl(${type}): ${err.message}`, 'error');
       }
    }
    

    Dev of LightControl Adapter, Contributor of HUE and DoorBird Adapter

    HomoranH Marc BergM arteckA 3 Replies Last reply
    0
    • SchmakusS Schmakus

      Hallo zusammen,

      ich bin jetzt wirklich schon einige Jahre am JS programmieren und habe auch schon Adapter entwickelt, aber ich komme nicht darauf, warum mir ein Script ne Warnung ausspuckt, wenn ich einen Alias-State setzen möchte.
      Wenn ich mit denselben Parametern den original state setze, passt alles.

      Frage: Was ist am Alias anders? (Der Alias, wie auch der Original sind vom typ boolean)

      javascript.1	22:06:21.678	warn	at handleManualControl (script.js.common.Pool.Pooltechnik:386:31)
      javascript.1	22:06:21.678	warn	at Object.<anonymous> (script.js.common.Pool.Pooltechnik:329:9)
      

      Hier ein Auszug aus dem Script:

      const DP = {
          PUMP_POWER: 'alias.0.Steckdosen.Pooltechnik.state',
          PUMP_ENERGY: 'alias.0.Steckdosen.Pooltechnik.power',
          SALT_POWER: 'alias.0.Steckdosen.Pooltechnik.Chlorinator_state',
          SALT_ENERGY: 'alias.0.Steckdosen.Pooltechnik.Chlorinator_power',
          TELEGRAM: 'telegram.0'
      };
      
      async function handleManualControl(type, hours) {
         try {
      	const isPump = type === 'pump';
      	const powerDp = isPump ? DP.PUMP_POWER : DP.SALT_POWER;
      	await setStateAsync(powerDp, { val: true, ack: false });
         } catch (err) {
      	log(`❗ Fehler in handleManualControl(${type}): ${err.message}`, 'error');
         }
      }
      
      HomoranH Offline
      HomoranH Offline
      Homoran
      Global Moderator Administrators
      wrote on last edited by
      #2

      @schmakus was ist denn die Fehlermeldung?
      die kommt ja vorher.
      Was du zeigst ist nur wo sich der Fehler verstecken sollte

      kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

      Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

      der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

      SchmakusS 1 Reply Last reply
      1
      • HomoranH Homoran

        @schmakus was ist denn die Fehlermeldung?
        die kommt ja vorher.
        Was du zeigst ist nur wo sich der Fehler verstecken sollte

        SchmakusS Offline
        SchmakusS Offline
        Schmakus
        Developer
        wrote on last edited by
        #3

        @homoran sagte in Warnung bei setState eines Alias:

        @schmakus was ist denn die Fehlermeldung?
        die kommt ja vorher.
        Was du zeigst ist nur wo sich der Fehler verstecken sollte

        Ne, die Warnung kommt immer beim setState

        Wie gesagt, ändere ich z.B. die ID von PUMP_POWER auf die originale ID vom Z2M Adapter, kommt keine Warnung mehr

        Dev of LightControl Adapter, Contributor of HUE and DoorBird Adapter

        HomoranH 1 Reply Last reply
        0
        • SchmakusS Schmakus

          Hallo zusammen,

          ich bin jetzt wirklich schon einige Jahre am JS programmieren und habe auch schon Adapter entwickelt, aber ich komme nicht darauf, warum mir ein Script ne Warnung ausspuckt, wenn ich einen Alias-State setzen möchte.
          Wenn ich mit denselben Parametern den original state setze, passt alles.

          Frage: Was ist am Alias anders? (Der Alias, wie auch der Original sind vom typ boolean)

          javascript.1	22:06:21.678	warn	at handleManualControl (script.js.common.Pool.Pooltechnik:386:31)
          javascript.1	22:06:21.678	warn	at Object.<anonymous> (script.js.common.Pool.Pooltechnik:329:9)
          

          Hier ein Auszug aus dem Script:

          const DP = {
              PUMP_POWER: 'alias.0.Steckdosen.Pooltechnik.state',
              PUMP_ENERGY: 'alias.0.Steckdosen.Pooltechnik.power',
              SALT_POWER: 'alias.0.Steckdosen.Pooltechnik.Chlorinator_state',
              SALT_ENERGY: 'alias.0.Steckdosen.Pooltechnik.Chlorinator_power',
              TELEGRAM: 'telegram.0'
          };
          
          async function handleManualControl(type, hours) {
             try {
          	const isPump = type === 'pump';
          	const powerDp = isPump ? DP.PUMP_POWER : DP.SALT_POWER;
          	await setStateAsync(powerDp, { val: true, ack: false });
             } catch (err) {
          	log(`❗ Fehler in handleManualControl(${type}): ${err.message}`, 'error');
             }
          }
          
          Marc BergM Offline
          Marc BergM Offline
          Marc Berg
          Most Active
          wrote on last edited by Marc Berg
          #4

          @schmakus sagte in Warnung bei setState eines Alias:

          Was ist am Alias anders?

          Eventuell eine Writefunktion /-konverter im Alias, die dazwischen spuckt?

          NUC10I3+Ubuntu+Docker+ioBroker+influxDB2+Node Red+EMQX+Grafana

          Pi-hole, Traefik, Checkmk, Conbee II+Zigbee2MQTT, ESPSomfy-RTS, LoRaWAN, Arduino, KiCad

          Benutzt das Voting im Beitrag, wenn er euch geholfen hat.

          SchmakusS 1 Reply Last reply
          0
          • Marc BergM Marc Berg

            @schmakus sagte in Warnung bei setState eines Alias:

            Was ist am Alias anders?

            Eventuell eine Writefunktion /-konverter im Alias, die dazwischen spuckt?

            SchmakusS Offline
            SchmakusS Offline
            Schmakus
            Developer
            wrote on last edited by
            #5

            @marc-berg sagte in Warnung bei setState eines Alias:

            @schmakus sagte in Warnung bei setState eines Alias:

            Was ist am Alias anders?

            Eventuell eine Writefunktion im Alias, die dazwischen spuckt?

            Keine Funktionen und Formel aktiv. Simpler Alias...eigentlich.

            Dev of LightControl Adapter, Contributor of HUE and DoorBird Adapter

            mcm1957M 1 Reply Last reply
            0
            • SchmakusS Schmakus

              @homoran sagte in Warnung bei setState eines Alias:

              @schmakus was ist denn die Fehlermeldung?
              die kommt ja vorher.
              Was du zeigst ist nur wo sich der Fehler verstecken sollte

              Ne, die Warnung kommt immer beim setState

              Wie gesagt, ändere ich z.B. die ID von PUMP_POWER auf die originale ID vom Z2M Adapter, kommt keine Warnung mehr

              HomoranH Offline
              HomoranH Offline
              Homoran
              Global Moderator Administrators
              wrote on last edited by
              #6

              @schmakus sagte in Warnung bei setState eines Alias:

              Ne, die Warnung kommt immer beim setState

              ist ja durchaus möglich.
              Aber die Meldung ist immer mehrteilig.

              Ein ERROR in dem der Fehler steht, danach ein bis mehrere Warn mit weiteren Details

              @schmakus sagte in Warnung bei setState eines Alias:

              ein Auszug aus dem Script:

              sind da die original Zeilen 329 und 386 dabei?
              wenn ja, welche sind das?

              kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

              Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

              der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

              1 Reply Last reply
              0
              • SchmakusS Schmakus

                @marc-berg sagte in Warnung bei setState eines Alias:

                @schmakus sagte in Warnung bei setState eines Alias:

                Was ist am Alias anders?

                Eventuell eine Writefunktion im Alias, die dazwischen spuckt?

                Keine Funktionen und Formel aktiv. Simpler Alias...eigentlich.

                mcm1957M Online
                mcm1957M Online
                mcm1957
                wrote on last edited by
                #7

                @schmakus
                Zeig bitte den ganzen Log - mindestens 10 bis 20 Zeilen vorher

                javascript.1	22:06:21.678	warn	at handleManualControl (script.js.common.Pool.Pooltechnik:386:31)
                javascript.1	22:06:21.678	warn	at Object.<anonymous> (script.js.common.Pool.Pooltechnik:329:9)
                

                Dass da nur 'at...' steht wär sehr ungewöhnlich. Da sollte auch ne Fehlermeldung stehen.

                Entwicklung u Betreuung: envertech-pv, hoymiles-ms, ns-client, pid, snmp Adapter;
                Support Repositoryverwaltung.

                Wer Danke sagen will, kann nen Kaffee spendieren: https://paypal.me/mcm1957atiobroker

                LESEN - gute Forenbeitrage

                1 Reply Last reply
                0
                • SchmakusS Schmakus

                  Hallo zusammen,

                  ich bin jetzt wirklich schon einige Jahre am JS programmieren und habe auch schon Adapter entwickelt, aber ich komme nicht darauf, warum mir ein Script ne Warnung ausspuckt, wenn ich einen Alias-State setzen möchte.
                  Wenn ich mit denselben Parametern den original state setze, passt alles.

                  Frage: Was ist am Alias anders? (Der Alias, wie auch der Original sind vom typ boolean)

                  javascript.1	22:06:21.678	warn	at handleManualControl (script.js.common.Pool.Pooltechnik:386:31)
                  javascript.1	22:06:21.678	warn	at Object.<anonymous> (script.js.common.Pool.Pooltechnik:329:9)
                  

                  Hier ein Auszug aus dem Script:

                  const DP = {
                      PUMP_POWER: 'alias.0.Steckdosen.Pooltechnik.state',
                      PUMP_ENERGY: 'alias.0.Steckdosen.Pooltechnik.power',
                      SALT_POWER: 'alias.0.Steckdosen.Pooltechnik.Chlorinator_state',
                      SALT_ENERGY: 'alias.0.Steckdosen.Pooltechnik.Chlorinator_power',
                      TELEGRAM: 'telegram.0'
                  };
                  
                  async function handleManualControl(type, hours) {
                     try {
                  	const isPump = type === 'pump';
                  	const powerDp = isPump ? DP.PUMP_POWER : DP.SALT_POWER;
                  	await setStateAsync(powerDp, { val: true, ack: false });
                     } catch (err) {
                  	log(`❗ Fehler in handleManualControl(${type}): ${err.message}`, 'error');
                     }
                  }
                  
                  arteckA Offline
                  arteckA Offline
                  arteck
                  Developer Most Active
                  wrote on last edited by
                  #8

                  @schmakus sagte in Warnung bei setState eines Alias:

                  Frage: Was ist am Alias anders? (Der Alias, wie auch der Original sind vom typ boolean)

                  schau dir das RAW object an ...

                  zigbee hab ich, zwave auch, nuc's genauso und HA auch

                  SchmakusS 1 Reply Last reply
                  0
                  • arteckA arteck

                    @schmakus sagte in Warnung bei setState eines Alias:

                    Frage: Was ist am Alias anders? (Der Alias, wie auch der Original sind vom typ boolean)

                    schau dir das RAW object an ...

                    SchmakusS Offline
                    SchmakusS Offline
                    Schmakus
                    Developer
                    wrote on last edited by
                    #9

                    Leute, was soll ich sagen….. Problem hat sich in Luft aufgelöst. Keine Ahnung. War von heute auf morgen verschwunden. 🤷‍♂️🤷‍♂️

                    Dev of LightControl Adapter, Contributor of HUE and DoorBird Adapter

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


                    Support us

                    ioBroker
                    Community Adapters
                    Donate

                    312

                    Online

                    32.6k

                    Users

                    82.3k

                    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