Air Things View Plus

I have an Air Things View Plus and would love to be able to integrate it directly to Hubitat.

It is possible to access the data via the web, so I suspect that there might be a way to access it directly from Hubitat, but that would require some coding time to get it to work, I suspect…

This web page on their site leads me to believe that they also have an API…

Could this be used to build an interface? I would be happy to help test this, but developing it is way, way above my capabilities…

Update: App and device built by @thebearmay is available in Hubitat Package Manager (HPM) or:
App Code:
https://raw.githubusercontent.com/thebearmay/hubitat/main/airthings/airThingsCntrl.groovy

Device Driver Code:
https://raw.githubusercontent.com/thebearmay/hubitat/main/airthings/airthingsDevice.groovy

You'll need to get an API ID and Secret from Air Things (link is in the app), and then click the Create Initial Authorization . If that works, the app will have run a Get Devices query - it will create one or more devices. The "Get Devices" button (should show up after the initial authorization has completed successfully)

2 Likes

Yes. Quickly browsing the api spec it probably wouldn’t be a big deal to do a driver that just polled the device for latest readings every N seconds (where you could configure N in the device preferences). It looks like they have webhooks support which could let it actually push the new values to Hubitat as soon as they happen (no polling required) but it seems they give consumers only read only access so you probably can’t access the ability to create a webhook.

2 Likes

Well that’s nice! Webhook is certainly better, but as long as the values can be brought in to Hubitat, the method is not that critical from my perspective.

Air things does some very nice monitoring and hooking it up to Hubitat would allow for some pretty neat automation!

2 Likes

I'll second this - it would be a great addition. I'd obviously prefer local, but pulling data off Airthings website would be better than nothing.

Happy to test it - my first test would be how good your instructions are, as my current challenge with Hubitat is just getting things installed and working. And based on that it should be obvious I cannot help with programming this, but happy to be a tester and user of it should someone write it!

2 Likes

I would be interested in this driver as well if someone was looking for a project.

3 Likes

I received my AirThings View Plus in the mail today and got it setup. I'm happy to give someone access to my API to develop a driver for it.

2 Likes

No takers out there that want to build this driver? I'd be willing to chip in to pay someone for their time to develop this, how about you @Sebastien and @calinatl ?

I'd really like to be able to turn on an exhaust fan and the furnace fan if CO2, VOCs, PM or Radon is high in the house.

1 Like

@cj_rezz : Definitely not me. I have NO CLUE how to do such a thing - I can barely get my Hubitat working...but I do have it working.
It would be nice to have this thing though. Depending upon how much, I'd also chip in.

1 Like

Yes yes, I meant maybe you and Sebastian would also be interested in pitching in some funds to make it a little more worth while to one of the community developers to work on.

1 Like

Same for me - I wouldn’t know where to start to build a driver for it. One day maybe!

Looking over the API the only real hurdle appears to be getting some better documentation on the authorization flow/parameters (their examples appear to be in python which is one of the languages I’ve never really mastered beyond the simple ‘Hello World’). May be able to register the app and get an initial token though which would simplify that part. The rest is just a series of HTTP GET calls.

1 Like

@thebearmay - In case it is helpful (I have no idea if it is), someone over on HA was able to produce an Airthings integration that is posted here: Airthings - Home Assistant

1 Like

i was thinking of doing an integration .. need a radon sensor but at 200 bucks decided to hold off.

@thebearmay : I think (not sure)
The HA integration, and probably the easiest one to bring to HE, downloads data from the internet.
There is apparently an HE integration that does not require an internet connection, but does require a Raspberry Pi and other devices I don't understand. It collects info direct from the device via bluetooth. More info is here, in case it is helpful: Trying to get data from bluetooth into Hubitat: Ecosense RD200 Radon sensor - #4 by Chen555

Based on my experiments, the data from the Wave Plus to a phone goes like this:

  1. User uploads the Airthings data, via bluetooth, from the local device to the Airthings app on a phone. For the device to communicate data to the phone app:
    a. The phone app must be registered to a username on Airthings.com
    b. Location services on the phone must be turned on
    c. The phone must be connected to either the internet via the phone's service or to a wifi network. HOWEVER, I can verify that the phone can be connected to a local wifi network that does not have an internet connection.
  • If connected to the phones internet service, or to a wifi network with internet, the data from the local app syncs with the Airthings Cloud and is available online on the airthings account. I suspect that is where the API pulls the data from.
  • If connected to a local wifi network that is NOT connected to the internet, obviously your data won't make it to the Airthings Cloud. But the data updates locally on the app, with updated dates, charts, averages, etc.

Yeah, you can sometimes get them less expensive on ebay.

Also about 2x year the Wave Plus goes on sale for about $170. The Wave Radon & View Radon may also go on sale, but since the Wave Plus ends up costing less on sale than the regular price of the radon devices...

At this point the View Plus may be the most useful of their devices since it has a readout and Radon. Here is a comparison printed before they came out with the View Radon:

ETA @kahn-hubitat : I stand corrected. The Wave Radon is $135 on Amazon right now..

1 Like

The API is written for the Air Things cloud which makes it a non-local implementation; the rPi bluetooth implementation would a completely local but has a few additional moving parts (but all of them appear to be in that post too).

1 Like

A Cloud integration would work as the information doesn’t necessarily require an immediate response. Knowing if there is a Radon issue could prompt turning on certain fans or a prompt to open windows. Same goes for the level of CO2 in a room.

If someone has a couple of minutes and can run a quick test and capture the logs (redact your password and email) for me:

https://raw.githubusercontent.com/thebearmay/hubitat/main/airthings/airThingsCntrl.groovy

Hoping I can go right to the token request, but hard to tell from their documentation. I tried using an account I set up but can't tell if I'm getting the denial due to not having any devices or if it doesn't like something else.

2 Likes

Looks like I’m also getting an error?

Thanks, it was worth a shot, but guess I’ll have to figure out the long way.

1 Like

Download the Hubitat app