Allow to monitor events on the UPS
const client = new NUTClient('127.0.0.1', 3493);const monitor = new Monitor(client, 'myUps');monitor.on('ONBATT', () => { console.log('UPS "myUps" lost power and is now on battery');});await monitor.start() Copy
const client = new NUTClient('127.0.0.1', 3493);const monitor = new Monitor(client, 'myUps');monitor.on('ONBATT', () => { console.log('UPS "myUps" lost power and is now on battery');});await monitor.start()
Static
Rest
Optional
Allow to monitor events on the UPS
Example