I'm using the sysinfo plugin for display purposes. Is there an easy formula that can go in the formula "box" in the plugin settings that will convert the seconds to day, hour, minute, second format?
Or if not can that format be added as a variable?
Convert uptime seconds to days hours ect
Moderators: grovkillen, Stuntteam, TD-er, enesbcs
- budman1758
- Normal user
- Posts: 303
- Joined: 15 Apr 2017, 05:13
- Location: Riverside CA USA
Convert uptime seconds to days hours ect
"The glass is twice as big as it needs to be".
Re: Convert uptime seconds to days hours ect
Do you need the actual time of day?
Then see the sysvars page on the ESP for all the various time related variables you should be able to use anywhere, also in rules and in display plugins.
Then see the sysvars page on the ESP for all the various time related variables you should be able to use anywhere, also in rules and in display plugins.
- budman1758
- Normal user
- Posts: 303
- Joined: 15 Apr 2017, 05:13
- Location: Riverside CA USA
Re: Convert uptime seconds to days hours ect
On the RPIEasy variables page the only one there is for system uptime is displayed as seconds. That is what I'm wanting to display as days, hours, minutes. Not looking for the current time of day. On the main page the system uptime is displayed in the "system info" area like I want.
EDIT: I see on an ESP unit in the variables page at the bottom "standard conversions" one to do what I want now. Cant figure out how to add that formula in the formula box in the plugin and get it to work. How do I format the actual formula? %value%=%c_s2dhms%(100000) doesn't work. (on ESP) Pointers?
"The glass is twice as big as it needs to be".
Re: Convert uptime seconds to days hours ect
c_s2dhms is not currently supported in RPIEasy, but can be. c_m2dhm can be used for now.budman1758 wrote: ↑27 Jan 2021, 16:43 EDIT: I see on an ESP unit in the variables page at the bottom "standard conversions" one to do what I want now. Cant figure out how to add that formula in the formula box in the plugin and get it to work. How do I format the actual formula? %value%=%c_s2dhms%(100000) doesn't work. (on ESP) Pointers?
I think it may works in this form as a formula:
%c_s2dhms%(%value%)
but easiest approach to use the current uptime variable and convert it (it can be added to the input field of display plugins):
%c_m2dhm%(%uptime%)
update: Uptime is in minutes, not seconds.
Re: Convert uptime seconds to days hours ect
c_s2dhms added to RPIEasy at todays commit.
Who is online
Users browsing this forum: No registered users and 6 guests