Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Umsetzung JS Logik nach Alias Konverter?

    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

    Umsetzung JS Logik nach Alias Konverter?

    This topic has been deleted. Only users with topic management privileges can see it.
    • paul53
      paul53 @chris299 last edited by

      @chris299 sagte: in der Alias Read-funktion überhaupt auf Date() zugreifen kann?

      Keine Ahnung: Probier es aus. getState() funktioniert mit Sicherheit nicht.

      Date.now()
      

      liefert auch die ms seit 1.1.1970.

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

        @chris299

        Was enthält "alias.0.TemperaturWohnzimmer.LastUpdate"?

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

          @paul53 so sieht das bei mir aus:
          3810c009-ca5b-48ac-903b-545ae66e9ffe-grafik.png

          c9949222-b568-4dcc-9e82-6b56e17ada22-grafik.png

          {
            "type": "state",
            "common": {
              "name": "Last update",
              "type": "string",
              "role": "value.datetime",
              "read": true,
              "write": false
            },
            "from": "system.adapter.netatmo.0",
            "user": "system.user.admin",
            "ts": 1630135482115,
            "_id": "netatmo.0.wetter@CW-(wetter@CW).Wohnzimmer.LastUpdate",
            "acl": {
              "object": 1636,
              "state": 1636,
              "file": 1632,
              "owner": "system.user.admin",
              "ownerGroup": "system.group.administrator"
            }
          }
          
          paul53 1 Reply Last reply Reply Quote 0
          • paul53
            paul53 @chris299 last edited by paul53

            @chris299
            Wie sieht der Wert ("string") aus?
            Wenn er sich wandeln lässt, kann alias.read für "0_userdata.0.Geraete.Netatmo_Wohnzimmer.error" so aussehen:

            Bild_2022-06-08_171511421.png

            C 2 Replies Last reply Reply Quote 0
            • C
              chris299 @paul53 last edited by

              @paul53 so: Wed Jun 08 2022 17:02:13 GMT+0200 (Central European Summer Time)

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

                @chris299 sagte: Wed Jun 08 2022 17:02:13 GMT+0200 (Central European Summer Time)

                Lässt sich wandeln (s.o.).

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

                  @paul53 das sieht sehr gut aus. vielen Dank!

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

                    @chris299 sagte: das sieht sehr gut aus.

                    Du musst allerdings dafür sorgen, dass der Zeitstempel des Datenpunktes regelmäßig aktualisiert wird, da es andernfalls nicht zur Prüfung kommt.

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

                      @paul53 den Hinweis verstehe ich nicht so richtig. meinst Du das hier: cf5cfd57-fa6f-444c-aa45-82ef65787de4-grafik.png
                      bzw wie kann ich dafür sorgen?

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

                        @chris299
                        Der Alias setzt voraus, dass der Original-Datenpunkt triggert, also seinen Zeitstempel ändert. Nur in diesem Moment kann die die Prüfung in alias.read erfolgen. Wenn der Datenpunkt allerdings "tot" ist, findet auch keine Prüfung statt.

                        C 2 Replies Last reply Reply Quote 0
                        • C
                          chris299 @paul53 last edited by

                          @paul53 danke. da muss ich mal beobachten, wie der Netatmo Adapter sich verhält.

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

                            @paul53 sieht leider so aus, als wären die Datenpunkte dann "tot" wenn das Gerät offline geht....

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

                            Support us

                            ioBroker
                            Community Adapters
                            Donate

                            759
                            Online

                            31.9k
                            Users

                            80.1k
                            Topics

                            1.3m
                            Posts

                            2
                            15
                            323
                            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