Author Topic: Responding to z-wave sensor events  (Read 4061 times)

caiman

  • Veteran
  • ***
  • Posts: 119
    • View Profile
Responding to z-wave sensor events
« on: May 14, 2008, 12:11:20 am »
I have added two z-wave PIR sensors and defined the event handler as follows:

- Respond to events
- An sensor is tripped
- What device = "sensor hall"
- What time of day <> "DAYTIME"
- Event parameter "triggered" = 255
- action: switch on a light nearby

When I trigger the sensor I get this in the ZWave logs:
Code: [Select]
05      05/14/08 0:01:16.866            alarmPIRHandler : node: 18 report: 255 <0xb68f9b90>
05      05/14/08 0:01:16.867            SendSensorTrippedEvents: wrong node ID: 18, 19 <0xb68f9b90>
05      05/14/08 0:01:16.867            SendSensorTrippedEvents: wrong node ID: 18, 2 <0xb68f9b90>
05      05/14/08 0:01:16.867            SendSensorTrippedEvents: wrong node ID: 18, 3 <0xb68f9b90>
05      05/14/08 0:01:16.867            SendSensorTrippedEvents: wrong node ID: 18, 4 <0xb68f9b90>
05      05/14/08 0:01:16.867            SendSensorTrippedEvents: wrong node ID: 18, 5 <0xb68f9b90>
05      05/14/08 0:01:16.867            SendSensorTrippedEvents: wrong node ID: 18, 6 <0xb68f9b90>
05      05/14/08 0:01:16.867            SendSensorTrippedEvents: wrong node ID: 18, 8 <0xb68f9b90>
05      05/14/08 0:01:16.867            SendSensorTrippedEvents: wrong node ID: 18, 11 <0xb68f9b90>
05      05/14/08 0:01:16.867            SendSensorTrippedEvents: wrong node ID: 18, 12 <0xb68f9b90>
05      05/14/08 0:01:16.867            SendSensorTrippedEvents: wrong node ID: 18, 13 <0xb68f9b90>
05      05/14/08 0:01:16.867            SendSensorTrippedEvents: wrong node ID: 18, 14 <0xb68f9b90>
05      05/14/08 0:01:16.867            SendSensorTrippedEvents: wrong node ID: 18, 15 <0xb68f9b90>
05      05/14/08 0:01:16.867            SendSensorTrippedEvents: wrong node ID: 18, 16 <0xb68f9b90>
05      05/14/08 0:01:16.867            SendSensorTrippedEvents: wrong node ID: 18, 21 <0xb68f9b90>
05      05/14/08 0:01:16.867            SendSensorTrippedEvents: wrong node ID: 18, 1 <0xb68f9b90>

Two questions:
- is the config correct ?
- what does the wrong node ID message mean ?

thanks in advance...

caiman

  • Veteran
  • ***
  • Posts: 119
    • View Profile
Re: Responding to z-wave sensor events - SOLVED
« Reply #1 on: May 15, 2008, 09:30:07 pm »
So the correct value for an event "sensor tripped ON" is 1 and not 255 as I had configured, which gives:
- Respond to events
- An sensor is tripped
- What device = "sensor hall"
- What time of day <> "DAYTIME"
- Event parameter "triggered" = 1
- action: switch on a light nearby

I have also added a handler for sensor tripped OFF (0) which turns off the line after a small timer. Neat.

The error
Code: [Select]
SendSensorTrippedEvents: wrong node ID:
remains, but it doesn't harm...

happy :)

caiman

  • Veteran
  • ***
  • Posts: 119
    • View Profile
Re: Responding to z-wave sensor events
« Reply #2 on: May 19, 2008, 05:43:40 pm »
I'm successfully using the sensors to turn on the lamps now, but the "time of day" criteria does not work for me. First there was a mistake: "DAYTIME" does not exist so the condition was always true. The right one seems to be "Daytime". However, it seems that "time of day" is always set to "Daytime" which means the event is never triggered.

Any idea where that variable is supposed to be updated ?

chrisbirkinshaw

  • Guru
  • ****
  • Posts: 431
    • View Profile
Re: Responding to z-wave sensor events
« Reply #3 on: May 19, 2008, 08:05:45 pm »
How did you set up the timers? I wanted to have a 2 min timer which starts counting down when the light is turned on but then is reset when more movement is detected. However I couldn't see any way to restart the timer.



caiman

  • Veteran
  • ***
  • Posts: 119
    • View Profile
Re: Responding to z-wave sensor events
« Reply #4 on: May 20, 2008, 09:31:51 am »
I used to send a Delay command to DCErouter but now I am just catching the "sensor triggered == 0" which is sent by the sensor when no movement is detected. On my zwave PIR sensors, it conveniently does it a few minutes after it's triggered. I didn't test whether the timer in the sensor itself was reset when more movement is detected.

chrisbirkinshaw

  • Guru
  • ****
  • Posts: 431
    • View Profile
Re: Responding to z-wave sensor events
« Reply #5 on: May 21, 2008, 03:10:17 pm »
The problem I can see here is that you enter a room, the light comes on, then after 2 mins it turns off and then back on again. Even if you are still moving the timer for turning the light off does not get cancelled or extended.