Spanish Total.js
English
Documentation For AI agents
Contents

Alerts and debugging

Report problems of a device as alerts and write debug messages to the log of the stream.

.md Website
On this page

Report an alert

instance.throw(message) creates an alert for the device. It appears on the Alerts screen with the name of the device:

if (data.battery < 10)
    instance.throw('Battery low: ' + data.battery + ' %');

An alert about a low battery

Report what the people who look after the devices must act on. See Alerts.

Write debug messages

instance.debug() writes a line to logs/debugger.log in the folder of the stream. It takes up to four values:

instance.debug('Interval changed to', $.data.minutes, 'minutes');

The stream writes the collected lines once a minute. Each line has the time in UTC, the name of the driver and the id of the device:

2026-11-20 05:49:44 Demo weather station (JasoWV1cL61f) Interval changed to 15 minutes

Check what the stream runs

The status page of the stream lists every device and extension with its counters. When a device is missing, the stream has not loaded it yet or the device is disabled.

Test with real data

Replay recorded readings with Simulations, or post them with curl as in Your first driver.

Made in Europe