born2dive Posted September 14, 2015 Posted September 14, 2015 I have an ISY with a variety of devices attached: censors, lights, switches, garage doors sensors, etc. I use MobiLinc to access the system while remote. I am looking for a solution that will allow me to access a persistent log from my iPhone of all the activities that occur on my system: when a door was opened, when a light was turned on, when did the water fountain turn off, when did the garage door open. Obviously I can get the current state on MobiLinc, I am looking for a solution that allows me access prior activity by date and time. If it's organized by type of device that would be a great plus too. I have seen heard that there is a solution using RPi and Arduino called something like "homeboy" or "homebuoy" or something similar. I don't own either but willing to buy if they work. Any ideas would be appreciated. -H
Xathros Posted September 14, 2015 Posted September 14, 2015 I am using a RPi running Raspbian an simply writing log entries to the Syslog server running on the Pi. I can access that via SSH login or daily archives of that log file via apache web server also running on the same Pi. Wasn't too hard to set up but does require the network module on the ISY to write to the syslog server and a network rule for each item you want to send to the log (this can be reduced somewhat with variable substitution). -Xathros
born2dive Posted September 14, 2015 Author Posted September 14, 2015 I am using a RPi running Raspbian an simply writing log entries to the Syslog server running on the Pi. I can access that via SSH login or daily archives of that log file via apache web server also running on the same Pi. Wasn't too hard to set up but does require the network module on the ISY to write to the syslog server and a network rule for each item you want to send to the log (this can be reduced somewhat with variable substitution). -Xathros Thanks. Can you point me somewhere where I can do some reading on how to setup?
Xathros Posted September 16, 2015 Posted September 16, 2015 (edited) Thanks. Can you point me somewhere where I can do some reading on how to setup? Well, I did a bit of Googling to get me started. I used: http://resources.intenseschool.com/raspberry-pi-as-a-syslog-server/ as the guide to get me going. Once running, I had to create: Log Destination: d_isy, Log to file, /var/log/isy994.log Log Filter: f_isy, Simple Conditions, From Hostname, <isy's ip address> Log Target: Source: s_udp, Destination: d_isy, Filter: f_isy Then I crafted my own resource rules to write to the server. Here are two: Thats pretty much all there is to gathering the log data. You can do a bit more by configuring the log rotator to move the previous days log to a shared location or webserver if needed. Here is an excerpt from my current log: Sep 16 09:05:38 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:05:42 192.168.2.20 ISY994i - OCPNCY - Matt iPad Online. Sep 16 09:07:14 192.168.2.20 ISY994i - MOTION - Master Bed. Sep 16 09:07:48 192.168.2.20 ISY994i - MOTION - Master Bed. Sep 16 09:08:30 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:08:30 192.168.2.20 ISY994i - MOTION - Main Bath. Sep 16 09:08:30 192.168.2.20 ISY994i - LIGTNG - Main Bath On. Sep 16 09:10:00 192.168.2.20 ISY994i - MOTION - Girls Room Sep 16 09:10:52 192.168.2.20 ISY994i - SECRTY - Front Porch Door Opened. Sep 16 09:10:52 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:11:01 192.168.2.20 ISY994i - SECRTY - Front Porch Door Closed. Time Open: 10 Seconds. Sep 16 09:11:01 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:13:45 192.168.2.20 ISY994i - LIGTNG - Main Bath Off. Sep 16 09:15:56 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:15:56 192.168.2.20 ISY994i - UTLITY - LivingRm Air Filter On. Sep 16 09:16:00 192.168.2.20 ISY994i - OCPNCY - Matt iPad Online. Sep 16 09:19:38 192.168.2.20 ISY994i - SECRTY - Front Porch Door Opened. Sep 16 09:19:38 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:19:46 192.168.2.20 ISY994i - SECRTY - Front Porch Door Closed. Time Open: 8 Seconds. Sep 16 09:19:46 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:19:54 192.168.2.20 ISY994i - MOTION - Girls Room Sep 16 09:21:05 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:26:16 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:26:21 192.168.2.20 ISY994i - OCPNCY - Matt iPad Online. Sep 16 09:31:18 192.168.2.20 ISY994i - NETWRK - Internet Access Test Started. Sep 16 09:31:23 192.168.2.20 ISY994i - NETWRK - Internet Access Test Passed. Sep 16 09:31:24 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:31:28 192.168.2.20 ISY994i - OCPNCY - Matt iPad Online. Sep 16 09:34:15 192.168.2.20 ISY994i - MOTION - Master Bed. Sep 16 09:34:20 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:34:20 192.168.2.20 ISY994i - LIGTNG - Master Bath Vanity Lights On. Sep 16 09:36:33 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:36:37 192.168.2.20 ISY994i - OCPNCY - Matt iPad Online. Sep 16 09:39:49 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:39:49 192.168.2.20 ISY994i - LIGTNG - Master Bath Vanity Lights Off. Sep 16 09:39:51 192.168.2.20 ISY994i - MOTION - Master Bed. Sep 16 09:40:09 192.168.2.20 ISY994i - UTLITY - Well Pump Running. Sep 16 09:41:26 192.168.2.20 ISY994i - UTLITY - Well Pump Stopped. Cycle# 6 Runtime: 80 Total: 620 Seconds. Let me know if you need something more. -Xathros Edited September 16, 2015 by Xathros
born2dive Posted September 18, 2015 Author Posted September 18, 2015 Well, I did a bit of Googling to get me started. I used: http://resources.intenseschool.com/raspberry-pi-as-a-syslog-server/ as the guide to get me going. Once running, I had to create: Log Destination: d_isy, Log to file, /var/log/isy994.log Log Filter: f_isy, Simple Conditions, From Hostname, <isy's ip address> Log Target: Source: s_udp, Destination: d_isy, Filter: f_isy Then I crafted my own resource rules to write to the server. Here are two: Screen Shot 2015-09-16 at 10.20.52 AM.jpg Screen Shot 2015-09-16 at 10.47.06 AM.jpg Thats pretty much all there is to gathering the log data. You can do a bit more by configuring the log rotator to move the previous days log to a shared location or webserver if needed. Here is an excerpt from my current log: Sep 16 09:05:38 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:05:42 192.168.2.20 ISY994i - OCPNCY - Matt iPad Online. Sep 16 09:07:14 192.168.2.20 ISY994i - MOTION - Master Bed. Sep 16 09:07:48 192.168.2.20 ISY994i - MOTION - Master Bed. Sep 16 09:08:30 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:08:30 192.168.2.20 ISY994i - MOTION - Main Bath. Sep 16 09:08:30 192.168.2.20 ISY994i - LIGTNG - Main Bath On. Sep 16 09:10:00 192.168.2.20 ISY994i - MOTION - Girls Room Sep 16 09:10:52 192.168.2.20 ISY994i - SECRTY - Front Porch Door Opened. Sep 16 09:10:52 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:11:01 192.168.2.20 ISY994i - SECRTY - Front Porch Door Closed. Time Open: 10 Seconds. Sep 16 09:11:01 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:13:45 192.168.2.20 ISY994i - LIGTNG - Main Bath Off. Sep 16 09:15:56 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:15:56 192.168.2.20 ISY994i - UTLITY - LivingRm Air Filter On. Sep 16 09:16:00 192.168.2.20 ISY994i - OCPNCY - Matt iPad Online. Sep 16 09:19:38 192.168.2.20 ISY994i - SECRTY - Front Porch Door Opened. Sep 16 09:19:38 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:19:46 192.168.2.20 ISY994i - SECRTY - Front Porch Door Closed. Time Open: 8 Seconds. Sep 16 09:19:46 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:19:54 192.168.2.20 ISY994i - MOTION - Girls Room Sep 16 09:21:05 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:26:16 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:26:21 192.168.2.20 ISY994i - OCPNCY - Matt iPad Online. Sep 16 09:31:18 192.168.2.20 ISY994i - NETWRK - Internet Access Test Started. Sep 16 09:31:23 192.168.2.20 ISY994i - NETWRK - Internet Access Test Passed. Sep 16 09:31:24 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:31:28 192.168.2.20 ISY994i - OCPNCY - Matt iPad Online. Sep 16 09:34:15 192.168.2.20 ISY994i - MOTION - Master Bed. Sep 16 09:34:20 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:34:20 192.168.2.20 ISY994i - LIGTNG - Master Bath Vanity Lights On. Sep 16 09:36:33 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:36:37 192.168.2.20 ISY994i - OCPNCY - Matt iPad Online. Sep 16 09:39:49 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:39:49 192.168.2.20 ISY994i - LIGTNG - Master Bath Vanity Lights Off. Sep 16 09:39:51 192.168.2.20 ISY994i - MOTION - Master Bed. Sep 16 09:40:09 192.168.2.20 ISY994i - UTLITY - Well Pump Running. Sep 16 09:41:26 192.168.2.20 ISY994i - UTLITY - Well Pump Stopped. Cycle# 6 Runtime: 80 Total: 620 Seconds. Let me know if you need something more. -Xathros Thanks for sharing. I will use this as a start and see if I can figure it out. I am new to RPi (actually don't have one yet) but I guess it'll be fun to try to figure out how to get this to work. Thanks again.
born2dive Posted December 25, 2015 Author Posted December 25, 2015 Well, I did a bit of Googling to get me started. I used: http://resources.intenseschool.com/raspberry-pi-as-a-syslog-server/ as the guide to get me going. Once running, I had to create: Log Destination: d_isy, Log to file, /var/log/isy994.log Log Filter: f_isy, Simple Conditions, From Hostname, <isy's ip address> Log Target: Source: s_udp, Destination: d_isy, Filter: f_isy Then I crafted my own resource rules to write to the server. Here are two: Screen Shot 2015-09-16 at 10.20.52 AM.jpg Screen Shot 2015-09-16 at 10.47.06 AM.jpg Thats pretty much all there is to gathering the log data. You can do a bit more by configuring the log rotator to move the previous days log to a shared location or webserver if needed. Here is an excerpt from my current log: Sep 16 09:05:38 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:05:42 192.168.2.20 ISY994i - OCPNCY - Matt iPad Online. Sep 16 09:07:14 192.168.2.20 ISY994i - MOTION - Master Bed. Sep 16 09:07:48 192.168.2.20 ISY994i - MOTION - Master Bed. Sep 16 09:08:30 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:08:30 192.168.2.20 ISY994i - MOTION - Main Bath. Sep 16 09:08:30 192.168.2.20 ISY994i - LIGTNG - Main Bath On. Sep 16 09:10:00 192.168.2.20 ISY994i - MOTION - Girls Room Sep 16 09:10:52 192.168.2.20 ISY994i - SECRTY - Front Porch Door Opened. Sep 16 09:10:52 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:11:01 192.168.2.20 ISY994i - SECRTY - Front Porch Door Closed. Time Open: 10 Seconds. Sep 16 09:11:01 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:13:45 192.168.2.20 ISY994i - LIGTNG - Main Bath Off. Sep 16 09:15:56 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:15:56 192.168.2.20 ISY994i - UTLITY - LivingRm Air Filter On. Sep 16 09:16:00 192.168.2.20 ISY994i - OCPNCY - Matt iPad Online. Sep 16 09:19:38 192.168.2.20 ISY994i - SECRTY - Front Porch Door Opened. Sep 16 09:19:38 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:19:46 192.168.2.20 ISY994i - SECRTY - Front Porch Door Closed. Time Open: 8 Seconds. Sep 16 09:19:46 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:19:54 192.168.2.20 ISY994i - MOTION - Girls Room Sep 16 09:21:05 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:26:16 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:26:21 192.168.2.20 ISY994i - OCPNCY - Matt iPad Online. Sep 16 09:31:18 192.168.2.20 ISY994i - NETWRK - Internet Access Test Started. Sep 16 09:31:23 192.168.2.20 ISY994i - NETWRK - Internet Access Test Passed. Sep 16 09:31:24 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:31:28 192.168.2.20 ISY994i - OCPNCY - Matt iPad Online. Sep 16 09:34:15 192.168.2.20 ISY994i - MOTION - Master Bed. Sep 16 09:34:20 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:34:20 192.168.2.20 ISY994i - LIGTNG - Master Bath Vanity Lights On. Sep 16 09:36:33 192.168.2.20 ISY994i - OCPNCY - Loras iPhone Online. Sep 16 09:36:37 192.168.2.20 ISY994i - OCPNCY - Matt iPad Online. Sep 16 09:39:49 192.168.2.20 ISY994i - OCPNCY - Control Event Detected. Sep 16 09:39:49 192.168.2.20 ISY994i - LIGTNG - Master Bath Vanity Lights Off. Sep 16 09:39:51 192.168.2.20 ISY994i - MOTION - Master Bed. Sep 16 09:40:09 192.168.2.20 ISY994i - UTLITY - Well Pump Running. Sep 16 09:41:26 192.168.2.20 ISY994i - UTLITY - Well Pump Stopped. Cycle# 6 Runtime: 80 Total: 620 Seconds. Let me know if you need something more. -Xathros I have the RPi setup, also running Apache, PHP, and MySQL. I have not installed Syslog yet. The link you refer to above describes a Cisco router and RPi integration. How did you setup to connect to the ISY instead. I just bought the network module too. My main goal is to be able to have an iOS friendly "dashboard" I can access on my iPhone that shows me what's going on based on device and sensor status. Thanks again for your help.
Recommended Posts