[UPDATED] Weewx Weather Driver With External Forecasting

What is the forecastIcon data on the driver?

Just flipped to my MacOS dashboard to see what time it was at your house, and I noticed how ridiculous the bleeding sun icon is on the Yahoo weather widget :rofl:

41%20AM

1 Like

cloudy

The thing to do is compare the apixu 'forecastIcon' to the WU one.
If they are the same then in theory they should show the same icon.

It's 7:42 AM here :slight_smile:

I trust you've had your tea? If not, this can wait :wink:

This is what Apixu shows...

  • forecastIcon : nt_cloudy.

That’s because apixu differentiates between night and day but wu doesn’t seem to
In the weewx driver I’ve mapped the apixu icons to day and night so that should be ok.
I have guests this weekend so I’ll have a look on monday if there is anything I can do to try and get wu to report day/night

1 Like

Enjoy! Time for me to sleep before the sun's up :grin:

So I was going through all my apps/drivers and seeing if there were any updates...

Noticed this one had an update, so I went ahead and updated my daily.json and then the driver. Now I'm getting an error... :grin:

Trying different stuff here... one thing I noticed is that I can copy the new json over and it looks OK. Save it, open it up and it looks good. No data but everything looks ok. Then I wait for it to update. After it updates, I open up the json again and the new stuff is gone in the 'sinceMidnight' section.

I've updated the daily.json and the Hubitat driver... Am I missing something?

I’m not near my pc at the moment so can’t do a lot (ipad coding isn’t pretty!)

There is a problem with the json file I think.

I think there is an extra ‘ } ‘ on line 51

Try removing that and save.

I think that might fix it.

Andy

No luck. I tried it a bunch of different ways and each time when weewx would update, it would have blank spaces in the json like it found nothing to put there.

What I was successful with is going into your new code and removing the 4 min and max sections. So now at least I don't get the errors and my Weather Switch devices will still work. :smiley:

Hi Bryan
so did you remove them from the json file?

No, that's what I can't figure out. I change it, check that it is changed...then weewx updates and it's gone.

This is my latest try... your original code this time (I've tried 5 different versions) I'll update in a minute with what it changes it to.

Bryan
can you do me a favour?
can you 'browse' to the json file with a browser so you can see the output (after it has updated) please

I want to see the actual output from the json file.
It may be that the values are just 'null' so I can compensate for that

Andy

Here's what it looks like after it updates...
Edit: HA! I read your mind!

That's really weird!
weewx should not be able to update/edit the json file...

I have no idea what is happening here..

This is the output from my json file...

{
  "title":"Current Values",
  "location":"South Hetton",
  "time":"22/10/18 00:45:00",
  "lat":"54° 47.88' N",
  "lon":"001° 24.41' W",
  "alt":"328 feet",
  "hardware":"observer",
  "uptime":"40 days, 11 hours, 28 minutes",
  "serverUptime":"40 days, 10 hours, 41 minutes",
  "weewxVersion":"3.8.0",
  "stats": {
    "current": {
      "outTemp":"6.1°C",
      "windchill":"6.1°C",
      "heatIndex":"6.1°C",
      "dewpoint":"3.0°C",
      "humidity":"81%",
      "insideHumidity":"48%",
      "barometer":"1015.7 mbar",
      "barometerTrendDelta":"3 hours",
      "barometerTrendData":"1.2 mbar",
      "windSpeed":"0 mph",
      "windDir":"245°",
      "windDirText":"WSW",
      "windGust":"5 mph",
      "windGustDir":"   N/A",
      "rainRate":"0.0 mm/hr",
      "UV":"0.0",
      "solarRadiation":"0 W/m²",
      "insideTemp":"21.9°C"

    },
   "sinceMidnight": {
      "rainSum":"0.0 mm",
      "maxtemptoday":"6.6°C",
      "mintemptoday":"6.0°C",
      "maxinsidetemptoday":"22.0°C",
      "mininsidetemptoday":"21.9°C"
}
},
  "almanac":{
    "sun":{
      "startCivilTwilight":"07:10:09",
      "sunrise":"07:47:45",
      "transit":"12:50:06",
      "sunset":"17:51:32",
      "endCivilTwilight":"18:29:05",
      "azimuth":"358.2°",
      "altitude":"-46.1°",
      "rightAscension":"206.5°",
      "declination":"-10.9°",
      "equinox":"20/03/19 21:58:31",
      "solstice":"21/12/18 22:22:34"
    },
    "moon":{
      "rise":"17:39:19",
      "transit":"23:38:07",
      "set":"04:37:44",
      "azimuth":"210.2°",
      "altitude":"25.1°",
      "rightAscension":"357.9°",
      "declination":"-6.0°",
      "fullMoon":"24/10/18 17:45:11",
      "newMoon":"07/11/18 16:02:03",
      "phase":"Waxing gibbous",
      "fullness":"92%"
    }
  }
}

I've completely deleted the file and recreated it too. Could it be getting the template from somewhere else?

I wonder if I added additional things to the config files in weewx??
I did this so long ago I don't remember