Skip to content

Commit

Permalink
Add basic example to README
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiagoSotoC committed Jul 15, 2021
1 parent c35a09e commit def109f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ const myAlarm = new alarmDecoder(config.ip, config.port, config.zones);

myAlarm.events.on('connected', () => console.log('Connected'));
myAlarm.events.on('disconnected', () => console.log('Disconnected'));
myAlarm.events.on("rfxMessage",(data)=> console.log(data));
myAlarm.events.on('zoneChanged', (data) => {
if (data.zone.type === 'motion') {
console.log('Movement' + (data.state ? '' : ' ended') + ' at ' + data.zone.name);
Expand Down

0 comments on commit def109f

Please sign in to comment.