control4user007 Posted January 20, 2014 Share Posted January 20, 2014 Hi, I want to have a way to count how long my TV's are on during the day (to use in an email by adding a variable). I'm not sure if I am missing something simple, but I don't think the timer widget can help? I want it to work something like this: Every night at 12:00 am, the counter will reset to 0. Whenever a particular TV in the house is turned on, it will start counting how long it registers "on" for. At the end of every night I will get an email with the total hours that each TV in the house was on for. Does that sound like something that is doable? Thanks! Link to comment Share on other sites More sharing options...
Cyknight Posted January 20, 2014 Share Posted January 20, 2014 Timer with wanted interval (I'll use 60 seconds/1 minute for example)Variable number When TV turns on START (NOT reset in this case) timerWhen TV turns off STOP timer.When timer expires, add 1 to the variable. At end of day email the variable before resetting to 0. Email will give time in minutes in my scenario, but use what ever timer length you want. Link to comment Share on other sites More sharing options...
control4user007 Posted January 20, 2014 Author Share Posted January 20, 2014 Very interesting. Thank you for the example. Is there a way in the email to convert the minutes to HH:MM? Link to comment Share on other sites More sharing options...
Cyknight Posted January 20, 2014 Share Posted January 20, 2014 No, not in the email template, although you could have the variable that counts the minutes (ie one 60 second timer expiration) in my example do:When Timer expiresvariable [minutes] +1 plus: When variable [minutes] changesIF variable [minutes] is equal to 60----variable [hours] +1----set variable [minutes] to 0 And send both variables in an email: "The TV was on for [$variable hours] hour(s) and [$variable minutes] minute(s)" Link to comment Share on other sites More sharing options...
control4user007 Posted January 20, 2014 Author Share Posted January 20, 2014 Perfect! Exactly what I was looking for! Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.