How to Authorize Custom Hubitat AQI Driver

I installed the OpenWeatherMap-Air Quality driver by AC7SS in Hubitat.

I installed a device named AQI using this driver. It appears in the Hubitat device list, source User.

Looked for it on the list to authorize - but it’s not there.

It doesn’t show up as either an actuator or sensor after clicking Next in the SharpTools app in Hubitat.

I hope there’s some way to connect the device to SharpTools. Suggestions please!

Hi Stan-
Is this the driver you’re using?

If so, you could add a line just below the line that says capability "AirQuality" which would allow it to show up under the extra page of authorizations in Hubitat.

capability "Sensor"

Josh,

Yes – that’s the driver. Here’s where I inserted it in the driver code”

Here’s where the device shows up in “Next” in the SharpTools app on Hubitat:

However it does not show in the list of devices to authorize in Managing Connections.

Josh – I really hate for you to take the time away from important stuff to work on this.

Stan

Right. Those ‘extra’ devices only show when you go through the manual authorization process. Once you hit ‘Done’ on that page displaying the ‘extra’ categories, it should automatically sync the devices over to SharpTools in the background.

The downside to this is if you proceed through the web-based authorization, those ‘extra’ devices get dropped. See the instructions here for more details.

Edit: Alternatively, you could add an arbitrary supported capability to the device and it will show up in the main authorization list (eg. capability "PresenceSensor" or capability "TemperatureSensor") even though it doesn’t actually report that value. This is more of a ‘hack’, but some people prefer this approach.

Do you use the Weather Tile - Open Weather - Current and Forecast custom tile? I’ve thought about adding the AQI there and that might be an easy solution to this while also helping consolidate the number of tiles needed. :slight_smile:

1 Like

Thanks, Josh. Yes, it had brought the device over!

I’m not getting a reading. The primary attribute is AirQualityIndex, and the secondary attribute is AQIColorCode.

The logs show problems, but I have no understanding of this:

If those issues existed prior to your modification or persist after reverting your modification, I would post in the driver author’s original thread. Otherwise I would have to see exactly what your modification looks like as just adding a single capability definition shouldn’t break things like that.

1 Like

I’ve posted a note to the author on Hubitat, showing the one line addition to the code, and the error message being logged.

1 Like

OK @josh - Strange stuff. It suddenly began to work. No errors logging. Did you do anything? I’ve not heard from the author.

On Hubitat:

On SharpTools:
Tile on SharpTools

I’ll have to figure out how to handle the PM data. Maybe remove it from the code?

Also hope I can find a way to use the color code!

1 Like

Nothing changed on this side.

If you’re using a Hero Attribute, I suspect it’s probably the ‘units’ that are reported. You can override those with a blank space to remove them.

If it’s a Hero Attribute tile, you could use the State Mapping feature.

:point_up_2: I would reiterate that if you’re primarily looking to display things on a dashboard, I’m happy to look into adding this to the custom weather tile or as a standalone AQI tile with default color coding. :slight_smile:

The revelation came in the middle of the night. I fixed it.

Sometime in the day, I had noticed that there was an update to Hubitat available, and later performed the update. I doubt that new hub code fixed it, but rather the reboot of the hub. I’ll confess to the author too.

Yes, State Mapping came in the middle of the night too. It will do the job for me.

Including AQI in the custom weather tile would be a nice addition. AQI has become part of our daily life here because of the many forest fires in the region. A few days ago, Seattle had the worst pollution of any city in the world. It’s serious stuff when the government advises you to stop breathing!

Josh, thanks for the First Class support!

1 Like