This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Weather service not working anymore?
#69
I am all new to the LM and are on a steep learning path. I've been struggling to get the yr.no xml API script to work for my Yr location. However, after further inspections and testing I found out that the xml from norwegian locations have a subtle difference compared to other location. I could get all others to work, but not for any norwegian places.

For norwegian places you get an additional text section as below:

  <forecast>
    <text>
      <location name="Oslo">
        <time from="2019-12-06" to="2019-12-06">
          <title>Obs! Note!</title>
          <body>Tekstvarsel-tjenesten er nedlagt. The text forecast service is suspended</body>
        </time>
      </location>
    </text>

Because of this the first index to values must be 2 instead of 1. That eventually made things work for me. I don't know why nobody has mentioned this before. Maybe this is a recent change? Or is it me missing something here...?
Reply


Messages In This Thread
RE: Weather service not working anymore? - by dreamcatcher - 06.12.2019, 11:42

Forum Jump: