[UPDATED] Weewx Weather Driver With External Forecasting

If you look at the last weewx update it is showing 16.00 for some reason
Are you using my Pi image (if so you forgot to set the time zone)

Yes, your image. I did forget, but that shouldn't affect wind correct? I have wind direction now, but no wind data. WU is showing light 2.1 KM/hr winds, and Custom WU driver is reporting too. So somethings not right from the Weewx driver. I tried loading the old Apixu driver and it also does not report wind.

Are you reliant on Apixu for that or does it capture straight from Weewx?

[Edit] If I enter the Apixu key, I get wind direction instead of "No Station Data", but I still get "null" wind speed and gust. Loaded the old Apixu driver and it's the same. Getting WU reporting though, so I don't think Weewx is misconfigured.

What is your json file reporting about wind?

a wind figure wonā€™t appear until your station reports it and it appears in the json file

Wind data should come directly from weewx (if your station reports it)

How do I check that? Just what I see in the default skin?

[Edit]

If I do tail -f /var/log/syslog

I get

Aug 8 12:36:55 Weewx-Pi weewx[367]: interceptor: MainThread: parse failed for &PASSKEY=***&stationtype=WS-0900-IP&dateutc=2018-08-08+16:36:54&winddir=176&windspeedmph=0.00&windgustmph=2.68&maxdailygust=8.05&tempf=79.0&humidity=81&hourlyrainin=0.00&dailyrainin=0.21&weeklyrainin=1.30&monthlyrainin=1.30&yearlyrainin=1.49&totalrainin=1.49&tempinf=79.0&humidityin=76&baromrelin=29.92&baromabsin=29.57: dictionary update sequence element #0 has length 1; 2 is required

I remembered how to find it :grin:
So it's reporting wind in the json, but not getting it in the driver for some reason.

"title" : "Current Values" ,

"location" : "The Beach , Toronto" ,

"time" : "08/08/18 13 : 15 : 00" ,

"alt" : "89 meters" ,

"hardware" : "observer" ,

"uptime" : "0 days , 0 hours , 27 minutes" ,

"serverUptime" : "0 days , 0 hours , 43 minutes" ,

"weewxVersion" : "3.8.0" ,

