Davis AirLink and PurpleAir

926 views
Skip to first unread message

jo...@johnkline.com

unread,
Sep 22, 2020, 12:03:13 AM9/22/20
to weewx-user
I’ve been playing with the new Davis AirLink.  I have one WeeWX instance running with it.

Unlike the PurpleAir, which is slow answering requests and needs an internet connection to respond, the AirLink is fast (the doc claims it can respond to 3 queries per second) and presumably will still respond when the internet is down.

On the downside, unlike the performance of the PurpleAir, which is pretty well understood (e.g., during these poor air quality days due to wood smoke, the LRAPA correction can be used to have some confidence in the numbers), I’m not aware of any studies with the AirLink.  As such, it’s difficult to have any confidence in the AirLinks numbers.  Having said that, I thought I would plot AirLink concentrations vs. PurpleAir (A and B sensor) concentrations.

At present, the AirLink is reporting similar PM2.5 to the PurpleAir (see below).  It would be nice to know if the AirLink continued to closely track PM2.5 at much higher concentrations.  I hope to not find out (it’s been pretty good here in the SF Bay Area for the last few days), but I’ll reply here with a graph if the concentrations get real bad again.

CFC91D13-9283-4550-B98F-330F9FEC22DB.jpeg




Tom Keffer

unread,
Sep 22, 2020, 6:37:22 AM9/22/20
to weewx-user
That's awesome! I haven't seen a comparison anywhere else. 

The PA sensors do not need an internet connection. Just query the local endpoint 'json'. For example, mine is at http://192.168.1.101/json

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/b6efea69-df87-4b96-b366-bd8df2981a59n%40googlegroups.com.

bge...@gmail.com

unread,
Sep 22, 2020, 9:01:58 AM9/22/20
to weewx-user
The Airlink is only $124 + $13 shipping from Scaled Instruments, but I think you have to now ask for a discount code to get that price (probably a minimum advertised price thing from Davis).  Purple Air needs to readjust their pricing to compete, or eventually lose market share.  I do like Purple Air's map though.

John Kline

unread,
Sep 22, 2020, 10:09:03 AM9/22/20
to weewx...@googlegroups.com
The PA sensors do not need an internet connection. Just query the local endpoint 'json'.

In fact I do that.  Unplug your internet and try it.  It doesn’t work for me.

On Sep 22, 2020, at 3:37 AM, Tom Keffer <tke...@gmail.com> wrote:


That's awesome! I haven't seen a comparison anywhere else. 

The PA sensors do not need an internet connection. Just query the local endpoint 'json'. For example, mine is at http://192.168.1.101/json

-tk

On Mon, Sep 21, 2020 at 9:03 PM jo...@johnkline.com <jo...@johnkline.com> wrote:
I’ve been playing with the new Davis AirLink.  I have one WeeWX instance running with it.

Unlike the PurpleAir, which is slow answering requests and needs an internet connection to respond, the AirLink is fast (the doc claims it can respond to 3 queries per second) and presumably will still respond when the internet is down.

On the downside, unlike the performance of the PurpleAir, which is pretty well understood (e.g., during these poor air quality days due to wood smoke, the LRAPA correction can be used to have some confidence in the numbers), I’m not aware of any studies with the AirLink.  As such, it’s difficult to have any confidence in the AirLinks numbers.  Having said that, I thought I would plot AirLink concentrations vs. PurpleAir (A and B sensor) concentrations.

At present, the AirLink is reporting similar PM2.5 to the PurpleAir (see below).  It would be nice to know if the AirLink continued to closely track PM2.5 at much higher concentrations.  I hope to not find out (it’s been pretty good here in the SF Bay Area for the last few days), but I’ll reply here with a graph if the concentrations get real bad again.

<CFC91D13-9283-4550-B98F-330F9FEC22DB.jpeg>





--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/b6efea69-df87-4b96-b366-bd8df2981a59n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Tom Keffer

unread,
Sep 22, 2020, 11:08:02 AM9/22/20
to weewx-user
Just tried it, and it worked for me. It would a truly dumb design that depended on an internet connection to respond to a local query. 

