Command classes for Fibaro sensor

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
eeEE74
Posts: 2
Joined: 09 Apr 2017 15:40

Command classes for Fibaro sensor

Post by eeEE74 » 13 Apr 2017 20:38

Hi,

I am using the Fibaro FGMS-001 multisensor, and attempting to make it so that I get an email when the motion alarm is triggered on the sensor, notifying me of an intrusion, and simultaneously logging the temperature data when I receive it (based on this link - https://technology.amis.nl/2016/01/14/s ... -fgms-001/).

The javascript & python code for the logging of the temperature data works fine, however, I do not receive email notifications of intrusion alarms. I believe the issue might be that the example above uses command class 48 (sensorBinary) for the notifications, however, when I look at the logs in /var/log/z-way-server.log, I see Z-Way calling command class 113 (specifically data[7] - Burglar alarm).

I then changed my code a couple of ways in JavaScript to notify me of an intrusion, but I get no response:

Original attempt:

Code: Select all

	zway.devices[5].instances[0].commandClasses[48].data[1].level.bind(function() {
		if (this.value == true)
			debugPrint("Executing trigger")
			system('/usr/bin/python /opt/z-way-server/automation/trigger.py');
Next attempts using command class 113:

Code: Select all

	zway.devices[5].instances[0].commandClasses[113].data[7].val.bind(function() { //check this line
		if (this.value == true)
			debugPrint("Executing trigger")
			system('/usr/bin/python /opt/z-way-server/automation/trigger.py');

Code: Select all

	zway.devices[5].instances[0].commandClasses[113].data[7].event[2].bind(function() {
		if (this.value == true)
			debugPrint("Executing trigger")
			system('/usr/bin/python /opt/z-way-server/automation/trigger.py')

Code: Select all

	zway.devices[5].instances[0].commandClasses[113].data[7].event[2].bind(function() {
		if (this.value == true)
			debugPrint("Executing trigger")
			system('/usr/bin/python /opt/z-way-server/automation/trigger.py')

Code: Select all

	zway.devices[7].instances[0].commandClasses[113].data[7].level.bind(function() { 
		if(this.value == true)
			debugPrint("Executing trigger");
			system('/usr/bin/python /opt/z-way-server/automation/storage/trigger.py');
My guess is that my problem lies after .data[7] (i.e. what quantity I am referencing), and my if statement.

Any help would be much appreciated.

Thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests