Logs

From MiCasaVerde
Jump to: navigation, search


Logging explained

Vera runs Linux and you can watch the logs if you want to see what's going with Vera. This can be particularly helpful for debugging.

First, you need to login to Vera using SSH. If you have a Mac or Linux PC, SSH is built-in and you can open a console and enter:

ssh [ip address of vera]

If you run Windows, get the utility Putty from here: Putty Download You do not need to install it, just download the file Putty.exe and run it. In the Host Name box type in the IP address of Vera and click open.

Either way you will have a console and be prompted for a username and password. The username is: root and the password is generally the wi-fi password (or the HomeID) printed on the sticker under Vera. If you don't see the root password or need help logging in see Logon # Can't find the root password?.

Once you are logged in, type:

cd /var/log/cmh

to get to the directory with the logs. Then type:

tail -f LuaUPnP.log

and you will see the logs scroll by as you do things with Vera. Press Ctrl+C to stop watching the log. Chances are there is too much data flying by to be useful, particularly if you turn on Verbose Logging (Vera's toolbox, Advanced, Logging). So you will want to filter. You can do this by adding "| grep" followed by whatever you want to filter for. The most common use for this is that every line in the log starts with a 2 digit number indicating what type of event is being logged. The most useful log entry is 04 which shows you the status of every "job" that Vera has completed (ie turning on a light, etc.) and the status of it. To watch for the jobs type:

tail -f LuaUPnP.log | grep "^04"

and you will only see the lines that start with 04 (ie the jobs). You can add more criteria by adding \|. So, all commands (ie when you click on/off/etc.) on the dashboard start with 08. So:

tail -f LuaUPnP.log | grep "^04\|^08"

will show you when Vera got a command to do something and when Vera finished doing it. This is helpful for debugging what's going on. Following is a screen capture from putty that shows what happens when you turn on a device from the dashboard:

root@MiOS_10266:/tmp/log/cmh#  tail -f LuaUPnP.log | grep "^04\|^08"
08      08/13/10 20:49:58.469   JobHandler_LuaUPnP::HandleActionRequest device: 100 service: urn:upnp-org:serviceId:SwitchPower1 action: SetTarget <0x11008>
08      08/13/10 20:49:58.469   JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=100 <0x11008>
08      08/13/10 20:49:58.470   JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:upnp-org:serviceId:SwitchPower1 <0x11008>
08      08/13/10 20:49:58.471   JobHandler_LuaUPnP::HandleActionRequest argument action=SetTarget <0x11008>
08      08/13/10 20:49:58.472   JobHandler_LuaUPnP::HandleActionRequest argument newTargetValue=1 <0x11008>
04      08/13/10 20:49:59.312   <Job ID="23" Name="ON node 20" Created="10-08-13 20:49:58" Started="10-08-13 20:49:58" Completed="10-08-13 20:49:59" Duration="0.742113000" Runtime="0.695043000" Status="Successful" LastNote="Transmit was ok" Node="20" Device="100" NodeType="ZWaveNonDimmableLight" NodeDescription="_Switching Plugin"/> <0x402>

You can see that the command came in for device #100 20:49:58.469 (meaning 469/1000's of a second). The action was "SetTarget" for the "SwitchPower" service (meaning set the power state on or off), and the newTargetValue=1 means it's coming on. You can see that Vera created a job #23 to do this, and that at 20:49:59.312 the job completed and was successful. The ZWave node id is 20.

Additionally, the logs can be accessed directly from a browser from the URL: http://vera_ip/cgi-bin/cmh/log.sh?Device=LuaUPnP

  • Change the value for vera_ip to the local IP Address of your Vera unit.
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox