How to listen for events from devices (locks)

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
jkebinger
Posts: 15
Joined: 17 Mar 2013 02:58

How to listen for events from devices (locks)

Post by jkebinger »

I read the docs, but can't quite grasp how I'd go about listening for and processing events from my zwave lock. I see it has an association with the controller, so the controller should get the events... but now what? Are there any code examples or docs for that floating around?
I'd like to be able to log when the door is locked and unlocked.
thanks
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

DoorLockLogging Command Class

Post by PoltoS »

DoorLockLogging Command Class is not implemented yet, but the simple DoorLock.data.mode should also show the update of the lock mode. Please check the manual to see how to use JS API.Do you see the update of lock status in the UI in Locks tab?
dario87
Posts: 18
Joined: 13 Jun 2014 11:46

Re: How to listen for events from devices (locks)

Post by dario87 »

hi,
I'm new to the blog.
I recently installed z-way.
I add a device, using the expert interface, but I can not listen to the changes.
When the device changes state, z-way does not update the status.
How can I fix the problem?

thanks
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

Re: How to listen for events from devices (locks)

Post by PoltoS »

Check log to see what comes from the device. With old locks it depends on manufacturer.
dario87
Posts: 18
Joined: 13 Jun 2014 11:46

Re: How to listen for events from devices (locks)

Post by dario87 »

hi,
thanks for the reply.
I checked the log file and I saw that the state changes are logged.
There is a function that can check the status changes?
Or do I have read the log file?

thanks
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

Re: How to listen for events from devices (locks)

Post by PoltoS »

You need to bind to those dataholders, that changes during log status change. Please check our manual
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: How to listen for events from devices (locks)

Post by pz1 »

Good to hear. I hadn't noticed there was a new manual based on version 1.7
Since 29-12-2016 I am no longer a moderator for this forum
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

Re: How to listen for events from devices (locks)

Post by PoltoS »

Me neither ;) We are still polishing it, so it might become better and better. But it already describes number of new features.
Post Reply