Air Things View Plus

Try v0.0.6 of the device driver - should pull in the PMs and the as of time if the sensor supplies them.

This was a fun exercise, which is all the payment I need. Enjoy seeing what I can decipher and create.

2 Likes

Yup, that worked!

1 Like

I think the time might be a bit off…. :wink:

Just coming here to ask where it gets it’s time.

This is awesome! Thank you for your effort.

1 Like

Looks like the time value is a little off, going to drop it for now. - v0.0.7

I've added the capability to generate a custom tile for the dashboard to the device driver. In doing this I added code from a couple of libraries

https://raw.githubusercontent.com/thebearmay/hubitat/main/libraries/localFileMethods.groovy
https://raw.githubusercontent.com/thebearmay/hubitat/main/libraries/templateProcessing.groovy
which makes going to the Bundles tab and selecting Import from the URL
https://github.com/thebearmay/hubitat/raw/main/airthings/AirThings.zip
the easiest way to get the full set of updated code until I get it into HPM.

The custom tile option will be looking for a template in the HE File Manager. You can use the Tile Template Generator, code your own, or grab the sample code below (also available at https://raw.githubusercontent.com/thebearmay/hubitat/main/airthings/tileTemplate.txt) and store it in the file manager.

<table>
<tr><th>CO<sub>2</sub></th><td><%co2%></td></tr>
<tr><th>Humidity</th><td><%humidity%></td></tr>
<tr><th>Pressure</th><td><%pressure%></td></tr>
<tr><th>Radon</th><td><%radonShortTermAvg%></td></tr>
<tr><th>Temperature</th><td><%temperature%></td></tr>
<tr><th>VOC</th><td><%voc%></td></tr>
</table>
1 Like

I did the above and not seeing values in the tile.

Screenshot 2022-10-14 161636

Attribute is there, just need to create an attribute tile on your dashboard and select the html attribute. Although not seeing values...

I have hit refresh and the cycle time has happened many times

In just checking the device event table I have many entries for all other attributes but only the 1 for html when it first ran

Looks like html is not getting refreshed

Only see an event if it changes... but not pulling attribute values.

Nothing in the logs and I am not sure what to do next.

I found it... Pulled in the wrong template library. Try reimporting the bundle.

dev:6522022-10-14 04:43:35.440 pm errorjava.lang.NullPointerException: Cannot invoke method split() on null object on line 443 (method dataRefresh)

dev:6522022-10-14 04:43:35.431 pm errorRead Error: status code: 404, reason phrase: Not Found

dev:6522022-10-14 04:42:35.124 pm errorjava.lang.NullPointerException: Cannot invoke method split() on null object on line 443 (method dataRefresh)

dev:6522022-10-14 04:42:35.114 pm errorRead Error: status code: 404, reason phrase: Not Found

dev:6522022-10-14 04:42:32.210 pm errorjava.lang.NullPointerException: Cannot invoke method split() on null object on line 443 (method dataRefresh)

dev:6522022-10-14 04:42:32.182 pm errorRead Error: status code: 404, reason phrase: Not Found

dev:6522022-10-14 04:42:31.695 pm debugupdated()

dev:6522022-10-14 04:42:21.974 pm errorjava.lang.NullPointerException: Cannot invoke method split() on null object on line 443 (method dataRefresh)

dev:6522022-10-14 04:42:21.949 pm errorRead Error: status code: 404, reason phrase: Not Found

dev:6522022-10-14 04:42:12.262 pm errorjava.lang.NullPointerException: Cannot invoke method split() on null object on line 443 (method dataRefresh)

dev:6522022-10-14 04:42:12.212 pm errorRead Error: status code: 404, reason phrase: Not Found

Got into too much of a hurry, try again…Sorry about that

2022-10-14 04:53:56.448 pm errorgroovy.lang.MissingMethodException: No signature of method: user_driver_thebearmay_Air_Things_Device_989.getUnitFromState() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl) values: [co2] on line 468 (method dataRefresh)

One more time…

Yea! Looks like the temperature sign is wrong. but other than that, great!

image

I have Fahrenheit toggle selected.

Right now the driver is only storing the degree symbol not C or F. One of my outstanding items…

Thanks for working through the bugs with me.

Cool, and thank you for all of this. Somehow you knew I want this since I spent 2 hours this morning trying to get Tile Master-2 to work and create a custom tile. Now I don't need to!

Thanks for all of this and all you do here for the community.

1 Like

Here is how I got the values I wanted in a 1 x 1 tile.

Screenshot 2022-10-14 174821

<table>
<tr style="font-size:85%"><th>Basement</th><td></td></tr>
<tr style="font-size:85%"><th>Radon</th><td><%radonShortTermAvg%></td></tr>
<tr style="font-size:85%"><th>CO<sub>2</sub></th><td><%co2%></td></tr>
<tr style="font-size:85%"><th>VOC</th><td><%voc%></td></tr>
<tr style="font-size:85%"><th>Temp</th><td><%temperature%></td></tr>
<tr style="font-size:85%"><th>Humid</th><td><%humidity%></td></tr>
</table>
2 Likes