I did a little grep-digging yesterday and I think I’m on to something.
grep 'Detail, Node006, Received: 0x01, 0x10, 0x00, 0x04, 0x00, 0x06, 0x0a, 0x71, 0x05, 0x00, 0x00, 0x00, 0xff, 0x06, 0x06, 0x01, ' config/OZW_Log.txt | tail -1
…gives me the row I want, the last occasion of the row containing the data:
2019-12-18 21:11:18.818 Detail, Node006, Received: 0x01, 0x10, 0x00, 0x04, 0x00, 0x06, 0x0a, 0x71, 0x05, 0x00, 0x00, 0x00, 0xff, 0x06, 0x06, 0x01, 0x01, 0x6c
Now all that’s left is to extract the second last part of it, “0x01, 0x6c” in this case. I guess I could try “cut” or “sed” to find that part. I seems the data I want is always at position 150-160 in the fetched row.
Next thing is to execute a command to actually update the sensor when a new unlock is triggered, but I guess that can be a homeassistant.update_entity
?
Anyway, first things first. Example log:
2019-12-18 21:09:57.968 Info, Node002, Received Meter report from node 2: Power=0.000W
2019-12-18 21:09:57.968 Detail, Node002, Refreshed Value: old value=0.000, new value=0.000, type=decimal
2019-12-18 21:09:57.968 Detail, Node002, Changes to this value are not verified
2019-12-18 21:09:57.968 Detail, Node002, Notification: ValueChanged
2019-12-18 21:09:57.977 Detail, Node002, Notification: ValueChanged
2019-12-18 21:11:18.818 Detail, Node006, Received: 0x01, 0x10, 0x00, 0x04, 0x00, 0x06, 0x0a, 0x71, 0x05, 0x00, 0x00, 0x00, 0xff, 0x06, 0x06, 0x01, 0x01, 0x6c
2019-12-18 21:11:18.819 Detail,
2019-12-18 21:11:18.819 Info, Node006, Received Alarm report: type=0, level=0, sensorSrcID=0, type:Access Control event:6, status=255
2019-12-18 21:11:18.819 Detail, Node006, Initial read of value
2019-12-18 21:11:18.819 Detail, Node006, Initial read of value
2019-12-18 21:11:18.819 Detail, Node006, Initial read of value
2019-12-18 21:11:18.819 Detail, Node006, Initial read of value
2019-12-18 21:11:18.819 Detail, Node006, Notification: ValueChanged
2019-12-18 21:11:18.826 Detail, Node006, Notification: ValueChanged
2019-12-18 21:11:18.833 Detail, Node006, Notification: ValueChanged
2019-12-18 21:11:18.838 Detail, Node006, Notification: ValueChanged
2019-12-18 21:11:18.872 Detail, Node006, Received: 0x01, 0x08, 0x00, 0x04, 0x00, 0x06, 0x02, 0x84, 0x07, 0x74