Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Visualisierung
    4. basic - TimesValue Problem

    NEWS

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    • Neues Video über Aliase, virtuelle Geräte und Kategorien

    • Wir empfehlen: Node.js 22.x

    basic - TimesValue Problem

    This topic has been deleted. Only users with topic management privileges can see it.
    • Negalein
      Negalein Global Moderator last edited by

      Hallo

      Mein Widget zeigt plötzlich nur NaN.NaN.NaN
      Bis vor kurzem funktionierte das noch.

      Ist da etwas bekannt, bzw. gibt es andere Wege?

      c5d013bd-a399-42b6-8061-4db0cda52c2a-image.png

      Der DP ist ein String.

      {
        "common": {
          "read": true,
          "write": true,
          "desc": "Created by Node-Red",
          "role": "state",
          "name": "0_userdata.0.PAJ.date",
          "type": "string"
        },
        "native": {},
        "type": "state",
        "from": "system.adapter.node-red.0",
        "user": "system.user.admin",
        "ts": 1720307349784,
        "_id": "0_userdata.0.PAJ.date",
        "acl": {
          "object": 1636,
          "state": 1636,
          "owner": "system.user.admin",
          "ownerGroup": "system.group.administrator"
        }
      }
      
      Homoran 1 Reply Last reply Reply Quote 0
      • Homoran
        Homoran Global Moderator Administrators @Negalein last edited by

        @negalein sagte in basic - TimesValue Problem:

        Der DP ist ein String.

        ...und enthält welchen Wert?

        Negalein 1 Reply Last reply Reply Quote 0
        • Negalein
          Negalein Global Moderator @Homoran last edited by

          @homoran sagte in basic - TimesValue Problem:

          ...und enthält welchen Wert?

          20.07.2024 14:02:04

          ccf486a7-7949-484d-873f-525b4b7a0ce5-image.png

          Homoran 1 Reply Last reply Reply Quote 0
          • Homoran
            Homoran Global Moderator Administrators @Negalein last edited by

            @negalein sieht bei mir dann genau sonaus.

            umwandeln in typ Zahl und Eintrag eines Timestamp wie 1721388490000 klappt dann

            mickym 1 Reply Last reply Reply Quote 0
            • mickym
              mickym Most Active @Homoran last edited by

              Dann rechne halt in der Change Node nicht in ein Datum um, sondern multipliziere den Unixtimestamp mit 1000.

              Homoran Negalein 2 Replies Last reply Reply Quote 0
              • Homoran
                Homoran Global Moderator Administrators @mickym last edited by

                @mickym sagte in basic - TimesValue Problem:

                Dann rechne halt in der Change Node nicht in ein Datum um, sondern multipliziere den Unixtimestamp mit 1000.

                richtig!

                bin aber der falsche Adressat!

                1 Reply Last reply Reply Quote 0
                • Negalein
                  Negalein Global Moderator @mickym last edited by

                  @mickym sagte in basic - TimesValue Problem:

                  Dann rechne halt in der Change Node nicht in ein Datum um, sondern multipliziere den Unixtimestamp mit 1000.

                  Ah stimmt. Den Unix hatten wir ja in ein lesbares Format gewandelt.

                  $moment(payload,'X').locale("de").tz('Europe/Berlin').format('DD.MM.YYYY HH:mm:ss')

                  lösch ich einfach den Teil und hab dann wieder den Unix-Teil?

                  0a6db9ce-c0f8-4110-83e0-ea3943a9f642-image.png

                  mickym 1 Reply Last reply Reply Quote 0
                  • mickym
                    mickym Most Active @Negalein last edited by

                    @negalein Nein die Unixzeit dort ist nicht in ms.

                    Du schreibst unten in JSONATA einfach:

                    payload * 1000
                    
                    Homoran 1 Reply Last reply Reply Quote 0
                    • Homoran
                      Homoran Global Moderator Administrators @mickym last edited by

                      @mickym sagte in basic - TimesValue Problem:

                      @negalein Nein die Unixzeit dort ist nicht in ms.

                      Du schreibst unten in JSONATA einfach:

                      payload * 1000
                      

                      @Negalein
                      aber der DP muss vom Typ Zahl sein

                      1 Reply Last reply Reply Quote 0
                      • Negalein
                        Negalein Global Moderator last edited by

                        @Homoran
                        @mickym

                        Merci 🙂

                        e892d47e-d356-47db-b2e2-eaf56b83e8d5-image.png

                        1 Reply Last reply Reply Quote 0
                        • mickym
                          mickym Most Active last edited by mickym

                          Ach wenn man hier nicht immer alles mitlesen würde. 🙄 😁

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

                          Support us

                          ioBroker
                          Community Adapters
                          Donate

                          1.1k
                          Online

                          32.1k
                          Users

                          80.6k
                          Topics

                          1.3m
                          Posts

                          3
                          11
                          235
                          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