goldencat Posted April 1, 2022 Share Posted April 1, 2022 Here is a challenge I want to solve: Record events during the day or internet outage then by end of the day or when an internet comes back send an email with recorded events WITH timestamps. So I need to record the time of the event... My research got me nowhere while in the middle of this road i found people reporting doing so with Variable manipulator and os.time() and os.date(). yet Chowmain Software tech support told me I can do it. Had anyone actually done it????? Now I'm looking at Generic TCP Command Driver. Is there some sort of GET command to the controller to get the current Timestamp and then save it to the variable. I've been doing Smart home programming for 15ish years, just never got myself to go beyond click and drag, Better late than never: now time to get typing or copy and paste. Yet, it could be as simple as having an inexpensive device on local network with the driver what would have a current time as a variable -- Many thanks, Quote Link to comment Share on other sites More sharing options...
Cinegration Posted April 1, 2022 Share Posted April 1, 2022 I’m still confused as to what you are asking? So if internet is off do what? Quote Link to comment Share on other sites More sharing options...
TFlury Posted April 1, 2022 Share Posted April 1, 2022 There are lua commands for grabbing current time. https://www.lua.org/pil/22.1.html You could use that and save the info to an array/table Quote Link to comment Share on other sites More sharing options...
RAV Posted April 1, 2022 Share Posted April 1, 2022 From my Archives.... (not my driver) This driver provides a timestamp text string as a variable to use in email and push notifications. Through programming you select when to set the variable. Then you can include the last set in an email, push etc. DW_Timestamp.c4i Quote Link to comment Share on other sites More sharing options...
goldencat Posted April 1, 2022 Author Share Posted April 1, 2022 First and foremost. Thank You everyone for response. Quote Link to comment Share on other sites More sharing options...
goldencat Posted April 1, 2022 Author Share Posted April 1, 2022 5 hours ago, TFlury said: There are lua commands for grabbing current time. https://www.lua.org/pil/22.1.html You could use that and save the info to an array/table This is a very same website I've got from Chowmain support. Can You or some one Please point me to the direction where to start. Links, Pictures, Project Samples . I'm Working on 3.2.4 version. Thank You for taking your time. Quote Link to comment Share on other sites More sharing options...
goldencat Posted April 1, 2022 Author Share Posted April 1, 2022 5 hours ago, RAV said: From my Archives.... (not my driver) This driver provides a timestamp text string as a variable to use in email and push notifications. Through programming you select when to set the variable. Then you can include the last set in an email, push etc. DW_Timestamp.c4i 2.49 kB · 2 downloads Ether I'm doing something wrong or it is 3.2.4 version or else??. Variables: TempHoldTimestamp (string variable) Macro: Test Save Timestamp Delay: 2sec Set Variable ->TempHoldTimestamp to the value of test room->Timestamp->Timestamp As results I can see current Timestamp in Lua output of Timestamp driver. but "TempHoldTimestamp" variable doesn't get the value. it is get overwritten. before I had run the test macro, I vent to variable agent in put random characters in TempHoldTimestamp variable, It got empty after running macro Quote Link to comment Share on other sites More sharing options...
goldencat Posted April 1, 2022 Author Share Posted April 1, 2022 6 hours ago, Cinegration said: I’m still confused as to what you are asking? So if internet is off do what? Before I figured out "Free Ping Driver" not going to work for this challenge, The Idea was to save Three Variables with ping results and send email with those results with timestamp attached to each of them, once internet gets back. The code on the screenshot is not final, but should give an idea. Quote Link to comment Share on other sites More sharing options...
Andrew luecke Posted April 1, 2022 Share Posted April 1, 2022 3 hours ago, goldencat said: Before I figured out "Free Ping Driver" not going to work for this challenge, The Idea was to save Three Variables with ping results and send email with those results with timestamp attached to each of them, once internet gets back. The code on the screenshot is not final, but should give an idea. Just a heads up, but you're better off using something that uses http command to check if the internet is online anyway The free ping driver runs the ping command, and it's fairly public knowledge that drivers running commands likely will break in the future (for security reasons, and probably because I suspect they are blocking commands which stall everything else) Quote Link to comment Share on other sites More sharing options...
goldencat Posted April 1, 2022 Author Share Posted April 1, 2022 40 minutes ago, Andrew luecke said: Just a heads up, but you're better off using something that uses http command to check if the internet is online anyway The free ping driver runs the ping command, and it's fairly public knowledge that drivers running commands likely will break in the future (for security reasons, and probably because I suspect they are blocking commands which stall everything else) I agree with You. I'm looking at Generic TCP Command driver, I just can't buy them all. Yet at least. If You can suggest anything else I'm very open, My feeling for Generic TCP Command if/then I figurate it out, it opens more doors. As for ping Driver, It does what it promises yet at least, it didn't work for me. If Host is nor reachable variable doesn't get updated. I already killed all the screenshotted code, and there is a critical error in it, so if reused use caution. {}{}{}commands which stall everything else) these are new words for me Quote Link to comment Share on other sites More sharing options...
RAV Posted April 2, 2022 Share Posted April 2, 2022 18 hours ago, goldencat said: Ether I'm doing something wrong or it is 3.2.4 version or else??. Variables: TempHoldTimestamp (string variable) Macro: Test Save Timestamp Delay: 2sec Set Variable ->TempHoldTimestamp to the value of test room->Timestamp->Timestamp As results I can see current Timestamp in Lua output of Timestamp driver. but "TempHoldTimestamp" variable doesn't get the value. it is get overwritten. before I had run the test macro, I vent to variable agent in put random characters in TempHoldTimestamp variable, It got empty after running macro Could be broke. It's old, and someone wrote it as a quicky. Quote Link to comment Share on other sites More sharing options...
goldencat Posted April 2, 2022 Author Share Posted April 2, 2022 I just can't believe it is not passable. Getting something as simple as current time and date Quote Link to comment Share on other sites More sharing options...
msgreenf Posted April 2, 2022 Share Posted April 2, 2022 This is what an RMM platform is for not a home automation platform Quote Link to comment Share on other sites More sharing options...
goldencat Posted April 3, 2022 Author Share Posted April 3, 2022 I found 2 typos in programming, still may be more, Yet. can be proud of myself, I don't do this kind of programming. Tank You Everyone and big Thank You RAV Timestamp.c4i Andrew luecke and South Africa C4 user 1 1 Quote Link to comment Share on other sites More sharing options...
msgreenf Posted April 3, 2022 Share Posted April 3, 2022 What email are you going to send w no internet? This is why RMMs do this from the server... Quote Link to comment Share on other sites More sharing options...
goldencat Posted April 3, 2022 Author Share Posted April 3, 2022 2 minutes ago, msgreenf said: What email are you going to send w no internet? This is why RMMs do this from the server... .....when an internet comes back. I have one RMM. it is called OVRC. Ram Siva 1 Quote Link to comment Share on other sites More sharing options...
msgreenf Posted April 3, 2022 Share Posted April 3, 2022 .....when an internet comes back. I have one RMM. it is called OVRC.So what are you trying to do that ovrc can't? Sent from my Pixel 6 Pro using Tapatalk Quote Link to comment Share on other sites More sharing options...
goldencat Posted April 3, 2022 Author Share Posted April 3, 2022 20 minutes ago, msgreenf said: So what are you trying to do that ovrc can't? Sent from my Pixel 6 Pro using Tapatalk Get log before rebooting. Yet, this is a different subject. I created this topic For timestamp problem, I can easily see many different scenarios where I'm going to use it. Quote Link to comment Share on other sites More sharing options...
alanchow Posted April 4, 2022 Share Posted April 4, 2022 If your goal is to record events then this driver will do what you want. https://chowmain.software/drivers/control4-event-logging combined with https://chowmain.software/drivers/control4-notification-suite and you can email it out whenever you want. Quote Link to comment Share on other sites More sharing options...
alanchow Posted April 4, 2022 Share Posted April 4, 2022 On 4/2/2022 at 10:07 AM, Andrew luecke said: Just a heads up, but you're better off using something that uses http command to check if the internet is online anyway The free ping driver runs the ping command, and it's fairly public knowledge that drivers running commands likely will break in the future (for security reasons, and probably because I suspect they are blocking commands which stall everything else) Our ping driver also will stop working shortly. This driver monitors internet connectivity. https://chowmain.software/drivers/control4-internet-rebooter Andrew luecke 1 Quote Link to comment Share on other sites More sharing options...
RAV Posted April 4, 2022 Share Posted April 4, 2022 On 4/2/2022 at 8:00 PM, goldencat said: I found 2 typos in programming, still may be more, Yet. can be proud of myself, I don't do this kind of programming. Tank You Everyone and big Thank You RAV Timestamp.c4i 2.49 kB · 4 downloads What's the second typo? (I saw the one with the cap in the variable name in the Set command) Quote Link to comment Share on other sites More sharing options...
goldencat Posted April 4, 2022 Author Share Posted April 4, 2022 4 hours ago, RAV said: What's the second typo? (I saw the one with the cap in the variable name in the Set command) The first one Capital letter should be "Timestamp" instead of "TimeStamp" Quote Link to comment Share on other sites More sharing options...
goldencat Posted April 6, 2022 Author Share Posted April 6, 2022 On 4/3/2022 at 5:04 PM, alanchow said: If your goal is to record events then this driver will do what you want. https://chowmain.software/drivers/control4-event-logging combined with https://chowmain.software/drivers/control4-notification-suite and you can email it out whenever you want. You once said: "With the variable manipulator you can do this using os.time() and os.date()." Can you please post some examples. Quote Link to comment Share on other sites More sharing options...
alanchow Posted April 6, 2022 Share Posted April 6, 2022 6 hours ago, goldencat said: You once said: "With the variable manipulator you can do this using os.time() and os.date()." Can you please post some examples. This was a mistake. You cannot do that. The event logging driver should do what you want though. Its designed to log events into a text file which you can access via web browser or SMB share. The notificaiton suite can also attach any file on a webserver to an email and send it off. It can be used together to send the event log. Ram Siva 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.