Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Tester
    4. Test Adapter Accuweather 2.x.x

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Test Adapter Accuweather 2.x.x

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

      @ticaki

      Ich würde vorschlagen, dass der Adapter ermittelt wann er zuletzt abgerufen hat. Sind die Daten älter als die Limit (1h/6h/12h) dann sollte er neu abrufen.

      Das würde auch Neuinstallationen abdecken und die Option an sich überflüssig machen ohne dass zu viele Request abgesetzt werden.

      T 1 Reply Last reply Reply Quote 0
      • T
        ticaki Developer @mcm1957 last edited by ticaki

        @mcm1957 sagte in Test Adapter Accuweather 2.x.x:

        @ticaki

        Ich würde vorschlagen, dass der Adapter ermittelt wann er zuletzt abgerufen hat. Sind die Daten älter als die Limit (1h/6h/12h) dann sollte er neu abrufen.

        Das würde auch Neuinstallationen abdecken und die Option an sich überflüssig machen ohne dass zu viele Request abgesetzt werden.

        Hab das mal umgesetzt.

        mcm1957 1 Reply Last reply Reply Quote 0
        • mcm1957
          mcm1957 @ticaki last edited by

          @ticaki said in Test Adapter Accuweather 2.x.x:

          @mcm1957 sagte in Test Adapter Accuweather 2.x.x:

          @ticaki

          Ich würde vorschlagen, dass der Adapter ermittelt wann er zuletzt abgerufen hat. Sind die Daten älter als die Limit (1h/6h/12h) dann sollte er neu abrufen.

          Das würde auch Neuinstallationen abdecken und die Option an sich überflüssig machen ohne dass zu viele Request abgesetzt werden.

          Hab das mal umgesetzt.


          Update direkt von Github ist erwünscht.

          Das will ich erst noch etwas bei mir laufen haben bevor ich ein release mache:

          Ich mußt die Anforderungen an den js-controller auf 7.0.6 anheben, da ich alles nach dem neusten Stand umgebaut habe, weiß ich nicht ob der 6er da mit allem klar kommt.

          WORK IN PROGRESS
          • (ticaki) Change: min. js-controller 7.0.6
          • (ticaki) Change: Outdated data is updated at startup.
          • (ticaki) New: Photo link added in current weather
          • (ticaki) New: Metric and Imperial are available for selection - Will be taken into account with the next data update.
          • (ticaki) New: In the event of a data retrieval error, an attempt is made again after 10 minute
          • (ticaki) Remove admin option (restart blocking)
          • (ticaki) Rewritten in Typescript

          Warum erstellst du für sowas nicht eine ALPHA Release. Die sind genau für solche Test sinnvoll.
          User sollten nur in Ausnahmefällen von Guthub installieren.

          Alpha Release sind ein definierter Stand, können von nom installiert werden und gehen nicht ins LATEST Repository. Also m.E. GENAU das was du hier haben willst.

          Bitte daher ne ALPHA erstellen und den Aufruf von Github zu installieren wieder entfernen.
          Danke

          T 1 Reply Last reply Reply Quote 0
          • T
            ticaki Developer @mcm1957 last edited by

            @mcm1957
            Entfernt alpha gibts keine

            mcm1957 1 Reply Last reply Reply Quote 0
            • mcm1957
              mcm1957 @ticaki last edited by

              @ticaki
              Warum keine Alpha?
              Oder schon "normale" release für Latest?

              T 1 Reply Last reply Reply Quote 0
              • T
                ticaki Developer @mcm1957 last edited by ticaki

                @mcm1957

                Haben wir ja ausdiskutiert 🙂

                Ich hab das apiproblem jetzt so gelöst das ich einen State mit dem Datum des letzten erfolgreichen Datenabrufs befülle und beim Start mir den state.ts davon ansehen ob der 1 Minute länger her ist als die maximale Zykluszeit. Das andere hab ich raus genommen.

                Es bleibt noch eines, das ich für stable noch lösen muß, der Adapter versucht jetzt bei erfolglosem Verbindungsversuch alle 10 Minuten daten abzurufen, das muß ich noch unterbinden für "too many api request". Aber nicht mehr heute.

                2.1.0-ALPHA.0 (2025-01-19)

                (ticaki) Change: min. js-controller to 6.0.11
                (ticaki) Change: Outdated data is updated at startup.
                (ticaki) New: Photo link added in current weather
                (ticaki) New: Metric and Imperial are available for selection - Will be taken into account with the next data update.
                (ticaki) New: In the event of a data retrieval error, an attempt is made again after 10 minute
                (ticaki) Remove admin option (restart blocking)
                (ticaki) Rewritten in Typescript

                installation siehe oben

                1 Reply Last reply Reply Quote 0
                • M
                  Micha 3 last edited by Micha 3

                  Grüße Dich, erstmal super der Adapter bisher. Aber mal ne blöde frage, könnte man nicht im Adapter die GPS-Position nutzen für die Location Key?
                  Hier https://developer.accuweather.com/accuweather-locations-api/apis/get/locations/v1/cities/geoposition/search kann man das einwandfrei bewerkstelligen. die Ausgabe erzeugt mir auch den richtigen "X-Location-Key:" am ende.
                  Nun weiß ich aber nicht wie ich das Eingeben/Abfragen kann und automatisch im Adapter eingetragen werden kann.
                  Ich habe über ein GPS-Empfänger die lat/lon Daten und schreibe sie über Blockly in einen Datenpunkt im Format lat,lon. Das funktioniert, diese daten in der Api eingetragen und ich bekomme den korrekten Location Key.
                  Unter https://dataservice.accuweather.com/locations/v1/cities/geoposition/search?apikey=xxxxxxxxxxxxx=lat,lon
                  steht dann {"Version":1,"Key":"(Location-Key),"Type":"City","Rank":83,"LocalizedName":......................

                  T 1 Reply Last reply Reply Quote 0
                  • T
                    ticaki Developer @Micha 3 last edited by

                    @micha-3

                    Mache bitte eine Issue mit diesen Informationen auf github auf, aktuell bin ich an was anderem dran. Wenn ich aber wieder Luft habe wäre der Einbau nicht das Problem bzw. vielleicht macht es ja jemand anderer.

                    1 Reply Last reply Reply Quote 0
                    • M
                      Micha 3 last edited by

                      Danke, gemacht.

                      1 Reply Last reply Reply Quote 0
                      • M
                        Micha 3 last edited by Micha 3

                        Hallo, ich hab es hinbekommen. es gibt mit Sicherheit einen besseren weg aber ich bin absoluter Neuling mit Blockly usw.
                        Ich weiß nun nicht wie ich den "Location Key" in den Adapter geschrieben bekomme.
                        Schöne Ostern euch noch.
                        .

                        <xml xmlns="https://developers.google.com/blockly/xml">
                          <variables>
                            <variable id="t{9+flX*7=dsZdJ6pUDs">Position</variable>
                            <variable id="InM51wH+hhRZ1K}Uo6R:">result</variable>
                          </variables>
                          <block type="on" id="4ru.qSpei2XH^rB2vH-S" x="-497" y="415">
                            <field name="OID">sonoff.0.Temp-GPS.GPS_Lat</field>
                            <field name="CONDITION">ne</field>
                            <field name="ACK_CONDITION"></field>
                            <statement name="STATEMENT">
                              <block type="update" id="h)dlnR3^Q.](=4QSEJ(b">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                <field name="OID">0_userdata.0.GPS.lat</field>
                                <field name="WITH_DELAY">FALSE</field>
                                <value name="VALUE">
                                  <block type="math_rndfixed" id="bnK{F#|CqXlA9xawHkpf">
                                    <field name="n">2</field>
                                    <value name="x">
                                      <shadow type="math_number" id=")M%}Y+;HO~[uh;VgZ{;(">
                                        <field name="NUM">3.1234</field>
                                      </shadow>
                                      <block type="get_value" id="3Eb+zb%2/#@Y9I9so4Op">
                                        <field name="ATTR">val</field>
                                        <field name="OID">sonoff.0.Temp-GPS.GPS_Lat</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <next>
                                  <block type="update" id="wW)4.o_sZ)fb.atnCmR/">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">0_userdata.0.GPS.lon</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="math_rndfixed" id="JcP!P6GG*4.MkJcUV$Ib">
                                        <field name="n">2</field>
                                        <value name="x">
                                          <shadow type="math_number" id="rCU]GgK3f!WC~Hog`l_3">
                                            <field name="NUM">3.1234</field>
                                          </shadow>
                                          <block type="get_value" id="L`):Oz%6hIWG2!kXZ7KX">
                                            <field name="ATTR">val</field>
                                            <field name="OID">sonoff.0.Temp-GPS.GPS_Lon</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="update" id="nP9xglS.aA[MbTbkYIl0">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                        <field name="OID">0_userdata.0.GPS.accuweather_GPS</field>
                                        <field name="WITH_DELAY">TRUE</field>
                                        <field name="DELAY_MS">200</field>
                                        <field name="UNIT">ms</field>
                                        <field name="CLEAR_RUNNING">FALSE</field>
                                        <value name="VALUE">
                                          <block type="text_join" id="q9N5_(eD8@Lo^lj|3N~2">
                                            <mutation items="3"></mutation>
                                            <value name="ADD0">
                                              <block type="get_value" id="%}aB6;vIAApy1bl/X+{i">
                                                <field name="ATTR">val</field>
                                                <field name="OID">0_userdata.0.GPS.lat</field>
                                              </block>
                                            </value>
                                            <value name="ADD1">
                                              <block type="text" id="KPp.^#63Ii89Zr{@h!d6">
                                                <field name="TEXT">,</field>
                                              </block>
                                            </value>
                                            <value name="ADD2">
                                              <block type="get_value" id="1I~Jd)wr|w~m]AAhkQfC">
                                                <field name="ATTR">val</field>
                                                <field name="OID">0_userdata.0.GPS.lon</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </statement>
                            <next>
                              <block type="schedule" id="vYdlZ#*^/Jl[Rjx_VzK:">
                                <field name="SCHEDULE">1 0 * * *</field>
                                <statement name="STATEMENT">
                                  <block type="request" id="HBz]y9px}77;NcpbI!aw">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                                    <field name="WITH_STATEMENT">TRUE</field>
                                    <field name="LOG"></field>
                                    <value name="URL">
                                      <shadow type="text" id="k|B7oOKzm7EWM^m6kbY(">
                                        <field name="TEXT">http://</field>
                                      </shadow>
                                      <block type="text_join" id="%AIgcwHNe/@sw*U01y$j">
                                        <mutation items="2"></mutation>
                                        <value name="ADD0">
                                          <block type="text" id="w`-_6V`Q}otb@4S:2plf">
                                            <field name="TEXT">https://dataservice.accuweather.com/locations/v1/cities/geoposition/search?apikey=xxxxxxxxxxxxx=</field>
                                          </block>
                                        </value>
                                        <value name="ADD1">
                                          <block type="get_value" id="SKOaXNue28T!,3USSm[}">
                                            <field name="ATTR">val</field>
                                            <field name="OID">0_userdata.0.GPS.accuweather_GPS</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="STATEMENT">
                                      <block type="variables_set" id="B.8O%)EDl50Pxp@#{+%.">
                                        <field name="VAR" id="t{9+flX*7=dsZdJ6pUDs">Position</field>
                                        <value name="VALUE">
                                          <block type="text_getSubstring" id="owiE8!SuQ*Q%@^B#G8=2">
                                            <mutation at1="true" at2="true"></mutation>
                                            <field name="WHERE1">FROM_START</field>
                                            <field name="WHERE2">FROM_START</field>
                                            <value name="STRING">
                                              <block type="variables_get" id="e4z]G)3d#LQfW2QN0ZM!">
                                                <field name="VAR" id="InM51wH+hhRZ1K}Uo6R:">result</field>
                                              </block>
                                            </value>
                                            <value name="AT1">
                                              <block type="math_number" id="/`f+By;MjuAQu~YW(O(4">
                                                <field name="NUM">21</field>
                                              </block>
                                            </value>
                                            <value name="AT2">
                                              <block type="math_number" id="6!?5#)73q+T{zE_B].7O">
                                                <field name="NUM">27</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="update" id="{b$:l~qpE|8N{)e*U6~I">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                            <field name="OID">0_userdata.0.GPS.accuweather_Position</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="convert_tonumber" id="QWY0%hWvBuBR#=3oK=L*">
                                                <value name="VALUE">
                                                  <block type="variables_get" id="AMy:l(Q?52+HV;3@1K@N">
                                                    <field name="VAR" id="t{9+flX*7=dsZdJ6pUDs">Position</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </statement>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                        </xml>
                        
                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        791
                        Online

                        31.7k
                        Users

                        79.8k
                        Topics

                        1.3m
                        Posts

                        4
                        15
                        540
                        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