Hi Greg,
Great question - this is supported via the
serverExecute function of an event.
Basically all you gotta do is create your own event in the
exports.events object.
Add this code in your own user metrics js file under
_userMetrics folder.
There are many examples how to do it in that collection in the master metrics.js (https://github.com/LowPowerLab/RaspberryPi-Gateway/blob/master/metrics.js), just look for the exports.events and specifically the serverExecute.
Perfect examples to follow are:
- motionLightON23 - when MOTION is received from a MotionMote, an ON message is sent to another SwitchMote to turn lights ON
- switchMoteONBUZZ - when a switchmote turns ON, a beep is played on the gateway buzzer