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');
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');
Any help would be much appreciated.
Thanks