Air Things View Plus

It seems I do.

One other thought, go to the template selection and uncheck the file you have selected and then reselect it and save. Could also go to File Manager and make sure that the template file contents look correct.

So for some reason, the only option I have in the device for html selection is the option "webcore" or "no selection". The libraries files look fine to me.

Sounds like you’re missing the template file then, copy https://raw.githubusercontent.com/thebearmay/hubitat/main/airthings/tileTemplate.txt down to your File Manager and then select it from the driver.

Ok, it all makes sense now, I recently migrated my C5 hub to a new c7 hub but I guess it doesn't transfer contents from file manager to the new hub so that txt file wasn't on the new hub. Now it's working again! Thanks for your help and good to know file manager contents don't migrate to s new hub using hubitat protect.

1 Like

Think they may have just added the File Manager contents to the cloud backup (up to 100MB) in the last week. If you want to keep a regular local copy: [RELEASE] File Manager Backup & Restore

2 Likes

@thebearmay thank you very much for all your work on this app and all other useful apps.
About Air Things View Plus app - I am trying to add some javascript to make the values colorize based on value ranges. But when I update the template file to the one that has html+js there is an exception. Do you think this issue can be looked at please?

Here is the templatE file that causes this

<style>   .text-right {text-align: right;}   .text-left {text-align: left;}   table {     table-layout: fixed;     width: 100%;   }   th, td {     width: 50%;   }   .radon-value {color: black;}   .radon-value.green {color: green;}   .radon-value.orange {color: orange;}   .radon-value.red {color: red;} </style>
<script>   
var radonValue = parseFloat("<%radonShortTermAvg%>");
var radonCell = document.getElementById("radon-cell");
if (radonValue < 2.7) { radonCell.classList.add("green"); } else if (radonValue>= 2.7 && radonValue <= 4.0) { radonCell.classList.add("orange"); } else if (radonValue> 4.0) {     radonCell.classList.add("red");   }
</script>
<table>
	<tr>
		<th class="text-right">CO<sub>2</sub>
		</th>
		<td class="text-left"><%co2%>
		</td>
	</tr>
	<tr>
		<th class="text-right">Humidity</th>
		<td class="text-left"><%humidity%>
		</td>
	</tr>
	<tr>
		<th class="text-right">Pressure</th>
		<td class="text-left"><%pressure%>
		</td>
	</tr>
	<tr>
		<th class="text-right">Radon</th>
		<td id="radon-cell" class="text-left radon-value"><%radonShortTermAvg%>
		</td>
	</tr>
	<tr>
		<th class="text-right">Temperature</th>
		<td class="text-left"><%temperature%>
		</td>
	</tr>
	<tr>
		<th class="text-right">VOC</th>
		<td class="text-left"><%voc%>
		</td>
	</tr>
</table>

( Code above excluding the JS block is nice for anyone who wants to use it - it centers the columns and justifies them towards the center for better visual appeal :slight_smile: )
At this point the Dashboard tile does not show anything when html attribute is selected.
I also noticed that Hubitat has a built in limit of characters length of attributes < 1024 chars. But we still can do a lot of things with that much code length.

I am not sure if if has been asked before but please let us know if there is a ways to support you somehow because your work is very useful to many of us.

P.S. as I was writing this post and digging more into logs I realized that issue is most likely in Hubitat protection disallowing 'unsafe code' e.g. javascript in the attribute I use. Which makes sense. I guess I can try this other app which is made for a way to inject JS into dashboard.

app:52023-02-19 09:42:20.443 AM warn Excluded attribute html as it contained unsafe code
app:52023-02-19 09:42:20.441 AM warn Excluded attribute html size of attribute > 1024 characters

Did anyone else's Airthings stop reporting to HE dashboard? Mine stopped between yesterday and today.
Only change on my end was updating the hub software. I've restored my backup database from right before I updated the hub, but that does not fix it.
The tile that usually reports the Airthings data states: "Please select an attribute"

Check to see if you have a scheduled job for the device (bottom of the driver page), if not hit Initialize and it should restart.

Mine seems to be working fine.

Thanks. Mine "fixed itself" as of this am.
Saw on another board that Airthings told a user yesterday that they were "doing planned maintenance on ext-api." Maybe that had something to do with it.

2 Likes

unable to find any devices after adding the API information, am I missing something?

@loca5790 : Did you add the app (as opposed to "API information")
Go up to post 123 upthread (I don't know how to link a specific part of this thread) and follow the instructions to get it working.

It was missing the device driver. I manually installed everything from the zip folder and got it working... thanks!

1 Like

Glad you got it working!

Thank you so much!!! I am very new to the hubitat community and so glad there is an airtthings integration and it is working! Can i buy you a coffee?

This step by step walk-through was extremely helpful for me. Thank you.

I had one AirThings View Plus working just fine with this driver+app for the past month or so. Last week I bought 3 additional AirThings View Plus units (so now I have 4 total) and am having trouble getting all the new ones to communicate with my Hubitat. All 4 are working just fine from the AirThings iPhone App and from the AirThings web dashboard.

First thing I tried to get the 3 new ones connected to my Hubitat was just going into existing Air Things Cloud app on my Hubitat and clicking "Get Devices." All 3 new devices showed up. But when I went to my "Devices" section and clicked "initialize" on the new devices, no data populated. I tried repeatedly and could not get any data to populate in any of the new devices. I also noticed that my original device stopped auto updating its data according to the 5 minute polling that I had set it to a month or so ago when I originally set it up.

At this point I uninstalled the Hubitat Air Things Cloud app, all drivers, libraries, and bundles, and started over. I followed the step-by-step walk-through written above by calinatl. Created a new API ID and Airthings Secret. When I clicked "Get Devices" it once again says "Found 4 devices." So far so good. I then go to the Devices section and for the first two, when I clicked "initialize," the data populated. Looking good. But on the third, when I clicked "initialize," no data populates. And same for the 4th--nothing happens when I click "initialize."

So it seems to be correctly locating all 4 of them, but it is only initializing two of them. And I also notice that even for the 2 that it successfully initialized, those two are no longer auto-updating (I have polling set to 5 minutes).

Any ideas? At this point I'm just going to let it rest until tomorrow.

EDIT/Update: Just clicked "initialize" and both devices populated with sensor data this morning. No idea why, but waiting 18 hours and trying again appears to have solved the problem. I suspect that maybe adding so many devices at once caused the AirThings server to stop sending me data? Maybe polling limit was reached or something.

1 Like

That’s odd… I have 4 units myself (2 view, one mini and one plus) and they all report data accurately.

Do you recall doing anything special to get them all working? Or as far as you remember, did everything just populate as expected the first time you hit the "initalize" button?

Update: See my original post about this issue -- it's now fixed. Just waited 18 hours and clicked "initialize" again and now all 4 devices are populating data.

1 Like