JBanaszak Posted August 4, 2017 Posted August 4, 2017 Hello all, Is it possible to access and/or save the information in the Event Viewer via a program? I often leave my home vacant for long periods of time (a month or more) and would like a notification and record of where folks go when they come to check on the house. Since I have the Elk module, all the information I need (e.g., motion sensor status, doors movements, alarm state, etc.) is in the Event Viewer. I am envisioning a program structure like: If the alarm is in Vacation mode and is disarmed (my Elk sends me a text when this happens), log all the information in the Event Viewer for one hour, save it and/or paste it into an email to me, and notify me it's available when the alarm is reset. If not the Event Viewer, any other guidance on how and can achieve my goal? Thanks, Jim
larryllix Posted August 5, 2017 Posted August 5, 2017 With the network resources module notifications can be sent to a file inside ISY using a special email address technique. MWaremen also wrote a program that can reside inside ISY to show the information as graphic display in a browser. This is all shown in a thread somewhere on the forums. I assign all my rooms numbers and when notifications are sent I show the room number for the event along with a listing of the room numbers. For easy remembering I use 1x for first floor rooms, and 2x numbers for second floor rooms, 3x number for outside and my workshop outbuilding. Units digits are 1 for main rooms and 9 for exit areas for each floor. I also use Integer variables with permanent value assignments (constants) to define the room numbers so I don;t have to remember when writing programs. eg. set $sRoom = $cGATHERING_ROOM (preset to 11) I use Insteon MSes for security but you have to allow for the odd false report, as they are not that good quality. I allow one report every X minutes, but two different MS reports I take action. A very simple technique is to use a block of variables and when an MS reports, move all value down one and insert the newest location number at the top. (shift register style)' With a time clock technique (V5.0.10 makes it easy) you could record the time of each occurrence in say.... every second variable of your home made history.
JBanaszak Posted August 5, 2017 Author Posted August 5, 2017 Thanks Larry. I will check out MWareman's posts. Interesting how you use variables....I knew it could be done but had not worked out the structure you have. Very helpful! Sent from my iPhone using Tapatalk
KeviNH Posted August 5, 2017 Posted August 5, 2017 I use the method of logging events to a file on the ISY, this requires each interesting program to call a notification. I also have my ISY setup with Network Resources which generate standardized syslog messages to a syslog listener. There are tons of free and commercial software packages to receive syslog and process it. There's even a free cloud service. Is it possible to access and/or save the information in the Event Viewer via a program? I often leave my home vacant for long periods of time (a month or more) and would like a notification and record of where folks go when they come to check on the house. Since I have the Elk module, all the information I need (e.g., motion sensor status, doors movements, alarm state, etc.) is in the Event Viewer. I am envisioning a program structure like: If the alarm is in Vacation mode and is disarmed (my Elk sends me a text when this happens), log all the information in the Event Viewer for one hour, save it and/or paste it into an email to me, and notify me it's available when the alarm is reset. If not the Event Viewer, any other guidance on how and can achieve my goal? To achieve the goal of "save it and paste it to an email", you'd need an external computer which can communicate with the ISY. Could be a PC or Mac that is always on, or something like a Raspberry Pi. I know drich was working on an external ISYlib-python app to connect to ISY and capture Insteon traffic logs. That could run on rPi.
JBanaszak Posted August 6, 2017 Author Posted August 6, 2017 Thanks Kevin. I have the network module and understand the capability to email and append to a file. I need to decide it I want to open up a port to view this as a web service or take the second step as you suggest. Sent from my iPhone using Tapatalk
larryllix Posted August 6, 2017 Posted August 6, 2017 I previous recorded room motion sequences by the numbers. I used two variables as shift registers and every time motion was detected, that room number was shifted into the least significant variable and through the most significant variable. I believe you can hold four double digit room numbers in each variable, so the recording held an 8 room history of MS triggers. One problem was movement in one room could flood the recording variables with all the same so I decided to write every MS trigger into a state trigger variable. Only when the variable changed did the recording shift register system come into play, so MS all in one room only made one recording After a time period has elapsed the recording system could email/notify you of the content so of the two (or more) variables along with your room legend. You can track the path taken then from a notification. After sending it, wait some time and clear both variables out again to start clean or just shift in a 00 as a blank room number. To create the shift register program you take the MS variable and multiply it by 100 (shift two digits left). Take the modulus (ISY has the function) of the LS variable by 100 x 100 x 100 x 100 to get the remainder (top two digits) and add that to the MS variable. Now shift the LS variable (losing the top two digits) by multiplying by 100 (two digit shift left) and add the new room number. I can't quite remember but I think you need to clean off the shifted up garbage for each variable or it makes the number confused looking because variable are actually capable of +/- 2^31 and it is not kept in decimal format like we are wanting to see as humans. Set up each program and manual change the "seed" trigger variable and see what happens to you shifted variable until you get it working. Then work on sending it logic. Can we do it?.. YES we can!
larryllix Posted August 6, 2017 Posted August 6, 2017 I found my MS low battery history program that does the same thing but with only one variable so it only hold four events but it should give you an idea how this can work. Each MS has a program that put's it's room number into the trigger variable and it runs by itself from then on. MS LowBatt Recording - [ID 0078][Parent 00CD] If $sMS.lowBatt.room is not 0 Then $MS_LowBatt.roomList %= 1000000 $MS_LowBatt.roomList *= 100 $MS_LowBatt.roomList += $sMS.lowBatt.room $MS_LowBatt.roomList Init To $MS_LowBatt.roomList Wait 2 seconds $sMS.lowBatt.room = 0 Else - No Actions - (To add one, press 'Action') Else autoruns when $sMS_Error_Room gets returned to 0
JBanaszak Posted August 6, 2017 Author Posted August 6, 2017 Thanks for all the suggestions guys! Sent from my iPhone using Tapatalk
JBanaszak Posted August 27, 2017 Author Posted August 27, 2017 An update for anyone landing here on a search. This turned out to be much simpler that I expected. Since I have the Elk module, all monitored events are available as an Alert notification. I set up a state variable that is True when the house is armed to Vacation mode. Even though the house is occupied when someone comes to check on it, I keep the Vacation variable True for a set period of time after the system is disarmed (an hour right now) so that programs in a linked folder run during that time. As long as the system is re-armed within this period of time the house systems (lighting, HVAC, etc.) do not change status. I then set up a notification that is triggered by violation of any Elk zone (while Vacation=True) with the following content: On ${sys.date} at ${sys.time} ${alert.event}. I have this notification sent to me via text and also populate a file on the internal ISY web server. I have been testing this and it seems pretty robust as I can easily track movement through the house, doors opening/closing, etc. As an added bonus, the date format output from sys.date ends up creating a nice year/month folder structure on the ISY and populates individual files for each day. Again, thanks for all the helpful suggestions!
larryllix Posted August 27, 2017 Posted August 27, 2017 An update for anyone landing here on a search. This turned out to be much simpler that I expected. Since I have the Elk module, all monitored events are available as an Alert notification. I set up a state variable that is True when the house is armed to Vacation mode. Even though the house is occupied when someone comes to check on it, I keep the Vacation variable True for a set period of time after the system is disarmed (an hour right now) so that programs in a linked folder run during that time. As long as the system is re-armed within this period of time the house systems (lighting, HVAC, etc.) do not change status. I then set up a notification that is triggered by violation of any Elk zone (while Vacation=True) with the following content: On ${sys.date} at ${sys.time} ${alert.event}. I have this notification sent to me via text and also populate a file on the internal ISY web server. I have been testing this and it seems pretty robust as I can easily track movement through the house, doors opening/closing, etc. As an added bonus, the date format output from sys.date ends up creating a nice year/month folder structure on the ISY and populates individual files for each day. Again, thanks for all the helpful suggestions! Nice! Make your ISY pay it's own way!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.