Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Husqvarna NextStartTimestamp über VIS ausgeben

    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

    Husqvarna NextStartTimestamp über VIS ausgeben

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

      Hallo Zusammen,
      Ich benutze den Husqvarna Adapter und erhalte einen Wert NextStartTimestamp.

      Um diesen Wert umzuformatieren habe ich folgenden Java Code gefunden:

      const nextStartTimestamp = 'husqvarna-automower.0.14474d9c-f9f7-4dd7-94c7-b25479xxxxx.planner.nextStartTimestamp'/Timestamp for the next auto start in milliseconds since 1970-01-01T00:00:00 in local time If the mower is charging then the value is the estimated time when it will be leaving the charging station If the value is 0 then the mower should start now NOTE! This timestamp is in local time for the mower and is coming directly from the mower/; // Beispiel-Zeitstempel (entspricht dem 25. März 2023 um 12:00 Uhr)

      const date = new Date(nextStartTimestamp);
      const year = date.getFullYear();
      const month = date.getMonth() + 1; // Monate sind 0-basiert, daher +1
      const day = date.getDate();
      const hours = date.getHours();
      const minutes = date.getMinutes();

      const formattedDate = ${day}.${month}.${year} um ${hours}:${minutes} Uhr;

      Mein Wunsch wäre nun ein Blockly zu haben (mit dem obigen JAVA Code integriert), dass alle 15Min diesen Wert (formattedDate) in eine Variable in IOBroker schreibt (z.B. eine Variable in 0_userdata), die ich in VIS anzeigen kann.
      Kann mir da jemand helfen?

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

        @knowhowseeker

        Blockly_temp.JPG

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

        Support us

        ioBroker
        Community Adapters
        Donate

        521
        Online

        31.9k
        Users

        80.1k
        Topics

        1.3m
        Posts

        2
        2
        114
        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