Andy P Posted 12 hours ago Posted 12 hours ago I searched the forums and read all the discussions about program execution and how it is not in the log. You can pull the info on each program with 192.168.x.x:8080/rest/programs and get the last run time and next scheduled time. But that is it. So, I decided to try using notifications. In Configuration -> Emails/Notifications -> Customizations I created a notification called Log Program. Left From blank Subject: @webpage:@append:/mydir/mylog.txt Body: ${sys.program.#.address} ${sys.program.#.name} ${sys.program.#.status} ${sys.date} ${sys.time} Then I added the notification to the programs I wanted to log such as this, and both the Then and Else if there was one Breezeway Motion Copy - [ID 009D][Parent 0010] If 'YoLink / Motion Breezeway' is switched Motion Then Set 'Breezeway' On 80% Set 'Breezeway Remote' On 80% Send Notification to 'Default' content 'Log Program' The result I retrieve using 192.168.x.x:8443/FILES/USER/WEB/mydir/mylog.txt looks as follows: program[109] Breezeway Motion True 2025/01/23 02:23:17 PM program[17] Mud or Hall Motion True 2025/01/23 02:23:20 PM program[70] Side Door Opens True 2025/01/23 02:23:20 PM program[17] Mud or Hall Motion False 2025/01/23 02:23:22 PM program[19] Mudroom Motion End True 2025/01/23 02:24:20 PM program[110] Breezeway Motion Off Dim True 2025/01/23 02:24:23 PM program[17] Mud or Hall Motion True 2025/01/23 02:24:29 PM program[17] Mud or Hall Motion True 2025/01/23 02:24:29 PM program[51] Hallway Motion End True 2025/01/23 02:25:08 PM program[110] Breezeway Motion Off Dim True 2025/01/23 02:26:01 PM program[148] Hallway Motion Backstop True 2025/01/23 02:29:30 PM program[110] Breezeway Motion Off Dim True 2025/01/23 02:36:01 PM So now I have a nice log of program execution which I can parse and add to my timeline. Anyone else doing this? Is there a better way? Andy Quote
Geddy Posted 11 hours ago Posted 11 hours ago 37 minutes ago, Andy P said: Anyone else doing this? Not me. I guess my question is why is this necessary (why are you doing this)? My outlook on notifications is more for if something doesn't happen that results in an urgent situation (like a water leak or CO sensor alarm). My thought is if I get notifications all the time that I (personally) would tend to disregard the notifications and therefore potentially miss an urgent alert. I don't worry when lights turn on (or off). I just care if there is really an urgent situation that I should be notified about that would alarm me and mean I should look into the situation. Quote
Guy Lavoie Posted 11 hours ago Posted 11 hours ago Well I can see this being useful when implementing some new functionality and you want to monitor it for a while to make sure it's working as planned. Logging security events might also be a useful application. Quote
Andy P Posted 11 hours ago Author Posted 11 hours ago As Guy says, it is helpful when you have multiple programs interacting with one another to make sure they are executing in the sequence expected. For example, the breezeway light has four different scenarios depending on the time of day. The program that is supposed to run gets enabled by schedule and the others disabled. If there is motion, it also depends on the time as to which program runs. So this helps me sort out that everything is happening the way I want and expect. I can also see when the Then branch gets triggered and the Else branch. But these are not Notifications in the sense that they notify you. They use the notification function to create a log entry only. No email, no push notification. In that sense, it is exactly the same as every device making a log entry when they turn on/off/dim. 1 Quote
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.