- Source:
Manages monitoring hooks
Examples
See "hooks/examples/monitor_cpu.js" for a monitoring hook definition
See "hooks/examples/monitor_gpio.js" for a GPIO monitoring hook definition
Members
(private, static) api
- Source:
Properties:
Name | Type | Description |
---|---|---|
api |
TelegramService | Link to TelegramService |
(private, static) initialized
- Source:
Properties:
Name | Type | Description |
---|---|---|
initialized |
Boolean | If initialized |
Methods
(static) init(tapi) → {Promise}
- Source:
Initialize monitoring hooks manager
Parameters:
Name | Type | Description |
---|---|---|
tapi |
TelegramService | Link to Telegram service |
Returns:
- Type
- Promise
(static) restart(hook_or_name) → {Promise}
- Source:
Restarts a monitoring hook
Parameters:
Name | Type | Description |
---|---|---|
hook_or_name |
string | Object | Monitoring hook or hook name to be restarted |
Returns:
- Type
- Promise
(static) start(hook_or_name) → {Promise}
- Source:
Starts a monitoring hook
Parameters:
Name | Type | Description |
---|---|---|
hook_or_name |
string | Object | Monitoring hook or hook name to be started |
Returns:
- Type
- Promise
(static) stop(hook_or_name) → {Promise}
- Source:
Stops a monitoring hook
Parameters:
Name | Type | Description |
---|---|---|
hook_or_name |
string | Object | Monitoring hook or hook name to be stopped |
Returns:
- Type
- Promise