(I'm looking at you, WeatherFlow.)

-tk

vince

unread,
Sep 22, 2020, 12:23:22 PM9/22/20
to weewx-user
On Tuesday, September 22, 2020 at 8:08:02 AM UTC-7, Tom Keffer wrote:
Just tried it, and it worked for me. It would a truly dumb design that depended on an internet connection to respond to a local query. 



One thing I did find experimentally is that if you use hostnames, don't use 'purpleair'.  Use their desired hostname which seems to be purpleair-NNNN where NNNN is the last few characters of the MAC address.   In my case it would be purpleair-d32a

If you use the longer hostname, the box responds if your Internet is down.  Odd but I found it true here.

wes...@gmail.com

unread,
Sep 22, 2020, 1:34:33 PM9/22/20
to weewx-user
have a look at this device. it's a pretty high quality sensor that used professionally for public sensors. as soon as they're back in stock i plan on getting one.

https://www.adafruit.com/product/4632

John Kline

unread,
Sep 22, 2020, 2:05:10 PM9/22/20
to weewx...@googlegroups.com
Well, at least Vince has seen this behavior when the internet is down; but has a workaround.

I have tried it with dns names:
Both of these resolve without internet calls via my local dns servers.

I have also tried it with the corresponding IP addresses.

In all cases, I get no response when I lose my internet connection.

When I look at packet capture, I see it chatting with amazon’s servers.  See packet capture below.  Although this doesn’t necessarily mean it won’t respond without being able to chat with those servers.

In my logs, I see that it is a redirect that fails.  It seems purpleair-38fe.lan cannot be resolved without an internet connection:

Aug 13 01:35:23 ella purple-proxy[560]: HTTPConnectionPool(host='purple-air-38fe.lan', port=80): Max retries exceeded with url: /redirect (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f1f0779a9b0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')): Retrying request.

This has been annoying.  WeeWX and everything associated with it continue to run happily without an internet connection–except the purple airs.

10:35:18.286754 IP 54.186.213.21.443 > 192.168.168.197.59220: tcp 69
10:35:18.286768 IP 54.186.213.21.443 > 192.168.168.197.59220: tcp 0
10:35:18.288759 IP 192.168.168.197.59220 > 54.186.213.21.443: tcp 0
10:36:09.171449 IP 192.168.168.197.54978 > 142.250.68.83.443: tcp 0
10:36:09.188699 IP 142.250.68.83.443 > 192.168.168.197.54978: tcp 0
10:36:09.190451 IP 192.168.168.197.54978 > 142.250.68.83.443: tcp 0
10:36:09.193986 IP 192.168.168.197.54978 > 142.250.68.83.443: tcp 98
10:36:09.224137 IP 142.250.68.83.443 > 192.168.168.197.54978: tcp 0
10:36:09.249017 IP 142.250.68.83.443 > 192.168.168.197.54978: tcp 1430
10:36:09.249233 IP 142.250.68.83.443 > 192.168.168.197.54978: tcp 1127
10:36:09.253882 IP 192.168.168.197.54978 > 142.250.68.83.443: tcp 0
10:36:09.369752 IP 192.168.168.197.54978 > 142.250.68.83.443: tcp 267
10:36:09.402907 IP 142.250.68.83.443 > 192.168.168.197.54978: tcp 0
10:36:09.404920 IP 192.168.168.197.54978 > 142.250.68.83.443: tcp 75
10:36:09.426878 IP 142.250.68.83.443 > 192.168.168.197.54978: tcp 0
10:36:09.450973 IP 142.250.68.83.443 > 192.168.168.197.54978: tcp 75
10:36:09.458057 IP 192.168.168.197.54978 > 142.250.68.83.443: tcp 229
10:36:09.474423 IP 192.168.168.197.54978 > 142.250.68.83.443: tcp 565
10:36:09.490082 IP 192.168.168.197.54978 > 142.250.68.83.443: tcp 565
10:36:09.496904 IP 142.250.68.83.443 > 192.168.168.197.54978: tcp 0
10:36:09.497845 IP 142.250.68.83.443 > 192.168.168.197.54978: tcp 0
10:36:09.506197 IP 192.168.168.197.54978 > 142.250.68.83.443: tcp 565
10:36:09.515096 IP 192.168.168.197.54978 > 142.250.68.83.443: tcp 357
10:36:09.515230 IP 192.168.168.197.54978 > 142.250.68.83.443: tcp 53
10:36:09.532567 IP 142.250.68.83.443 > 192.168.168.197.54978: tcp 0
10:36:09.533653 IP 142.250.68.83.443 > 192.168.168.197.54978: tcp 0
10:36:09.542607 IP 142.250.68.83.443 > 192.168.168.197.54978: tcp 0
10:36:09.542620 IP 142.250.68.83.443 > 192.168.168.197.54978: tcp 0
10:36:09.630763 IP 142.250.68.83.443 > 192.168.168.197.54978: tcp 293
10:36:09.634332 IP 192.168.168.197.54978 > 142.250.68.83.443: tcp 0
10:36:09.940649 IP 192.168.168.197.54978 > 142.250.68.83.443: tcp 0
10:36:09.940782 IP 192.168.168.197.50712 > 54.210.227.170.443: tcp 0
10:36:09.957889 IP 142.250.68.83.443 > 192.168.168.197.54978: tcp 0
10:36:09.976918 IP 142.250.68.83.443 > 192.168.168.197.54978: tcp 0
10:36:09.978360 IP 192.168.168.197.54978 > 142.250.68.83.443: tcp 0
10:36:10.011673 IP 54.210.227.170.443 > 192.168.168.197.50712: tcp 0
10:36:10.014025 IP 192.168.168.197.50712 > 54.210.227.170.443: tcp 0
10:36:10.017342 IP 192.168.168.197.50712 > 54.210.227.170.443: tcp 99
10:36:10.097479 IP 54.210.227.170.443 > 192.168.168.197.50712: tcp 0
10:36:10.098132 IP 54.210.227.170.443 > 192.168.168.197.50712: tcp 1460
10:36:10.098451 IP 54.210.227.170.443 > 192.168.168.197.50712: tcp 1460
10:36:10.098780 IP 54.210.227.170.443 > 192.168.168.197.50712: tcp 1275
10:36:10.101829 IP 192.168.168.197.50712 > 54.210.227.170.443: tcp 0
10:36:10.102725 IP 192.168.168.197.50712 > 54.210.227.170.443: tcp 0
10:36:10.113491 IP 192.168.168.197.50712 > 54.210.227.170.443: tcp 0
10:36:10.228904 IP 192.168.168.197.50712 > 54.210.227.170.443: tcp 267
10:36:10.350375 IP 54.210.227.170.443 > 192.168.168.197.50712: tcp 0
10:36:10.352205 IP 192.168.168.197.50712 > 54.210.227.170.443: tcp 91
10:36:10.429587 IP 54.210.227.170.443 > 192.168.168.197.50712: tcp 0
10:36:10.429838 IP 54.210.227.170.443 > 192.168.168.197.50712: tcp 91
10:36:10.440405 IP 192.168.168.197.50712 > 54.210.227.170.443: tcp 245
10:36:10.554365 IP 54.210.227.170.443 > 192.168.168.197.50712: tcp 709
10:36:10.559906 IP 192.168.168.197.50712 > 54.210.227.170.443: tcp 0
10:36:11.340712 IP 192.168.168.197.50712 > 54.210.227.170.443: tcp 0
10:36:11.341133 IP 192.168.168.197.52666 > 54.210.227.170.443: tcp 0
10:36:11.423391 IP 54.210.227.170.443 > 192.168.168.197.52666: tcp 0
10:36:11.423615 IP 54.210.227.170.443 > 192.168.168.197.50712: tcp 0
10:36:11.425221 IP 192.168.168.197.52666 > 54.210.227.170.443: tcp 0
10:36:11.425905 IP 192.168.168.197.50712 > 54.210.227.170.443: tcp 0
10:36:11.434655 IP 192.168.168.197.52666 > 54.210.227.170.443: tcp 99
10:36:11.521890 IP 54.210.227.170.443 > 192.168.168.197.52666: tcp 0
10:36:11.522318 IP 54.210.227.170.443 > 192.168.168.197.52666: tcp 1460
10:36:11.522467 IP 54.210.227.170.443 > 192.168.168.197.52666: tcp 1460
10:36:11.522586 IP 54.210.227.170.443 > 192.168.168.197.52666: tcp 1275
10:36:11.525821 IP 192.168.168.197.52666 > 54.210.227.170.443: tcp 0
10:36:11.532375 IP 192.168.168.197.52666 > 54.210.227.170.443: tcp 0
10:36:11.542972 IP 192.168.168.197.52666 > 54.210.227.170.443: tcp 0
10:36:11.657044 IP 192.168.168.197.52666 > 54.210.227.170.443: tcp 267
10:36:11.786345 IP 54.210.227.170.443 > 192.168.168.197.52666: tcp 0
10:36:11.788272 IP 192.168.168.197.52666 > 54.210.227.170.443: tcp 91
10:36:11.865904 IP 54.210.227.170.443 > 192.168.168.197.52666: tcp 0
10:36:11.866149 IP 54.210.227.170.443 > 192.168.168.197.52666: tcp 91
10:36:11.876097 IP 192.168.168.197.52666 > 54.210.227.170.443: tcp 261
10:36:12.006307 IP 54.210.227.170.443 > 192.168.168.197.52666: tcp 709
10:36:12.006736 IP 54.210.227.170.443 > 192.168.168.197.52666: tcp 69
10:36:12.008570 IP 192.168.168.197.52666 > 54.210.227.170.443: tcp 0
10:36:12.012728 IP 192.168.168.197.52666 > 54.210.227.170.443: tcp 0
10:36:12.722424 IP 192.168.168.197.52666 > 54.210.227.170.443: tcp 0
10:36:12.722770 IP 192.168.168.197.49639 > 54.210.227.170.443: tcp 0
10:36:12.799833 IP 54.210.227.170.443 > 192.168.168.197.52666: tcp 0
10:36:12.800053 IP 54.210.227.170.443 > 192.168.168.197.49639: tcp 0
10:36:12.801704 IP 192.168.168.197.52666 > 54.210.227.170.443: tcp 0
10:36:12.802389 IP 192.168.168.197.49639 > 54.210.227.170.443: tcp 0
10:36:12.805823 IP 192.168.168.197.49639 > 54.210.227.170.443: tcp 99
10:36:12.891171 IP 54.210.227.170.443 > 192.168.168.197.49639: tcp 0
10:36:12.891816 IP 54.210.227.170.443 > 192.168.168.197.49639: tcp 1460
10:36:12.892137 IP 54.210.227.170.443 > 192.168.168.197.49639: tcp 1460
10:36:12.892407 IP 54.210.227.170.443 > 192.168.168.197.49639: tcp 1275
10:36:12.894455 IP 192.168.168.197.49639 > 54.210.227.170.443: tcp 0
10:36:12.907127 IP 192.168.168.197.49639 > 54.210.227.170.443: tcp 0
10:36:12.921945 IP 192.168.168.197.49639 > 54.210.227.170.443: tcp 0
10:36:13.021514 IP 192.168.168.197.49639 > 54.210.227.170.443: tcp 267
10:36:13.142410 IP 54.210.227.170.443 > 192.168.168.197.49639: tcp 0
10:36:13.144378 IP 192.168.168.197.49639 > 54.210.227.170.443: tcp 91
10:36:13.213169 IP 54.210.227.170.443 > 192.168.168.197.49639: tcp 0
10:36:13.213182 IP 54.210.227.170.443 > 192.168.168.197.49639: tcp 91
10:36:13.223062 IP 192.168.168.197.49639 > 54.210.227.170.443: tcp 245
10:36:13.342325 IP 54.210.227.170.443 > 192.168.168.197.49639: tcp 0
10:36:13.346481 IP 54.210.227.170.443 > 192.168.168.197.49639: tcp 709
10:36:13.352301 IP 192.168.168.197.49639 > 54.210.227.170.443: tcp 0


On Sep 22, 2020, at 9:23 AM, vince <vince...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

vince

unread,
Sep 22, 2020, 3:25:32 PM9/22/20
to weewx-user
On Tuesday, September 22, 2020 at 11:05:10 AM UTC-7, John Kline wrote:
In my logs, I see that it is a redirect that fails.  It seems purpleair-38fe.lan cannot be resolved without an internet connection:



I have a local pihole box with a hosts file in it that is my LAN primary resolver, so I added the alias there to make it resolve without needing Internet access.

Can't stop a determined network engineer with too many computers on the LAN :-)

Andy

unread,
Sep 23, 2020, 8:41:15 AM9/23/20
to weewx-user

I used these instruction and now I have a sensor here. Used the SDS011 sensor for this one. Couple of the Plantower sensors on the way. This and this.

Andy

Rich Braun

unread,
Sep 24, 2020, 11:53:40 AM9/24/20
to weewx-user
On Monday, September 21, 2020 at 9:03:13 PM UTC-7 jo...@johnkline.com wrote:
I’ve been playing with the new Davis AirLink.  I have one WeeWX instance running with it.


John -- nice charts, can you post a bit more about how to configure weewx to read from the AirLink device? I bought one and can fetch the JSON object but am unsure which plugins to add to my long-running weewx config. (There are about 2 or 3 purpleair plugins, plus another called weewx-aqi, so it's not obvious without spending hours searching around.)

Basically, I want to know which plugin(s) you're using, whether you had to make any source-code mods, and what your weewx.conf settings are.

Also: once I have the data, where should I share it online besides my own web page wx.ci.net?

-rich

John Kline

unread,
Sep 24, 2020, 12:41:06 PM9/24/20
to weewx...@googlegroups.com
Hi Rich,

I wrote my own extension.  It’s similar to my weewx-purple extension.  Like weewx-purple, it doesn’t create a separate database to hold air quality information.  Rather, it stores PM 1.0, PM 2.5 and PM 10.0 in the WeeWX extended schema (and uses xtypes to compute US EPA AQI (as well as the LRAPA and UNBC corrections).

I haven’t yet put it on GitHub.  I could probably do that today or tomorrow if it would be of use to you.  I write new extensions such that they require WeeWX 4.x and Python 3.7 or later.  In addition, for this extension, you would need to be using the WeeWX extended schema.

Let me know if your installation meets the above requirements.  If it does, I’ll find the time to put it on GitHub very soon.

Cheers,
John

On Sep 24, 2020, at 8:53 AM, Rich Braun <richard...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Rich Braun

unread,
Sep 24, 2020, 1:45:32 PM9/24/20
to weewx...@googlegroups.com
Sure, thanks! Everything on my setup is more-or-less current: weewx 4.1.1 running under python 3.8.3. My work is shared as a multi-platform docker image instantlinux/weewx and the installation Dockerfile is at https://github.com/instantlinux/docker-tools/tree/master/images/weewx.

Looking forward to see your code. My suggestion: take the brand-names AirLink and PurpleAir out (aside from a single config entry to specify AQI sensor model type), make it a general-purpose AQI reporting plugin that supports either one (or eventually the off-brand ones that are mentioned in this forum).

-rich
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/n7EjrCNrcuI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/39566045-B566-4EDF-BC4C-10257A2FAB3D%40johnkline.com.


John Kline

unread,
Sep 26, 2020, 11:43:50 PM9/26/20
to weewx...@googlegroups.com
Hi Rich,

I’ve created the github project here:

I haven’t had any issues with the extension, but it’s not a priority for me until more is known about the AirLink.

Cheers,
John

On Sep 24, 2020, at 10:45 AM, Rich Braun <ri...@pioneer.ci.net> wrote:



Rich Braun

unread,
Sep 26, 2020, 11:51:42 PM9/26/20
to weewx...@googlegroups.com
Thanks! I'll set it up and give you feedback.

-rich


September 26, 2020 8:43 PM, "John Kline" <jo...@johnkline.com> wrote:
Hi Rich,

Graham Eddy

unread,
Sep 27, 2020, 1:30:23 AM9/27/20
to weewx-user
i was about to pinch john’s code for the AQI side of things - i get PM2.5 values via gw1000 - when i see this new driver announced. (i have found ecowitt’s purported 24 hour average values very unreliable - drifting, random resets, etc - but the actual pm2.5 values seem fine → derive the averaged values myself)

can i suggest that acquiring PMx.x values and deriving AQI values be kept as separate services? the AQI service would provide AQI xtype (mainly for cheetah) and convert PMx.x values in weewx packets to equivalent AQI values inserted into weewx packet (this is what i was going to implement). design-wise this would also allow support of AQI values derived from multiple pollution types (NO, etc) as well as abstracting the pollutant monitors

On 27 Sep 2020, at 1:43 pm, John Kline <jo...@johnkline.com> wrote:

Hi Rich,

Tom Keffer

unread,
Sep 27, 2020, 8:29:00 AM9/27/20
to weewx-user
The "WeeWX way" is to emit what the hardware offers, then let StdWXCalculate determine whether to keep it or calculate a new value in software.

Right now, it's fairly easy to extend StdWXCalculate to calculate new types via the XTypes facility. Gary and I are working on a version that will make it even easier.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Graham Eddy

unread,
Sep 27, 2020, 11:47:45 AM9/27/20
to weewx...@googlegroups.com
i had not thought to put the collection of AQI calculations into an extension to StdWXCalculate

i amend my suggested split of weewx-airlink to an ‘airlink’ data acquisition service providing PMx.x values, plus an ‘aqi’ extension to StdWXCalculate to convert PMx.x values to AQI-related values

and yes, i’d be happy to code this extension (mainly by pinching john’s code) if john wanted to head that direction - i’ll have to code something similar/simpler for myself anyway if john doesn't want to go that way (i.e. separate ‘aqi’ (sub-)service)

Tom Keffer

unread,
Sep 27, 2020, 8:42:45 PM9/27/20
to weewx-user
Here's the wiki on XTypes. I believe John has written an XTypes extension. Between the two of you, I'm sure you can figure it out!

-tk


John Kline

unread,
Sep 27, 2020, 8:46:08 PM9/27/20
to weewx...@googlegroups.com
It’s already using XTypes for everything derived; so, not much to figure out there.

On Sep 27, 2020, at 5:42 PM, Tom Keffer <tke...@gmail.com> wrote:



Tom Keffer

unread,
Sep 27, 2020, 8:48:30 PM9/27/20
to weewx-user
Oh. So you already have a way to calculate AQI from the PM data?

John Kline

unread,
Sep 27, 2020, 8:56:54 PM9/27/20
to weewx...@googlegroups.com
Oh. So you already have a way to calculate AQI from the PM data?
Yep.  It’s there.

On Sep 27, 2020, at 5:48 PM, Tom Keffer <tke...@gmail.com> wrote:



Graham Eddy

unread,
Sep 27, 2020, 11:10:59 PM9/27/20
to weewx...@googlegroups.com
yes, john has already done the hard work. it’s just a case of wrapping the AQI part differently (called from WXCalculate rather than ‘airlink’ PMx.x collector) and positioning it as a process_service not data_service - that’s what i meant by “pinching his code"

philip....@gmail.com

unread,
Sep 28, 2020, 2:31:54 PM9/28/20
to weewx-user
Ive loaded John's weewx-airlink-master.zip but get the following
Sep 28 13:02:57 raspberrypi weewx-weewx[25663] ERROR user.airlink: Could not get concentrations from any source.
Sep 28 13:02:58 raspberrypi weewx-weewx[25663] ERROR user.airlink: Found no fresh concentrations to insert.
Sep 28 13:03:00 raspberrypi weewx-weewx[25663] ERROR user.airlink: Found no fresh concentrations to insert.
Sep 28 13:03:02 raspberrypi weewx-weewx[25663] ERROR user.airlink: Found no fresh concentrations to insert.
Sep 28 13:03:02 raspberrypi weewx-weewx[25663] INFO user.airlink: collect_data: Attempt to fetch from: airlink failed: HTTPConnectionPool(host='airlink', port=80): Max retries exceeded with url: /v1/current_conditions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xb1edef90>: Failed to establish a new connection: [Errno -2] Name or service not known')).
The AirLink seems to be working OK on the Davis WeatherLink app

Is there anything else I should have done
Thanks Phil

John Kline

unread,
Sep 28, 2020, 2:45:35 PM9/28/20
to weewx...@googlegroups.com
Did you edit weewx.conf and specify the correct host (which could be an IP address)?

[AirLink]
    [[Sensor1]]
        enable = True
        hostname = airlink <<<< This needs to be a resolvable name or IP address
        port = 80
        timeout = 2    

On Sep 28, 2020, at 11:31 AM, philip....@gmail.com <philip....@gmail.com> wrote:

Ive loaded John's weewx-airlink-master.zip but get the following
--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

philip....@gmail.com

unread,
Sep 28, 2020, 3:16:05 PM9/28/20
to weewx-user
No hadn't done that and now looks a little more promising but now I get 
Sep 28 20:08:41 raspberrypi weewx-weewx[4553] INFO user.airlink: airlink reading not sane: {'data': {'did': '001D0A1000AF', 'name': 'LusherClose Sheringham', 'ts': 1601320120, 'conditions': [{'lsid': 349639, 'data_structure_type': 5, 'temp': 59.0, 'hum': 69.3, 'dew_point': 48.9, 'wet_bulb': 52.6, 'heat_index': 58.1, 'pm_1_last': 0, 'pm_2p5_last': 0, 'pm_10_last': 1, 'pm_1': 0.61, 'pm_2p5': 0.61, 'pm_2p5_last_1_hour': 1.07, 'pm_2p5_last_3_hours': 1.25, 'pm_2p5_last_24_hours': 1.25, 'pm_2p5_nowcast': 1.2, 'pm_10p0': 3.3, 'pm_10p0_last_1_hour': 1.9, 'pm_10p0_last_3_hours': 2.52, 'pm_10p0_last_24_hours': 2.52, 'pm_10p0_nowcast': 2.27, 'last_report_time': 1601320120, 'pct_pm_data_last_1_hour': 100, 'pct_pm_data_last_3_hours': 95, 'pct_pm_data_nowcast': 23, 'pct_pm_data_last_24_hours': 11}]}, 'error': None}
Sep 28 20:08:41 raspberrypi weewx-weewx[4553] ERROR user.airlink: Could not get concentrations from any source.
Sep 28 20:08:41 raspberrypi weewx-weewx[4553] ERROR user.airlink: Found no fresh concentrations to insert.
Sep 28 20:08:43 raspberrypi weewx-weewx[4553] ERROR user.airlink: Found no fresh concentrations to insert.
Sep 28 20:08:45 raspberrypi weewx-weewx[4553] ERROR user.airlink: Found no fresh concentrations to insert.
Sep 28 20:08:46 raspberrypi weewx-weewx[4553] INFO user.airlink: Expected data_structure_type of 6, found 5
Phil

John Kline

unread,
Sep 28, 2020, 3:19:55 PM9/28/20
to weewx...@googlegroups.com
Give me a second to look at this (and add this reading to my test for sanity.”

John Kline

unread,
Sep 28, 2020, 3:37:03 PM9/28/20
to weewx...@googlegroups.com
I see.  You have old firmware where data_structure_type is 5.  It’s 6 in the current firmware.

I have a check for 6 as that is the firmware that includes the names I am looking for.  I’ll add support for data_structure_type of 5 tonight (I’m working at my day job at present).

I’ll reply on this thread when I’ve uploaded the change.  It’s simply a matter of looking for different names on a few fields in the json.

Cheers,
John

On Sep 28, 2020, at 12:16 PM, philip....@gmail.com <philip....@gmail.com> wrote:

No hadn't done that and now looks a little more promising but now I get 

John Kline

unread,
Sep 28, 2020, 4:45:47 PM9/28/20
to weewx...@googlegroups.com
[Apologies if this is received more than once.  I seem to be having an issue between the iPadOS mail client and gmail.]

OK, pull again and give it a try.  I now convert the old structure to the new.

I’ve added a test with the data you provided, but that doesn’t take the exact path; so your feedback on whether it works would be appreciated.

philip....@gmail.com

unread,
Sep 28, 2020, 6:05:17 PM9/28/20
to weewx-user
Thanks John Appreciate all your hard work
Will let you know but it will be sometime tomorrow
Cheers Phil

philip....@gmail.com

unread,
Sep 29, 2020, 5:52:00 AM9/29/20
to weewx-user
Hi John
The log is all clear and you can have a look at the demo page at  http://sheringhamweather.ddns.net/airlink/index.html 
Thanks
Phil 

John Kline

unread,
Sep 29, 2020, 9:49:05 AM9/29/20
to weewx...@googlegroups.com
Cool!  Thanks for letting me know.

On Sep 29, 2020, at 2:52 AM, philip....@gmail.com <philip....@gmail.com> wrote:

Hi John

philip....@gmail.com

unread,
Sep 29, 2020, 2:37:53 PM9/29/20
to weewx-user
John
Thanks for your help.
In the fault log yesterday it logged what it was seeing from the AirLink now its logging OK just wondered if I could still somehow see what it was sending.
Phil

John Kline

unread,
Sep 29, 2020, 3:55:23 PM9/29/20
to weewx...@googlegroups.com
You don’t say why you want to see it.  If it’s a one off to see a packet, you can do that in your browser at:
http://<airlink>/v1/current_conditions

If it’s to debug an issue, you could turn on debugging in the weewx.conf file.

If it’s because you liked that line in the log every 10 seconds, you could change line 245 in airlink.py:
From:
log.debug('collect_data: %s returned %r' % (hostname, r))
To:
log.info('collect_data: %s returned %r' % (hostname, r))

John

On Sep 29, 2020, at 11:37 AM, philip....@gmail.com <philip....@gmail.com> wrote:

John

philip....@gmail.com

unread,
Sep 30, 2020, 6:16:42 AM9/30/20
to weewx-user
On the Davis WeatherLink App the AQI is a lot lower than on your Demo page, I had assumed the AQI would be the same where ever we were in the world, silly me,
but have now realised why, not sure if its correct.
When I set the AirLink on the Davis App it gave me options to where I was in the world (there are 9 options) so set it up to the UK, well it is where I live.
As an example, if its set to the UK the NOWCAST AQI = 2.7, if it is set up to the USA  the NOWCAST AQI = 67 and the 67 reading is what is displayed on your Demo page.
I can understand that countries have different definitions  but to have different AQI readings seems a bit silly or is it me being silly or it could be that Davis have it wrong
I would appreciate any thoughts on this.
Life is so much better when everything is simple ???
Phil

John Kline

unread,
Sep 30, 2020, 7:00:20 AM9/30/20
to weewx...@googlegroups.com
I’ll have to add a country config for the AQI.  The calculation for the UK PM2.5 AQI is straightforward.

NOWCAST is a separate subject.  That’s a 12 hour average and is less useful to store in the weewx database than the latest PM 2.5.  It may be that 67 was displayed for the nowcast USA AQI and 67 was displayed on my demo page, but the former was a 12 hour average and the latter was a 5 minute average (assuming you are using weewx’s default interval).

On Sep 30, 2020, at 3:16 AM, philip....@gmail.com <philip....@gmail.com> wrote:

On the Davis WeatherLink App the AQI is a lot lower than on your Demo page, I had assumed the AQI would be the same where ever we were in the world, silly me,

spam-...@robotmonkeys.net

unread,
Sep 30, 2020, 8:32:17 PM9/30/20
to weewx-user
Weewx-aqi https://github.com/jonathankoren/weewx-aqi already supports UK. It's completely sensor agnostic. If you have any questions, let me know.

Graham Eddy

unread,
Oct 1, 2020, 1:38:09 AM10/1/20
to weewx...@googlegroups.com
weewx-aqi: does it really require being stored in separate database or can it be implemented under wx_binding?
(i am still looking to have a single, common AQI component, presumably in WXCalculate service)
Reply all
Reply to author
Forward
0 new messages