Creating a group to count how many offline devices there are

Hi everyone,

I was able to make a group to count how many items are ON of OPEN however is there a way i can do the same with Things to count how many devices in the group are OFFLINE?

I tried this but it did not yield any non zero results even if group items are offline.

What is the type of the members of this Group? Are their state exactly OFFLINE? The count expression probably should not have quotes. It uses a String comparison no matter the type of the Item.

Thanks for the reply… i think this is where im running into an issue… how do i get the Thing itself in the group. Can i even do that? The Thing is OFFLINE but the ITEM under it just says NULL or the last value.

You don’t. You can’t do that. At least without a rule you can’t. A Group is a group of Items. Things are not Items.

There is a rule on the marketplace that will call a rule you write when a Thing goes OFFLINE. Thing Status Reporting [4.0.0.0;4.9.9.9]

You can use that to update an Item, update a bunch of Items, keep a count, restart a binding, or what ever it is you want to do in response to a Thing going OFFLINE.

Given that Things are really only something that an admin would care about, you also have the option to search for “OFFLINE” on the Settings → Things page and narrow the list down to those that are OFFLINE.

You can get a list of all the Things that are offline in a rule, In JS Scripting it’s as simple as:

var notOnline = things.getThings().filter( t => t.status != "ONLINE");

Makes sense! Thank you for that rule. Ill switch over to that.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.