"stats" : {

"current" : {

"outTemp" : "26.7°C" ,

"windchill" : "26.7°C" ,

"heatIndex" : "27.6°C" ,

"dewpoint" : "22.7°C" ,

"humidity" : "79%" ,

"insideHumidity" : "76%" ,

"barometer" : "1013.1 mbar" ,

"barometerTrendDelta" : "3 hours" ,

"barometerTrendData" : "-0.4 mbar" ,

"windSpeed" : "3 km/h" ,

"windDir" : "172°" ,

"windDirText" : "S" ,

"windGust" : "9 km/h" ,

"windGustDir" : " N/A" ,

"rainRate" : "0.0 mm/hr" ,

Can you turn on the logging in the driver and have a look for any errors in the live logs please?

Sure. Saw your previous post, but was cooking dinner and couldn't manage to copy those line on my phone. Doesn't look like they were what you thought they were. I've turned on logging and will let you know if any errors come up.

I realised I was looking at the wrong version of the driver - thatā€™s why I deleted the question :slight_smile:

Iā€™m usually 2 or 3 ahead of what I release.

Please let me know if the logs show anything as it seems to be working here ok.

Andy

2.10 is what's posted now? Just realized I have version 2.00
I would have sworn that I copied over the code.

I might have forgotten to change the version number at the bottom of the file
Easiest way to find out is to look at the ā€˜changesā€™ at the top of the file.

No, it was my error. I've got the most recent code in there now. Still getting Null. Took a bit to get the logging to stay enabled for some reason. Checking for errors now.

No errors. It shows 0 km/h in the log instead of Null. Odd to me, but is it normal?

dev:11082018-08-08 20:06:20.384:infoWeewx Driver - INFO: response data: [location:[name:Leaside, region:Ontario, country:Canada, lat:43.67, lon:-79.29, tz_id:America/Toronto, localtime_epoch:1533773180, localtime:2018-08-08 20:06], current:[last_updated_epoch:1533772821, last_updated:2018-08-08 20:00, temp_c:25.0, temp_f:77.0, is_day:1, condition:[text:Partly cloudy, icon://cdn.apixu.com/weather/64x64/day/116.png, code:1003], wind_mph:5.6, wind_kph:9.0, wind_degree:20, wind_dir:NNE, pressure_mb:1009.0, pressure_in:30.3, precip_mm:0.4, precip_in:0.02, humidity:79, cloud:75, feelslike_c:27.0, feelslike_f:80.7, vis_km:24.0, vis_miles:14.0], forecast:[forecastday:[, uv:5.8], astro:[sunrise:06:14 AM, sunset:08:31 PM, moonrise:02:55 AM, moonset:06:20 PM]], , uv:7.2], astro:[sunrise:06:15 AM, sunset:08:29 PM, moonrise:03:57 AM, moonset:07:19 PM]], , uv:7.4], astro:[sunrise:06:16 AM, sunset:08:28 PM, moonrise:05:06 AM, moonset:08:10 PM]]]]]

dev:11082018-08-08 20:06:20.380:infoWeewx Driver - INFO: response contentType: application/json

dev:11082018-08-08 20:06:20.379:infoWeewx Driver - INFO: params2: [:]

dev:11082018-08-08 20:06:20.378:infoWeewx Driver - INFO: Response2: Via : 1.1 google

dev:11082018-08-08 20:06:20.377:infoWeewx Driver - INFO: Response2: Date : Thu, 09 Aug 2018 00:06:19 GMT

dev:11082018-08-08 20:06:20.376:infoWeewx Driver - INFO: Response2: access-control-allow-headers : content-type

dev:11082018-08-08 20:06:20.375:infoWeewx Driver - INFO: Response2: access-control-allow-origin : *

dev:11082018-08-08 20:06:20.374:infoWeewx Driver - INFO: Response2: X-Powered-By : ASP.NET

dev:11082018-08-08 20:06:20.373:infoWeewx Driver - INFO: Response2: Access-Control-Expose-Headers : Request-Context

dev:11082018-08-08 20:06:20.372:infoWeewx Driver - INFO: Response2: Request-Context : appId=cid-v1:deb1a0bf-3522-4f78-b38f-04a889c6a745

dev:11082018-08-08 20:06:20.371:infoWeewx Driver - INFO: Response2: X-StackifyID : V1|d96a9b84-5047-48ed-a01d-a2ad7027550c|C59032|CD18|

dev:11082018-08-08 20:06:20.370:infoWeewx Driver - INFO: Response2: Content-Type : application/json; charset=utf-8

dev:11082018-08-08 20:06:20.368:infoWeewx Driver - INFO: Response2: Cache-Control : private

dev:11082018-08-08 20:06:20.019:debugWeewx Driver - DEBUG: Apixu: Poll called

dev:11082018-08-08 20:04:38.087:infoWeewx Driver - INFO: FeelsLike Input = C - Output = C --No conversion required

dev:11082018-08-08 20:04:38.086:infoWeewx Driver - INFO: Checking WindChill

dev:11082018-08-08 20:04:38.085:infoWeewx Driver - INFO: Checking UV

dev:11082018-08-08 20:04:38.083:infoWeewx Driver - INFO: Temperature Input = C - Output = C --No conversion required

dev:11082018-08-08 20:04:38.081:infoWeewx Driver - INFO: Checking Temperature

dev:11082018-08-08 20:04:38.080:infoWeewx Driver - INFO: RainToday Input = mm - Output = mm --No conversion required

dev:11082018-08-08 20:04:38.079:infoWeewx Driver - INFO: Checking Rain Today

dev:11082018-08-08 20:04:38.077:infoWeewx Driver - INFO: Rainrate Input = mm/hr - Output = mm/hr --No conversion required

dev:11082018-08-08 20:04:38.076:infoWeewx Driver - INFO: Checking Rain Rate

dev:11082018-08-08 20:04:38.075:infoWeewx Driver - INFO: InsideTemperature Input = C - Output = C --No conversion required

dev:11082018-08-08 20:04:38.073:infoWeewx Driver - INFO: Checking Inside Temperature

dev:11082018-08-08 20:04:38.072:infoWeewx Driver - INFO: Checking Wind Gust

dev:11082018-08-08 20:04:38.070:infoWeewx Driver - INFO: Checking Wind speed

dev:11082018-08-08 20:04:38.068:debugWeewx Driver - DEBUG: Pressure Out = 29.86

dev:11082018-08-08 20:04:38.067:debugWeewx Driver - DEBUG: Pressure In = 1011.1

dev:11082018-08-08 20:04:38.066:debugWeewx Driver - DEBUG: Converting MBAR to INHg

dev:11082018-08-08 20:04:38.064:infoWeewx Driver - INFO: Checking Pressure

dev:11082018-08-08 20:04:38.063:infoWeewx Driver - INFO: Dewpoint Input = C - Output = C -- No conversion required

dev:11082018-08-08 20:04:38.061:infoWeewx Driver - INFO: Checking Dewpoint

dev:11082018-08-08 20:04:38.060:infoWeewx Driver - INFO: Checking Inside Humidity

dev:11082018-08-08 20:04:38.058:infoWeewx Driver - INFO: Checking Humidity

dev:11082018-08-08 20:04:38.057:infoWeewx Driver - INFO: Checking SolarRadiation

dev:11082018-08-08 20:04:38.056:infoWeewx Driver - INFO: Checking illuminance

dev:11082018-08-08 20:04:38.054:infoWeewx Driver - INFO: response data: [title:Current Values, location:The Beach, Toronto, time:08/08/18 20:00:00, lat:XX° XX.XX' N, lon:XXX° XX.XX' W, alt:89 meters, hardware:observer, uptime:0 days, 7 hours, 12 minutes, serverUptime:0 days, 7 hours, 28 minutes, weewxVersion:3.8.0, stats:[current:[outTemp:25.1°C, windchill:25.1°C, heatIndex:25.1°C, dewpoint:22.0°C, humidity:83%, insideHumidity:76%, barometer:1011.1 mbar, barometerTrendDelta:3 hours, barometerTrendData:0.1 mbar, windSpeed:0 km/h, windDir: N/A, windDirText:N/A, windGust:0 km/h, windGustDir: N/A, rainRate:0.0 mm/hr, insideTemp:26.4°C], sinceMidnight:[rainSum:0.0 mm]], almanac:[sun:[startCivilTwilight:05:41:07, sunrise:06:13:44, transit:13:22:47, sunset:20:31:06, endCivilTwilight:21:03:34, azimuth:287.9°, altitude:4.6°, rightAscension:138.8°, declination:15.9°, equinox:22/09/18 21:54:09, solstice:21/12/18 17:22:34], moon:[rise:02:55:11, transit:10:36:43, set:18:19:54, azimuth:317.1°, altitude:-14.5°, rightAscension:102.6°, declination:19.9°, fullMoon:26/08/18 07:56:09, newMoon:11/08/18 05:57:43, phase:Waning crescent, fullness:9%]]]

dev:11082018-08-08 20:04:38.052:infoWeewx Driver - INFO: response contentType: application/json

dev:11082018-08-08 20:04:38.051:infoWeewx Driver - INFO: params1: [:]

dev:11082018-08-08 20:04:38.050:infoWeewx Driver - INFO: Response1: Content-Type : application/json

dev:11082018-08-08 20:04:38.049:infoWeewx Driver - INFO: Response1: Connection : Keep-Alive

dev:11082018-08-08 20:04:38.048:infoWeewx Driver - INFO: Response1: Keep-Alive : timeout=5, max=100

dev:11082018-08-08 20:04:38.047:infoWeewx Driver - INFO: Response1: Content-Length : 1660

dev:11082018-08-08 20:04:38.046:infoWeewx Driver - INFO: Response1: Accept-Ranges : bytes

dev:11082018-08-08 20:04:38.045:infoWeewx Driver - INFO: Response1: ETag : "67c-572f550a1d106"

dev:11082018-08-08 20:04:38.044:infoWeewx Driver - INFO: Response1: Last-Modified : Thu, 09 Aug 2018 00:00:28 GMT

dev:11082018-08-08 20:04:38.043:infoWeewx Driver - INFO: Response1: Server : Apache/2.4.25 (Raspbian)

dev:11082018-08-08 20:04:38.042:infoWeewx Driver - INFO: Response1: Date : Thu, 09 Aug 2018 00:04:38 GMT

dev:11082018-08-08 20:04:38.017:debugWeewx Driver - DEBUG: Weewx: ForcePoll called

If you look at the log you can see that it logs whether the data needs converting or not
E.g
Just after the ā€˜checking rainrateā€™ it says: ā€˜Rainrate Input = mm/hr - Output = mm/hr -- no conversion requiredā€™

This does not appear for your wind setting

Silly question.... have you set all your units?

Try setting them to a different value then save and reset them to what you want before saving again

Andy

I had except for pressure. changed that and it's the same. Changed everything to US and saved, but still showing null. Changed back to metric, except for pressure and it's still showing null.

There's no wind right now, so if the wind is o km/h should it show that, or would it show null until there's a value to register? Earlier today there was wind and it showed null, but I also had version 2.0 in there instead of 2.10 ! :blush:

Maybe just get some rest and I'll let you know in the morning if there's a change once we have wind data here again.

It should not show null
If weewx doesnā€™t have a figure it normally shows as n/a in the json file and I convert that to ā€˜no station dataā€™
These is obviously a problem somewhere that is not showing on my hub.

Wedding anniversary tomorrow (today) so no coding allowed :slight_smile:
Iā€™ll have a look as soon as Iā€™m able

Andy

1 Like

Absolutely not! :laughing:

Happy Anniversary!

We'll pick this up at a later date. No worries.
One last question and then I insist we put this down for a while. Are you running firmware 1.1.2.121?
I am.

Thanks, 17 yrs :slight_smile:
Yes Iā€™m running the latest firmare on both my hubs

Andy

2 Likes

Wind still shows Null. Expecting rain later today so I can check rain rate. Itā€™s working on your end, and other than the firmware on our observer IP bridges being different, it should be virtually the same.

I must have something misconfigured but I canā€™t figure out what it is. Does your app poll the Json file?

The driver does poll the json file so it is either not polling correctly or it doesnā€™t understand the response or format of the json file
I assume youā€™re using the json file that was included in the image?

I have done so much with this driver recently, itā€™s quite possible that I made a typo somewhere

Andy

Yes, it's your image. I did replace the daily.json.tmpl file as you instructed. I was in the Skins directory. That's still needed correct?

I'm skeptical that you've made a typo, since yours works and mine does not. The formatting is a good question. Could you message me the output from your json file so I can compare with mine?