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. Alexa2 History springt wild hin und her, Ausgabe im falschen raum

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    823

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

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

Alexa2 History springt wild hin und her, Ausgabe im falschen raum

Scheduled Pinned Locked Moved JavaScript
1 Posts 1 Posters 191 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
    ramses
    wrote on last edited by
    #1

    Hallo zusammen,

    ich habe ein kleines Script geschrieben, welches eigentlich nur eine Temperatur und CO-Wert-Ausgabe auf der Alexa machen soll, von der die Anfrage kam.
    Leider springt während des Scriptlaufs alexa2.0.History.name zwischen den Raumnamen (und Seriennummern) wild hin und her und zu 50% wird dann die Ausgabe im falschen Raum gemacht. Kann mir einer sagen was ich falsch mache? Eigentlich ist das Script so marginal das dort kaum Fehler sein könnten.

    Hier das Script:

    on({id:"javascript.0.klima.kz-klimaabfrage",change:'any'}, function (obj) {
        var TEMP1 = getState('netatmo.0.Micha.Kinderzimmer.Temperature.Temperature').val;
        var CO1 = getState('netatmo.0.Micha.Kinderzimmer.CO2.CO2').val;
        var HUMIDITY1 = getState('netatmo.0.Micha.Kinderzimmer.Humidity.Humidity').val;
        var LASTALEXA = 'alexa2.0.Echo-Devices.'+getState('alexa2.0.History.serialNumber').val+'.Commands.speak';
        var ALEXANAME = getState('alexa2.0.History.name').val;
    
    if (CO1>1000){
    setStateDelayed(LASTALEXA, '40;Die Temperatur beträgt ' + TEMP1 + ' Grad. Die Luftfeuchtigkeit beträgt ' + HUMIDITY1 + ' Prozent. Das Zimmer sollte gelüftet werden.',1000);
                 }
    else         {
    setStateDelayed(LASTALEXA, '40;Die Temperatur beträgt ' + TEMP1 + ' Grad. Die Luftfeuchtigkeit beträgt ' + HUMIDITY1 + ' Prozent. Das Zimmer muss nicht gelüftet werden.',1000);
                 }
       
    });
    
    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    Support us

    ioBroker
    Community Adapters
    Donate

    299

    Online

    32.8k

    Users

    82.7k

    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