Thanks for the continued support!! Greatly appreciated..
This is the code snippet:
- Code: Select all
for scanDevice in indigo.devices:
indigo.server.log ( str( scanDevice.id ), scanDevice.name )
try:
deviceState = str( scanDevice.onState )
except:
indigo.server.log ( "In the except section" )
indigo.server.log ( str(scanDevice.onState ) )
How to classify log entries to demonstrate what's happening during an actual trigger event
Quote? List?
Will the sleep of 3 seconds give the underlying event enough time to populate this property?
Thank you in advance.
This log was recorded when the code was tested in the editing environment .
Log Entries:
Aug 27, 2021 at 2:19:53 PM
006 - Humidity 1384093992
Script None
006 - Leak Sensor 1873696535
Script False
006 - Tamper 316739640
Script False
006 - Temperature 77470459
Script None
007 - Z-Wave Repeater (ZW189) 1219598056
Script In the except section
Script Error embedded script: 'Device' object has no attribute 'onState'
Script Error Exception Traceback (most recent call shown last):
embedded script, line 17, at top level
AttributeError: 'Device' object has no attribute 'onState'
This log below was recorded with an actual water leak event. You can see that the device that triggered 006 - Leak Sensor 1873696535 has a state of True, which is exact what I want to figure out the deviceID
006 - Leak Sensor 1873696535
Script True
Sorry for the size, I would be grateful to learn a better way to handle these log entries.
Aug 27, 2021 at 2:28:28 PM
Z-Wave Debug RCVD requestAlarmSensorStatus: 01 0F 00 04 00 06 09 71 05 00 00 00 FF 05 02 00 16
Z-Wave Debug . . requestAlarmSensorStatus: node 006, endpoint None, cmdClass 71, type 0, value 0, classSubKey 710000
Z-Wave Debug . . requestAlarmSensorStatus: typeExt 5, valueExt 2, classSubKeyExt 7100000502
Z-Wave Debug . . requestAlarmSensorStatus: defnStatusByte 255
Z-Wave received "006 - Leak Sensor" status update is on
Trigger Water Leak Sensor Activated
Trigger Water Leak Sensor Activated Siren
006 - Humidity 1384093992
Script None
006 - Leak Sensor 1873696535
Script True
006 - Tamper 316739640
Script False
006 - Temperature 77470459
Script None
007 - Z-Wave Repeater (ZW189) 1219598056
Script In the except section
Script Error embedded script: 'Device' object has no attribute 'onState'
Script Error Exception Traceback (most recent call shown last):
embedded script, line 17, at top level
AttributeError: 'Device' object has no attribute 'onState'
Z-Wave Debug SENT soundSwitchTonePlay: 01 0E 00 13 08 07 60 0D 01 07 79 08 15 25 1A DD
Z-Wave Debug RCVD soundSwitchTonePlay: 01 18 00 13 1A 00 00 36 01 C4 A8 7F 7F 7F 00 00 03 07 00 00 00 03 01 00 00 CC (node ACK)
Z-Wave Debug RCVD soundSwitchTonePlay: txTransmitTicks 54, txHopCount 1, txRSSIs 196 168 127 127 127, txACKChannelNum 0, txLastTxChannelNum 0, txRouteSchemeState 3, txRoute 7 0 0 0, txRouteSpeed 3, txRouteTries 1, txLastFailedLinkFrom 0, txLastFailedLinkTo 0
Z-Wave sent "008 - Security Siren" on
Z-Wave Debug RCVD requestReply1: 01 06 00 04 00 08 00 91 (hex)
Z-Wave Debug RCVD multiEndPointPacket: 01 0D 00 04 00 08 07 60 0D 07 01 79 0A 15 80
Z-Wave Debug . . multiEndPointPacket: node 008, endPoint 7
Z-Wave Debug RCVD requestReply2: 01 09 00 04 00 08 03 79 0A 15 FF (hex)
Z-Wave Debug RCVD multiEndPointPacket: 01 0D 00 04 00 08 07 60 0D 07 01 79 0A 15 83
Z-Wave Debug . . multiEndPointPacket: node 008, endPoint 7
Z-Wave Debug RCVD requestReply2: 01 09 00 04 00 08 03 79 0A 15 FF (hex)
Z-Wave Debug RCVD requestAlarmSensorStatus: 01 10 00 04 00 06 0A 71 05 00 00 00 FF 05 00 01 02 01
Z-Wave Debug . . requestAlarmSensorStatus: node 006, endpoint None, cmdClass 71, type 0, value 0, classSubKey 710000
Z-Wave Debug . . requestAlarmSensorStatus: typeExt 5, valueExt 0, classSubKeyExt 7100000500
Z-Wave Debug . . requestAlarmSensorStatus: defnStatusByte 0
Z-Wave received "006 - Leak Sensor" status update is off
Z-Wave Debug RCVD multiEndPointPacket: 01 0D 00 04 00 08 07 60 0D 07 01 79 0A 15 82
Z-Wave Debug . . multiEndPointPacket: node 008, endPoint 7
Z-Wave Debug RCVD requestReply2: 01 09 00 04 00 08 03 79 0A 15 FF (hex)
Z-Wave Debug RCVD multiEndPointPacket: 01 0D 00 04 00 08 07 60 0D 07 01 79 0A 15 82
Z-Wave Debug . . multiEndPointPacket: node 008, endPoint 7
Z-Wave Debug RCVD requestReply2: 01 09 00 04 00 08 03 79 0A 15 FF (hex)
Z-Wave Debug RCVD multiEndPointPacket: 01 13 00 04 00 08 0D 60 0D 07 01 71 05 00 00 00 FF 0E 01 00 69
Z-Wave Debug . . multiEndPointPacket: node 008, endPoint 7
Z-Wave Debug RCVD requestAlarmSensorStatus: 01 0F 00 04 00 08 09 71 05 00 00 00 FF 0E 01 00 FF
Z-Wave Debug . . requestAlarmSensorStatus: node 008, endpoint 7, cmdClass 71, type 0, value 0, classSubKey 710000
Z-Wave Debug . . requestAlarmSensorStatus: typeExt 14, valueExt 1, classSubKeyExt 7100000E01
Z-Wave Debug . . requestAlarmSensorStatus: defnStatusByte 255
Z-Wave received "008 - Security Siren" status update is on
Z-Wave Debug SENT setBasicValue: 01 0E 00 13 08 07 60 0D 01 07 20 01 00 25 1B 99
Z-Wave Debug RCVD setBasicValue: 01 18 00 13 1B 00 00 16 01 C0 A9 7F 7F 7F 00 00 03 07 00 00 00 03 01 00 00 E8 (node ACK)
Z-Wave Debug RCVD setBasicValue: txTransmitTicks 22, txHopCount 1, txRSSIs 192 169 127 127 127, txACKChannelNum 0, txLastTxChannelNum 0, txRouteSchemeState 3, txRoute 7 0 0 0, txRouteSpeed 3, txRouteTries 1, txLastFailedLinkFrom 0, txLastFailedLinkTo 0
Z-Wave sent "008 - Security Siren" off
Z-Wave Debug RCVD multiEndPointPacket: 01 0D 00 04 00 08 07 60 0D 07 01 79 0A 00 91
Z-Wave Debug . . multiEndPointPacket: node 008, endPoint 7
Z-Wave Debug RCVD requestReply2: 01 09 00 04 00 08 03 79 0A 00 FF (hex)
Z-Wave Debug RCVD multiEndPointPacket: 01 0D 00 04 00 08 07 60 0D 07 01 79 0A 00 EE
Z-Wave Debug . . multiEndPointPacket: node 008, endPoint 7
Z-Wave Debug RCVD requestReply2: 01 09 00 04 00 08 03 79 0A 00 FF (hex)
Z-Wave Debug RCVD multiEndPointPacket: 01 0D 00 04 00 08 07 60 0D 07 01 79 0A 00 EE
Z-Wave Debug . . multiEndPointPacket: node 008, endPoint 7
Z-Wave Debug RCVD requestReply2: 01 09 00 04 00 08 03 79 0A 00 FF (hex)
Z-Wave Debug RCVD multiEndPointPacket: 01 0D 00 04 00 08 07 60 0D 07 01 79 0A 00 90
Z-Wave Debug . . multiEndPointPacket: node 008, endPoint 7
Z-Wave Debug RCVD requestReply2: 01 09 00 04 00 08 03 79 0A 00 FF (hex)
Z-Wave Debug RCVD multiEndPointPacket: 01 0D 00 04 00 08 07 60 0D 07 01 79 0A 00 90
Z-Wave Debug . . multiEndPointPacket: node 008, endPoint 7
Z-Wave Debug RCVD requestReply2: 01 09 00 04 00 08 03 79 0A 00 FF (hex)
Z-Wave Debug RCVD multiEndPointPacket: 01 0D 00 04 00 08 07 60 0D 07 01 79 0A 00 95
Z-Wave Debug . . multiEndPointPacket: node 008, endPoint 7
Z-Wave Debug RCVD requestReply2: 01 09 00 04 00 08 03 79 0A 00 FF (hex)
Z-Wave Debug RCVD multiEndPointPacket: 01 13 00 04 00 08 0D 60 0D 07 01 71 05 00 00 00 FF 0E 00 00 68
Z-Wave Debug . . multiEndPointPacket: node 008, endPoint 7
Z-Wave Debug RCVD requestAlarmSensorStatus: 01 0F 00 04 00 08 09 71 05 00 00 00 FF 0E 00 00 FF
Z-Wave Debug . . requestAlarmSensorStatus: node 008, endpoint 7, cmdClass 71, type 0, value 0, classSubKey 710000
Z-Wave Debug . . requestAlarmSensorStatus: typeExt 14, valueExt 0, classSubKeyExt 7100000E00
Z-Wave Debug . . requestAlarmSensorStatus: defnStatusByte 0
Z-Wave received "008 - Security Siren" status update is off
Z-Wave Debug RCVD multiEndPointPacket: 01 13 00 04 00 08 0D 60 0D 07 01 71 05 00 00 00 FF 0E 00 00 69
Z-Wave Debug . . multiEndPointPacket: node 008, endPoint 7
Z-Wave Debug RCVD requestAlarmSensorStatus: 01 0F 00 04 00 08 09 71 05 00 00 00 FF 0E 00 00 FF
Z-Wave Debug . . requestAlarmSensorStatus: node 008, endpoint 7, cmdClass 71, type 0, value 0, classSubKey 710000
Z-Wave Debug . . requestAlarmSensorStatus: typeExt 14, valueExt 0, classSubKeyExt 7100000E00
Z-Wave Debug . . requestAlarmSensorStatus: defnStatusByte 0
Z-Wave received "008 - Security Siren" status update is off
Z-Wave Debug RCVD multiEndPointPacket: 01 0D 00 04 00 08 07 60 0D 07 01 79 0A 00 94
Z-Wave Debug . . multiEndPointPacket: node 008, endPoint 7
Z-Wave Debug RCVD requestReply2: 01 09 00 04 00 08 03 79 0A 00 FF (hex)