Elapsed time formating

Posts: 311
Joined: Wed Mar 07, 2012 5:37 pm

Elapsed time formating

Post by peszko »

I'm using uptime and offline_seconds to show on a controll page, but showing seconds for this is not the best, so I convert it to days, hours, minutes. Currently I'm accomplishing this by using triggers and variables. I convert the seconds for each state for each device to readable format and place it in a variable which then I show on a controll page. This is a bit cumbersome as I have to create a variable and trigger for every device.sate combo I wan to use.

Anybody has a better idea how to show elapsed time?
User avatar
Posts: 763
Joined: Tue Jan 15, 2013 11:23 am
Location: Houston, TX

Re: Elapsed time formating

Post by whmoorejr »

Check out the Pulse plugin... https://forums.indigodomo.com/viewforum.php?f=333
and the Timed Devices plugin https://www.indigodomo.com/pluginstore/88/

I'd recommend using one or both of those to get what you want. I use a combination of timed devices plugin, triggers and variables to track when my network is up/down and keep a count. (I had that all set up before the pulse plugin existed. I installed and tested the pulse plugin... but since my stuff was already working, I left it as is.

I created a "Network" device that uses the online sensor plugin to turn on-off the device. Then triggers start/stop running timers for either online or offline. When there is a status change, another trigger adds +1 to today, this week, this month and this year. Then there are schedules for daily, weekly, monthly and annually that take the totals for that period and move them today -> yesterday. This week -> last week. This Month -> Last Month. This Year -> Last Year.

I'm pretty sure the pulse plugin has all of that in the plugin without a need for the extra schedules and triggers.

Hope that helps
My Plugin: My People
Post Reply

Return to “miniUniFi”