Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. kürzere Variante von Übersetzungen einer Werteliste möglich?

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    kürzere Variante von Übersetzungen einer Werteliste möglich?

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

      @homoran sagte: mit Liste und Trennzeichen ;

      Ansatz mit führender "0" bis 9:

      Blockly_temp.JPG

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

        @paul53 Danke!

        das verdau ich jetzt mal

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

          @homoran
          Version ohne führende "0":

          Blockly_temp.JPG

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

            @paul53 sowas hab ich auch versucht
            aber so

            Screenshot_20240108-184011_Firefox.jpg

            das klappte nicht. auch nicht mit anderen Werten

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

              @paul53 jetzt leider das gleiche Ergebnis

              Screenshot_20240108-184604_Firefox.jpg

              A paul53 2 Replies Last reply Reply Quote 0
              • A
                Ahnungsbefreit @Homoran last edited by

                @homoran Ich hätte noch eine kürzere Version Deines Scripts als Alternative im Angebot, aber ohne Pauls's automatische Extraktion der Werte:

                1e84d2fd-65df-403a-bbaf-3670642205e4-image.png

                Die OID sind natürlich noch auf Deine DP anzupassen.

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

                  @homoran sagte: leider das gleiche Ergebnis

                  Kann ich nicht nachvollziehen:

                  Blockly_temp.JPG

                  Prüfst Du auf Wert < 10?

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

                    @homoran sagte: aber so

                    Mit Wert als selbst erstellte Variable?

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

                      @paul53 sagte in kürzere Variante von Übersetzungen einer Werteliste möglich?:

                      Prüfst Du auf Wert < 10?

                      ja!
                      hab schon 3x gegengeprüft

                      ich kann bei true 2 oder 3 eingeben, es fehlt das erste Zeichen, bei 4 fehlen die ersten 2

                      @ahnungsbefreit sagte in kürzere Variante von Übersetzungen einer Werteliste möglich?:

                      Ich hätte noch eine kürzere Version Deines Scripts als Alternative im Angebot,

                      ja, mit case hätte ich trotzdem 30 Zeilen

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

                        @paul53 sagte in kürzere Variante von Übersetzungen einer Werteliste möglich?:

                        Mit Wert als selbst erstellte Variable?

                        😱 Natürlich nicht

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

                          aber warum kommt beim debug von i der ganze Wert?

                          javascript.1
                          	2024-01-08 18:51:29.197	info	script.js.Victron.Wandsolardaten: Input current too high
                          javascript.1
                          	2024-01-08 18:51:29.196	info	script.js.Victron.Wandsolardaten: 34=Input current too high
                          javascript.1
                          	2024-01-08 18:51:22.253	info	script.js.Victron.Wandsolardaten: Charger temperature too high
                          javascript.1
                          	2024-01-08 18:51:22.252	info	script.js.Victron.Wandsolardaten: 17=Charger temperature too high
                          javascript.1
                          	2024-01-08 18:51:17.433	info	script.js.Victron.Wandsolardaten: attery voltage sense miswired (-)
                          javascript.1
                          	2024-01-08 18:51:17.433	info	script.js.Victron.Wandsolardaten: 7=Battery voltage sense miswired (-)
                          javascript.1
                          	2024-01-08 18:51:11.857	info	script.js.Victron.Wandsolardaten: o error
                          javascript.1
                          	2024-01-08 18:51:11.856	info	script.js.Victron.Wandsolardaten: 0=No error
                          

                          hier nochmal das zugehörige Blockly
                          Screenshot_20240108-185858_Firefox.jpg

                          Aber Danke, Paul.
                          Das Prinzip steht, den Fehler find ich noch!

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

                            @paul53 ich hab's !
                            ich hab i statt wert

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

                              @homoran sagte: wert

                              Welche Javascript-Version? Die muss uralt sein, wenn Wert so aussieht wie in Deinem Bild.

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

                                @paul53 sagte in kürzere Variante von Übersetzungen einer Werteliste möglich?:

                                Die muss uralt sein,

                                ja!
                                Neuinstallation ist inzwischen fertig, muss noch backuppen und restoren.

                                jetzt klappts auch so
                                Screenshot_20240108-190511_Firefox.jpg

                                javascript.1
                                	2024-01-08 19:05:43.727	info	script.js.Victron.Wandsolardaten: Input current too high
                                javascript.1
                                	2024-01-08 19:05:43.727	info	script.js.Victron.Wandsolardaten: 34=Input current too high
                                javascript.1
                                	2024-01-08 19:05:39.068	info	script.js.Victron.Wandsolardaten: Charger temperature too high
                                javascript.1
                                	2024-01-08 19:05:39.068	info	script.js.Victron.Wandsolardaten: 17=Charger temperature too high
                                javascript.1
                                	2024-01-08 19:05:34.559	info	script.js.Victron.Wandsolardaten: Battery voltage sense miswired (-)
                                javascript.1
                                	2024-01-08 19:05:34.558	info	script.js.Victron.Wandsolardaten: 7=Battery voltage sense miswired (-)
                                javascript.1
                                	2024-01-08 19:05:30.440	info	script.js.Victron.Wandsolardaten: No error
                                javascript.1
                                	2024-01-08 19:05:30.439	info	script.js.Victron.Wandsolardaten: 0=No error
                                
                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post

                                Support us

                                ioBroker
                                Community Adapters
                                Donate

                                829
                                Online

                                32.0k
                                Users

                                80.4k
                                Topics

                                1.3m
                                Posts

                                3
                                17
                                238
                                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