LowPowerLab Forum

Software support => Pi Gateway => Topic started by: gkientzy on January 11, 2016, 07:46:36 PM

Title: garageSMS event not firing in V7 image (fix included)
Post by: gkientzy on January 11, 2016, 07:46:36 PM
The V7 Image did not trigger the garageSMS event.   Investigation found that the garageSMS event defined in the metrics.js file needs a slight modification to make it work.    The logical expression in exports.events associated with garageSMS needs to check for "OPENING.." (as defined within exports.metrics section)  rather than "OPENING".     I hope this saves someone some time.   Without this change, the SMS event will not trigger.
Title: Re: garageSMS event not firing in V7 image (fix included)
Post by: Felix on January 11, 2016, 11:14:46 PM
Yup I ran into that myself and fixed it on my pi but forgot to push the update to github. I revisited this and I propose the following:

node.metrics['Status'].value.indexOf('OPENING')>-1

Then we don't care where OPENING is in the string.