News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

Events log

Started by brononius, October 08, 2013, 02:33:31 PM

Previous topic - Next topic

brononius

Hey,

Is there somewhere a way to see all 'triggered' events?
From time to time, i'm wondering when this or that happened, so it would be nice that this could be seen in a kind of log file.
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

Marie.O

That stuff can be observed in /var/log/pluto/dcerouter.log
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

brononius

Is there sometimes a 'special' parameter that I can use to filter out specific things?


The end idea is to have a list of events around the house. Let's call it a more 'human' list.
My girlfriend will never read logfiles, and i expect that most of the people will not do this.
I think that a more userfriendly loglist would be a step in the right direction to open up the system to everyone.

fe

  • 20131009-091420 :: Video Door motion detected (no more warning for next 5 minutes)
  • 20131009-091510 :: Doorbell triggered
  • 20131009-091620 :: Doorbell triggered
  • 20131009-094015 :: Light Kitchen status 1
  • 20131009-095544 :: Light Kitchen status 0
  • ...
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

Marie.O

What I do, if I really want to see the triggered events, I use grep on a log file. If I want to see the current status of a light etc, I look at the floorplan. imho there is no need for anything in-between. Either I really want to see nitty gritty details, or I want to see what the current status is.

For security events, there is always the Security / Alert Log in the web admin.
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

brononius

Just a thought, but it would be a nice feature that a kind of log-level could be created.

fe
loglevel 12: all details (all below + debug)
loglevel 10: system stuff (all below + system alerts)
loglevel 7: external triggers (all below + incoming calls and so)
loglevel 6: user triggers (all below + manual push of lights and so)
...

But I think that this will be a huge change to the systems, no?  :-\

So I guess that I'll see to create a kind of script that keeps an eye on the dcerouter.log and that copies some info to another log file...
Or if there are other suggestions, let me know...
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

Marie.O

We already have loglevel. Search for LV_STATUS in the wiki, to get a list of different settings, and modify /etc/pluto.conf accordingly.
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

brononius

Based on this, i've created a small script that follows the logs, and put the most important info (for me) into a seperate log file.
Below you can find to commands. One to log the 'tripped sensors', and one to log the phonecalls. I'll see if i can find other intresting things to have in my 'filtered events log'.

#Log the triggered events
tail -f /var/log/pluto/DCERouter.log | awk '/Sensor Tripped/ {sub(/\(/,"",$8); sub(/)/,"",$12); sub(/Event:/,"",$22); sub(/,/,"",$23);print strftime("%Y-%m-
%d %H:%M:%S")," - Sensors: ",$8,$9,$10,$11,$12," - ",$22,$23 | "tee -a /var/log/events.log"}' &

#Log the phonecalls
tail -f /var/log/asterisk/full | awk '/Call completed to/ {sub(/Local\/0/,"",$9); sub(/@trusted/,"",$9);print strftime("%Y-%m-%d %H:%M:%S")," - Phone:", $6,
$7, $8, $9 | "tee -a /var/log/events.log"}' &


This will return you following log:
more /var/log/events.log
Quote2013-10-11 14:31:19  - Sensors:  K Sonar1 10x / FrontDoor  -  Sensor Tripped
2013-10-11 14:35:30  - Sensors:  K Button1 2x / Kitchen  -  Sensor Tripped
2013-10-11 14:35:30  - Sensors:  K Button1 1x / LivingRoom  -  Sensor Tripped
2013-10-11 15:06:20  - Phone: Call completed to 01534855


If you want to use it, it's possible that you'll need to change some parameters (like $8,$9,$10...). This is a first version, so it's rather 'raw' for my own intrest.

  • Basiclly, the first part (DCERouter.log) tells you what log file to check.
  • The second part (Sensor Tripped) tells you where to keep an eye on.
  • The third part (print xxxxxx) gives the 'result' back.
  • The last part (events.log) tells you where the results will be kept.
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE