Author Topic: zwave motion sensor fails to log activity events  (Read 5422 times)

Avner

  • Veteran
  • ***
  • Posts: 76
    • View Profile
zwave motion sensor fails to log activity events
« on: April 03, 2011, 05:24:40 am »
Hello,

I have 2 zwave devices in my system:
1. Lamp module - HA-03WD
2. Motion detector - HSM100
I added the 2 devices and both are showing on the floorplan.

Issuing command to the lamp module (e.g. light ON/OFF) works correctly. The lamp responds and the events, which include reponse information (log levels 36,40,41)
are logged in the log file (see example below)

However, I can not see activity events from the motion detector.
Issuing commands to the motion sensor device, triggers a one line response in the log file, which is not clear for me (see the two examples below)
Physically pressing the blue button in the motion sensor, triggers a respond with log levels 36,40,41

I see the signature (0x1 0x4 0x1 0x13 0x1 0xe8) that fits the ZDP200 lamp signature in LinuxMCE wiki page: http://wiki.linuxmce.org/index.php/ZWave_API
To simplify the logging I deleted the lamp device, but still seeing events with the signature "0x1 0x4 0x1 0x13 0x1 0xe8", which I thought indicate a lamp, so I'm confused here.


I am looking for help on the following 2 problems:
1. How to interpret the zwave log file.
2. How to log events from the motion sensor.


Thanks,
Avner



--------------------------------------------------------------------------
Details / examples
--------------------------------------------------------------------------

--------------------------------------------------------------------------
Lamp module example (works Ok)
--------------------------------------------------------------------------

avner@dcerouter:~/tmp1$ tail -f /var/log/pluto/37_ZWave.log
36      04/01/11 0:00:03.602     Received command for child <0xb690cb90>
36      04/01/11 0:00:03.602     ON RECEIVED FOR CHILD 2/0 <0xb690cb90>
40      04/01/11 0:00:03.614     Sending job 0x830dee8 (cb 207) - 0x1 0xa 0x0 0x13 0x2 0x3 0x20 0x1 0xff 0x5 0xcf 0xf3 (#\n#### #####) <0xb790eb90>
41      04/01/11 0:00:03.621     0x1 0x4 0x1 0x13 0x1 0xe8 (######) <0xb790eb90>
41      04/01/11 0:00:03.665     0x1 0x5 0x0 0x13 0xcf 0x0 0x26 (######&) <0xb790eb90>


--------------------------------------------------------------------------
Motion detector examples
--------------------------------------------------------------------------


Two examples of sending commands to the motion detector and the response.

1. Sending command "Set Polling State" to motion sensor (device 44)
   /usr/pluto/bin/MessageSend localhost 0 44 1 966 2 "" 5 "" 220 "" 225 "" 239 ""
   
   avner@dcerouter:~/tmp1$ tail -f /var/log/pluto/37_ZWave.log
   36      03/31/11 23:57:25.726    Received command for child <0xb690cb90>


2. Sending command "WAKE UP" to motion sensor (device 44)
   /usr/pluto/bin/MessageSend localhost 0 44 1 840 48 "" 239 ""
   
   avner@dcerouter:~/tmp1$ tail -f /var/log/pluto/37_ZWave.log
   36      04/01/11 0:07:32.881     Received command for child <0xb690cb90>


When physically pressing on the blue button in the motion sensor, I can see the following in the log file
41      04/02/11 20:15:37.811           0x1 0x14 0x0 0x49 0x84 0x3 0xe 0x4 0x21 0x1 0x60 0x31 0x70 0x84 0x85 0x80 0x72 0x77 0x86 0xef 0x20 0xe3 (###I####!#`1p###rw## #) <0xb796bb90>
36      04/02/11 20:15:37.812           FUNC_ID_ZW_APPLICATION_UPDATE:UPDATE_STATE_NODE_INFO_RECEIVED received from node 3 -  <0xb796bb90>
36      04/02/11 20:15:37.812           GENERIC_TYPE_SENSOR_MULTILEVEL <0xb796bb90>
41      04/02/11 20:15:38.797           0x1 0x8 0x0 0x4 0x0 0x3 0x2 0x84 0x7 0x71 (#########q) <0xb796bb90>
36      04/02/11 20:15:38.798           FUNC_ID_APPLICATION_COMMAND_HANDLER: <0xb796bb90>
36      04/02/11 20:15:38.798           COMMAND_CLASS_WAKE_UP -  <0xb796bb90>
36      04/02/11 20:15:38.798           Running wakeupHandler for node 3 <0xb796bb90>
36      04/02/11 20:15:38.798           Got unicast wakeup from node 3, doing WAKE_UP_NO_MORE_INFORMATION <0xb796bb90>
40      04/02/11 20:15:38.896           Sending job 0x86b5160 (cb 183) - 0x1 0x9 0x0 0x13 0x3 0x2 0x80 0x2 0x9c 0xb7 0x4d (##########M) <0xb796bb90>
41      04/02/11 20:15:38.903           0x1 0x4 0x1 0x13 0x1 0xe8 (######) <0xb796bb90>
41      04/02/11 20:15:38.923           0x1 0x5 0x0 0x13 0xb7 0x0 0x5e (######^) <0xb796bb90>
40      04/02/11 20:15:39.024           Sending job 0x86b5380 (cb 184) - 0x1 0x9 0x0 0x13 0x3 0x2 0x84 0x8 0x5 0xb8 0xd5 (###########) <0xb796bb90>
41      04/02/11 20:15:39.031           0x1 0x4 0x1 0x13 0x1 0xe8 (######) <0xb796bb90>
41      04/02/11 20:15:39.072           0x1 0x5 0x0 0x13 0xb8 0x0 0x51 (######Q) <0xb796bb90>
Asus P5GD2-X, Intel i915P/G, Pentium 4 3.2 GHz, 2.5GB, nvidia Geforce 8800, Hauppauge WinTV-HVR-1850

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: zwave motion sensor fails to log activity events
« Reply #1 on: April 03, 2011, 08:33:18 pm »
However, I can not see activity events from the motion detector.
you probably did not do the proper associations (dongle node id into the group 1 of the hsm100)

Quote
To simplify the logging I deleted the lamp device, but still seeing events with the signature "0x1 0x4 0x1 0x13 0x1 0xe8", which I thought indicate a lamp, so I'm confused here.
this is a reply from the serial API for a ZW_SEND operation, nothing related specifically to lamps at all..

Quote
1. Sending command "Set Polling State" to motion sensor (device 44)
   /usr/pluto/bin/MessageSend localhost 0 44 1 966 2 "" 5 "" 220 "" 225 "" 239 ""
   
set polling state only supports global on or off as state in the actual implementation

Quote
2. Sending command "WAKE UP" to motion sensor (device 44)
   /usr/pluto/bin/MessageSend localhost 0 44 1 840 48 "" 239 ""
hu? what the heck are you doing?   

br Hari
rock your home - http://www.agocontrol.com home automation

Avner

  • Veteran
  • ***
  • Posts: 76
    • View Profile
Re: zwave motion sensor fails to log activity events
« Reply #2 on: April 04, 2011, 09:08:17 am »
Hari,
Thanks for replying.

you probably did not do the proper associations (dongle node id into the group 1 of the hsm100)

I am not sure what "do the proper associations (dongle node id into the group 1 of the hsm100)" means.
Here is what I did.
1. Removed the dongle (ZSTICK-S2 - Aeon Labs ZWave USB Adapter) from the USB.
2. Disassociated all the devices (lamp module HA-03WD, and motion detector HSM100)
3. Reassociated only the HSM100
4. Plugged the dongle back into the USB
5. Regenerated the orbitter

After that I see in the lmce-admin web page in the device tree:
ZWave
  ZWave embedded climate interface
  ZWave embedded security interface
    Motion Detector
  ZWave controller

When I physically press the blue button in the motion sensor, I get the following in the log file.
So I understand, the motion detector is associated as node 3.
Is this a proper association?
What does "group 1 of the hsm100" mean? Is there an easy way to view group/node ids in the lmce-admin web page?

36      04/03/11 23:51:44.951           FUNC_ID_ZW_APPLICATION_UPDATE:UPDATE_STATE_NODE_INFO_RECEIVED received from node 3 -  <0xb7a70b90>
36      04/03/11 23:51:44.951           GENERIC_TYPE_SENSOR_MULTILEVEL <0xb7a70b90>
41      04/03/11 23:51:45.938           0x1 0x8 0x0 0x4 0x0 0x3 0x2 0x84 0x7 0x71 (#########q) <0xb7a70b90>
36      04/03/11 23:51:45.939           FUNC_ID_APPLICATION_COMMAND_HANDLER: <0xb7a70b90>
36      04/03/11 23:51:45.939           COMMAND_CLASS_WAKE_UP -  <0xb7a70b90>
36      04/03/11 23:51:45.939           Running wakeupHandler for node 3 <0xb7a70b90>
36      04/03/11 23:51:45.939           Got unicast wakeup from node 3, doing WAKE_UP_NO_MORE_INFORMATION <0xb7a70b90>
41      04/03/11 23:51:45.980           0x1 0x9 0x0 0x4 0x0 0x3 0x3 0x20 0x1 0xff 0x2c (####### ##,) <0xb7a70b90>
36      04/03/11 23:51:45.981           FUNC_ID_APPLICATION_COMMAND_HANDLER: <0xb7a70b90>
36      04/03/11 23:51:45.981           COMMAND_CLASS_BASIC -  <0xb7a70b90>
36      04/03/11 23:51:45.981           Got BASIC_SET from node 3, value 255 <0xb7a70b90>

Occasionally, when having activity, the motion detector LED turns red and logs the following.
Is this an indication that the device is associated correctly?

36      04/03/11 23:59:52.267           FUNC_ID_APPLICATION_COMMAND_HANDLER: <0xb7a70b90>
36      04/03/11 23:59:52.267           COMMAND_CLASS_SENSOR_MULTILEVEL -  <0xb7a70b90>
36      04/03/11 23:59:52.268           Got sensor report from node 3/-1 <0xb7a70b90>
36      04/03/11 23:59:52.268           MULTILEVEL DEBUG: precision: 0 scale: 1 size: 1 value: 19 <0xb7a70b90>
36      04/03/11 23:59:52.268           General purpose measurement value received: 19 (dimensionless) <0xb7a70b90>

2. Sending command "WAKE UP" to motion sensor (device 44)
   /usr/pluto/bin/MessageSend localhost 0 44 1 840 48 "" 239 ""
hu? what the heck are you doing?

I thought that since this is a battery operated device, the sleep time may be too long.
I see an option to issue WAKE_UP command with values between 1 and 255 (in minutes).
I want the motion detector to send an activity event if applicable in resolution of 1 minute

Also, the field "Capabilities" for the Motion Detector device is empty. Should it be set to something?


Regards,
Avner
Asus P5GD2-X, Intel i915P/G, Pentium 4 3.2 GHz, 2.5GB, nvidia Geforce 8800, Hauppauge WinTV-HVR-1850

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: zwave motion sensor fails to log activity events
« Reply #3 on: April 04, 2011, 11:08:30 am »
The sensor report you see in the log is from the sensors also present in the HSM100. The fact that you see this in the log makes me believe you have set the correct associations, and maybe the problem is related to the motion detection itself.
By default, this device only sends one motion detected event when motion is first detected. Then it will not repeat the event until the motion has timed out, so to speak (this is set to 20 minutes iirc by default). This means it will not send any more events until there has been no motion for 20 minutes. This behavior can be changed but will use more battery. This is described in the owners manual.

br,
sambuca

Avner

  • Veteran
  • ***
  • Posts: 76
    • View Profile
Re: zwave motion sensor fails to log activity events
« Reply #4 on: April 05, 2011, 04:43:42 am »
Sambuca, what you are telling me makes sense. In my case, the timeout seems to be around 60 minutes. When there is activity in the room, I do see events every ~60 minutes.
The HSM100 doesn't have any interface (except for the blue button). The only interface to it is through lmce.
Is there a way to program the timeout of the HSM100 through lmce? I want to reduce this time to the minimum possible (e.g. 1 minute)

Thanks,
Avner
Asus P5GD2-X, Intel i915P/G, Pentium 4 3.2 GHz, 2.5GB, nvidia Geforce 8800, Hauppauge WinTV-HVR-1850

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: zwave motion sensor fails to log activity events
« Reply #5 on: April 05, 2011, 09:32:12 am »
You can use the set configuration command, and send that to the zwave controller. You have to fill in the node id(port/channel device data) of the hsm100, and set the other fields; configuration option, value; to what you want. The configuration options should be listed in your owners manual (do a google search for it if not).

If you set that value to 1 minute will shorten the battery life.

br,
sambuca

Avner

  • Veteran
  • ***
  • Posts: 76
    • View Profile
Re: zwave motion sensor fails to log activity events
« Reply #6 on: April 12, 2011, 06:39:24 am »
sambuca,

I am having a problem to add the zwave device to my system.
To simplify, I removed and unlinked the lamp module, so the only zwave device is the HSM100.
At first there was no Motion detector, only two Multilevel sensors. After manually adding the Motion detector (#50), I see the following zwave nodes in webadmin:

zwave (listed as device #44)
  zwave embedded Climate Interface (listed as device #45)
    Multilevel Sensor (listed as device #48
    Multilevel Sensor (listed as device #49)
  zwave embedded security interface (listed as device #46)
    motion detector (listed as device #50)
  zwave controller (listed as device #47)

I tried sending the SetConfigParam command with the following values (according to the instructions
in: http://wiki.linuxmce.org/index.php/Express_Controls_EZmotion_(HSM_100)), i.e.

4. 48 Value (int) = Your desired timeout in minutes (1 minute)
5. 239 NodeID (int) = The ZWave node ID of the HSM 100 to configure (node 2)
6. 248 Parameter ID (int) = 2
7. Press the blue button on the side of the HSM 100 you are trying to configure (I did this for the devices #50, #48, #49)
8. Click "Send Message"

After pressing the blue button on the side of the HSM 100, I get the following message in the log file, which coincides with my observation of a wake up of 1 hour,
regardless of the command I send:
 36   04/11/11 20:19:19.168      Nodeid: 2 Value: 3600 <0xb794cb90>


The response was "BAD NODE ID" for device #50 (I suspect that this indicates that the motion detector was not added properly)
and OK for devices #48, #49, but in the log file the response is always the same:
 36      04/11/11 21:10:11.125           Received command for child <0xb694ab90>
and I don't see any change in the HSM100 response frequency

/usr/pluto/bin/MessageSend localhost -r 0 50 1 841 48 "1" 222 "" 239 "2" 248 "2"
RESP: BAD NODE ID

/usr/pluto/bin/MessageSend localhost -r 0 48 1 841 48 "1" 222 "" 239 "2" 248 "2"
RESP: OK

/usr/pluto/bin/MessageSend localhost -r 0 49 1 841 48 "1" 222 "" 239 "2" 248 "2"
RESP: OK


I also tried sending a SetWakeup command
avner@dcerouter:~$ /usr/pluto/bin/MessageSend localhost -r 0 48 1 840 48 "1" 239 "2"
RESP: OK

I see messages in the log that refer to node 2/-1 and id 2/2

36      04/11/11 21:28:11.117           Sending EVENT_State_Changed_CONST event from node 2/-1, level 9 <0xb794cb90>                                               
40      04/11/11 21:28:11.217           Sending job 0xa0efe10 (cb 245) - 0x1 0xc 0x0 0x13 0xff 0x5 0x60 0x6 0x2 0x20 0x2 0x5 0xf5 0xac (######`## ####) <0xb794cb90>
...
36      04/11/11 21:28:11.277           Got MULTI_INSTANCE_CMD_ENCAP from node 2: instance 2 Command Class 0x20 type 0x3 <0xb794cb90>                               
36      04/11/11 21:28:11.277           Got basic report from node 2, instance 2, value: 37 <0xb794cb90>                                                           
05      04/11/11 21:28:11.277           ZWave::InternalIDToDevice() No device found for id 2/2 <0xb794cb90>                                             

How should I interpret these messages?

Although I deleted all the devices and added them again, I have a feeling that the nodes are not listed properly in lmce.
1. I have 2 node instances
2. I see a negative number after the node id (node 2/-1)
3. The motion detector that I added manually (device #50) fails to respond to commands.

Any help is appreciated.
Thanks,
Avner

Asus P5GD2-X, Intel i915P/G, Pentium 4 3.2 GHz, 2.5GB, nvidia Geforce 8800, Hauppauge WinTV-HVR-1850

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: zwave motion sensor fails to log activity events
« Reply #7 on: April 12, 2011, 09:14:15 am »
First, you can only send messages using the main node id, which seem to be 2 in your case. The devices that have something like 2/1 and 2/2 in the "Port/Channel" device data are only an instance within the same zwave device. Config parameters are common for the whole zwave device, and all its instances. (at least for this device). The HSM100 has three different instances, the motion detector and two multilevel sensors.
The bad node id might be related to using the wrong node id (with a /1 or /2).

Secondly, you need to send the message to the main zwave controller device, not to the zwave device itself. So you should send it to #44.

Afaik, you should have three devices for the hsm100, one motion detector (which must be added manually, after deleting one multilevel sensor) with node id 2, and two devices for the sensor instances, with node id 2/2 and 2/3.

I guess if you sort out the devices and their node ids, you should be good.

best regards,
sambuca