Dashboard - Count specific states


I’m trying to create reports that counts up how many times a specific state occurred on a device.
Right now, I have devices with an ‘activity’ attribute.

The activity attribute gets updated with different String states, such as “Open” “Motion” “Button pressed”

I want to count how many times the “Button pressed” state occurred in the past month on my device to show on a dashboard that I can use to create reports, but I’m not entirely sure where to start here. I can get total count of states on my device, but I can’t seem to sort out ‘filtering’ that count for specific states.

Hi @Danny_Nguyen,

This is a great question.

One workaround you can do is:

  1. Add an attribute to this device with a name like “buttonPressCounter” or something similar.
  2. Using a workflow, report 1 (or something similar) when the button is pressed
  3. Use a count aggregation over a specific time period to get the number of times “buttonPressCounter” showed up

Although this is a workaround, I do think there is a Feature Request built in here. I’m going to create a feature request that will make this much easier. I will keep you updated as I learn more about it!

Please let me know if this makes sense or if you need any further help!

Thank you,
Heath Blandford
Customer Success Engineer

Thanks for this Heath!
I would love for it to be some sort of optional text input under a device - attribute query to match a string/number/boolean/etc.

If this could be done from within the dashboard to get live data reports, that would be fantastic. I can currently use all the dashboard blocks to count the total number, but I could create some killer value-add reports if we can do something like that.

Looking forward to seeing what you guys can do here!