Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. JavaScript
    5. JSON Tabelle FuelPriceMonitor [Austria]

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    JSON Tabelle FuelPriceMonitor [Austria]

    This topic has been deleted. Only users with topic management privileges can see it.
    • sigi234
      sigi234 Forum Testing Most Active @papaechokilo last edited by sigi234

      @papaechokilo

      let telegramInstanz="";
      
      

      @papaechokilo sagte in JSON Tabelle FuelPriceMonitor [Austria]:

      in Zeile 4 "let telegramInstanz=""; "

      " zu viel

      P 1 Reply Last reply Reply Quote 0
      • P
        papaechokilo @sigi234 last edited by papaechokilo

        [gelöst]@sigi234 ja, stimmt. aber auch wenn ich es so eintrage let telgramInstanz=""; kommt derselbe Fehler. Weil in Zeile 236 sendTo(telegramInstanz, { steht und das kann nicht ausgeführt werden.

        sigi234 liv-in-sky 2 Replies Last reply Reply Quote 0
        • sigi234
          sigi234 Forum Testing Most Active @papaechokilo last edited by sigi234

          @papaechokilo sagte in JSON Tabelle FuelPriceMonitor [Austria]:

          @sigi234 ja, stimmt. aber auch wenn ich es so eintrage let telgramInstanz=""; kommt derselbe Fehler. Weil in Zeile 236 sendTo(telegramInstanz, { steht und das kann nicht ausgeführt werden.

          Zeig mal das Skript bis Zeile 35

          P 1 Reply Last reply Reply Quote 0
          • P
            papaechokilo @sigi234 last edited by papaechokilo

            [gelöst]@sigi234

            let anzahlAnzeige=30;
            let mySprit=["DIE"]; //oder ["GAS","DIE","SUP"] je nachdem, was man braucht
            let telegramInstanz="";  // wenn nicht genutzt:   let telegramInstanz="";
            let emailInstanz=""; //  hier email instanz eintragen z.B. "email.0" - bei "" wird keine mail gesendet
            let emailUser="xx@yyyy.at"
            // Die Bilder müssen unter /vis.0/Tankstellen liegen   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
             
            const config = getObject('system.config');
            const mylat =  config.common.latitude  //.replace(/(.*\..+?.+?.+?.+?.+?.+?).+/,"$1"); //*/"48.427656" //l
            const mylong = config.common.longitude  //.replace(/(.*\..+?.+?.+?.+?.+?.+?).+/,"$1"); log(mylat)
             
            const defaultPic="/vis.0/Tankstellen/default.png"
            const pictures=[{"firma":"BP","pic":"/vis.0/Tankstellen/bp.png"},
                           {"firma":"Genol","pic":"/vis.0/Tankstellen/genol.png"},
                           {"firma":"eni","pic":"/vis.0/Tankstellen/eni.png"},
                           {"firma":"Diskont","pic":"/vis.0/Tankstellen/diskont.png"},
                           {"firma":"Turmöl","pic":"/vis.0/Tankstellen/turmoel.png"},
                           {"firma":"paradies","pic":"/vis.0/Tankstellen/treibstoffparadies.png"},
                           {"firma":"Lohberger","pic":"/vis.0/Tankstellen/lohberger.png"},
                           {"firma":"SB-Tankstelle","pic":"/vis.0/Tankstellen/sb.jpg"},
                           {"firma":"Hofer","pic":"/vis.0/Tankstellen/hofer.png"},
                           {"firma":"AVIA","pic":"/vis.0/Tankstellen/avia.png"},
                           {"firma":"avanti","pic":"/vis.0/Tankstellen/avanti.png"},
                           {"firma":"Shell","pic":"/vis.0/Tankstellen/shell.png"},
                           {"firma":"Aral","pic":"/vis.0/Tankstellen/Aral.png"},
                           {"firma":"JET","pic":"/vis.0/Tankstellen/jet.png"},
                           {"firma":"Ultsch","pic":"/vis.0/Tankstellen/ultsch.png"},
                           {"firma":"bft","pic":"/vis.0/Tankstellen/bft.png"},
                           {"firma":"Spritkönig","pic":"/vis.0/Tankstellen/Spritkönig.png"},
                           {"firma":"Oil","pic":"/vis.0/Tankstellen/Oil.png"},
                           {"firma":"Lagerhaus","pic":"/vis.0/Tankstellen/Lagerhaus.png"},
                           {"firma":"Gelbmann","pic":"/vis.0/Tankstellen/Gelbmann.png"},
                           {"firma":"IQ","pic":"/vis.0/Tankstellen/IQ.jpg"}
                          ]
            
            code_text
            
            sigi234 1 Reply Last reply Reply Quote 0
            • liv-in-sky
              liv-in-sky @papaechokilo last edited by

              @papaechokilo

              du hast recht - habe ich nachträglich eingefügt und die abfrage vergessen - das einfügen:

              async function delTel(){
                  if(telegramInstanz!=""){
                  for (let b=0;b<mySprit.length;b++){await wait(2000);
                     if(getState('0_userdata.0.FUELPRICEMONITOR.'+mySprit[b]+'telegram_chatid').val!="") deletetext(mySprit[b]) // telegram reset !!
              }}}
              

              der teil gehört hier hin/ausgetauscht:

              Image 197.png

              1 Reply Last reply Reply Quote 0
              • sigi234
                sigi234 Forum Testing Most Active @papaechokilo last edited by sigi234

                @papaechokilo

                Zeile 3 Falsch

                let telegramInstanz="";  // wenn nicht genutzt:   let telegramInstanz="";
                
                1 Reply Last reply Reply Quote 0
                • M
                  mrfloppy @liv-in-sky last edited by

                  @liv-in-sky
                  Ichhabe noch immer ein paar tanken die tageweise keine KM anzeigen.
                  Gestern hatte sie aber noch eine Km anzeige.
                  Und in den Objecten unter der ID ist auch eine locatin drinnen.
                  Eine Idee was das sein könnte?

                  LG

                  liv-in-sky 2 Replies Last reply Reply Quote 0
                  • liv-in-sky
                    liv-in-sky @mrfloppy last edited by liv-in-sky

                    @mrfloppy kannst du mir mal ein bild deiner datenpunkte (ganzen tree) zeigen, mit den tanken, die keine km anzeige haben ?

                    1 Reply Last reply Reply Quote 0
                    • liv-in-sky
                      liv-in-sky @mrfloppy last edited by liv-in-sky

                      @mrfloppy ich meine die dp mit den location der tankstelle unter der instanz

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        mrfloppy @liv-in-sky last edited by mrfloppy

                        @liv-in-sky Screenshot 2023-02-13 115445.jpg Screenshot 2023-02-13 115250.jpg Screenshot 2023-02-13 115048.jpg

                        Wie gesagt an anderen Tagen stimmt die KM Angabe.

                        liv-in-sky 1 Reply Last reply Reply Quote 0
                        • liv-in-sky
                          liv-in-sky @mrfloppy last edited by

                          @mrfloppy seltsam - wie weit ist die von dir entfernt bzw was steht den sonst drin oder sollte drin stehen

                          M 1 Reply Last reply Reply Quote 0
                          • M
                            mrfloppy @liv-in-sky last edited by

                            @liv-in-sky
                            das kann ich nicht ganz genau sagen aber so 6-7 km.
                            Ich wei snur das gestern die Km drinnen gestanden sind aber halt ean einer anderen Position.
                            Ich beobachte das weiter

                            liv-in-sky 2 Replies Last reply Reply Quote 0
                            • liv-in-sky
                              liv-in-sky @mrfloppy last edited by

                              @mrfloppy ich denke. ich weiß den fehler - vermute ich eher

                              hier siehst du die id doppelt in den datenpunkten - wenn der wert null ist, wird die heimadresse angegeben - ich weiß nicht, warum das 2mal vorkommt

                              bitte prüfe das mal bei dir

                              Image 203.png
                              meine dp:
                              Image 202.png

                              1 Reply Last reply Reply Quote 0
                              • liv-in-sky
                                liv-in-sky @mrfloppy last edited by

                                @mrfloppy

                                ändere mal diese zeile 151

                                Image 204.png

                                das ist der code zum einsetzen:

                                else {if (ergebnis=="") ergebnis=mylat+','+mylong}
                                
                                M 2 Replies Last reply Reply Quote 0
                                • M
                                  mrfloppy @liv-in-sky last edited by

                                  @liv-in-sky
                                  Jetzt hat Aderklaa einen Km Angabe.
                                  Werde das beobachten
                                  DAnke

                                  Screenshot 2023-02-13 165807.jpg

                                  1 Reply Last reply Reply Quote 0
                                  • M
                                    mrfloppy @liv-in-sky last edited by

                                    @liv-in-sky
                                    schau mal

                                    Screenshot 2023-02-13 202548.jpg Screenshot 2023-02-13 165807.jpg

                                    vor 3Std hatte der Lohberger noch KM, jetzt nicht mehr.

                                    liv-in-sky 2 Replies Last reply Reply Quote 0
                                    • liv-in-sky
                                      liv-in-sky @mrfloppy last edited by

                                      @mrfloppy

                                      dann müßtest du bitte mal rausfinden, ob es wieder diese ID öfters als ordner gibt

                                      M 1 Reply Last reply Reply Quote 0
                                      • M
                                        mrfloppy @liv-in-sky last edited by mrfloppy

                                        @liv-in-sky sehe gerade was anderes-> schau mal
                                        dd8d397c-8133-45c2-9d84-ffcb3ee14c16-image.png
                                        da stimmt was mit der liste gar nicht
                                        der ist gar nicht auf Platz 2 (DP 1)

                                        Edit: Wenn ich das Script neu starte stimmt die JsonListe in der VIS
                                        Ist das Update deines Scriptes ev zu schnell? Und die DP noch nicht fertig geschrieben im FUELPRICE?

                                        liv-in-sky 1 Reply Last reply Reply Quote 0
                                        • liv-in-sky
                                          liv-in-sky @mrfloppy last edited by

                                          @mrfloppy hast du mal den browser refresht - evtl sind die dp nicht upgerdatet im admin

                                          M 1 Reply Last reply Reply Quote 0
                                          • M
                                            mrfloppy @liv-in-sky last edited by

                                            @liv-in-sky ja habe ich gehabt

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            484
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            5
                                            69
                                            3545
                                            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