Elapsed time formating

Posted on
Sun Mar 28, 2021 4:20 pm
peszko offline
Posts: 311
Joined: Mar 07, 2012

Elapsed time formating

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?

Posted on
Mon Mar 29, 2021 8:33 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Elapsed time formating

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

Bill
My Plugin: My People

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest