%c_m2dhm%(%uptime%) does nothing

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
sander815
Normal user
Posts: 11
Joined: 30 Jan 2017, 18:50

%c_m2dhm%(%uptime%) does nothing

#1 Post by sander815 » 05 Aug 2019, 19:18

i want to display uptime in days hours and seconds, but when adding this
%c_m2dhm%(%uptime%)
as formula, it still shows amount of minutes, notyhing changes

User avatar
grovkillen
Core team member
Posts: 3607
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: %c_m2dhm%(%uptime%) does nothing

#2 Post by grovkillen » 05 Aug 2019, 19:26

Sorry, you cannot use that in formula, only in rules.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

waspie
Normal user
Posts: 119
Joined: 09 Feb 2017, 19:35

Re: %c_m2dhm%(%uptime%) does nothing

#3 Post by waspie » 06 Aug 2019, 15:17

grovkillen wrote:
05 Aug 2019, 19:26
Sorry, you cannot use that in formula, only in rules.
could he use it in a rule and write the value to a dummy item and run the formula on the dummy?

User avatar
grovkillen
Core team member
Posts: 3607
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: %c_m2dhm%(%uptime%) does nothing

#4 Post by grovkillen » 06 Aug 2019, 19:45

Yes but the formula would be done by the rules in that case, not formula.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
ThomasB
Normal user
Posts: 696
Joined: 17 Jun 2018, 20:41
Location: USA

Re: %c_m2dhm%(%uptime%) does nothing

#5 Post by ThomasB » 06 Aug 2019, 20:06

i want to display uptime in days hours and seconds...
As suggested you can use rules to calculate/store the three %uptime% derived values to dummy variables. Then use the three dummy values to create the dd:hh:mm message for your display. Or skip the dummy's and directly send the calculated values.

If you need additional advice then please tell us where you want to display the values. Include the details to any plugins and controllers you are using.

- Thomas

Domosapiens
Normal user
Posts: 307
Joined: 06 Nov 2016, 13:45

Re: %c_m2dhm%(%uptime%) does nothing

#6 Post by Domosapiens » 06 Aug 2019, 23:43

For those who are also lost with %c_m2dhm%
See:
https://www.letscontrolit.com/wiki/inde ... asyFormula end of page.

:o :roll:
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.

User avatar
ThomasB
Normal user
Posts: 696
Joined: 17 Jun 2018, 20:41
Location: USA

Re: %c_m2dhm%(%uptime%) does nothing

#7 Post by ThomasB » 06 Aug 2019, 23:56

Another source for standard conversion formulas (and other useful things) is from ESPEasy's Tools menu: Tools->SystemVariables
http://IP_ADDR/sysvars

- Thomas

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 11 guests