There is a new action that can be automatically triggered by certain events: webhook. This feature will be most interesting to those that want to connect the mining monitoring system with smart relays or set some other custom actions that get triggered on certain events.
A webhook trigger can be used in many different situations as it is available for all possible events - here are just some ideas:
- Controlling the room temperature via a smart relay API;
- Double-checking some parameters before resetting a profit switch on profit drop;
- Changing mining configuration on certain events;
- Sending yourself notifications on Discord, Slack, or any other platform that isn’t officially supported on minerstat.
How does a webhook trigger work?
A webhook trigger works the same as any other trigger, but while other triggers get fired for the most extreme cases, the webhook trigger will be fired for each event it is set. This means that if you set, for example, temperature trigger which set fans to 100% when the temperature is 80°C and at the same time a webhook trigger, both triggers will get fired.
How to set up a webhook trigger?
- First, select an item for which the value will be checked, for example, GPU temperature.
- Then select a group of workers, for example, MSOS.
- Then select the value, for example, ≥ 80°C;
- Then select [Webhook];
- Lastly, enter the URL of the webhook.
The URL of the webhook is the URL that will be called when the trigger is fired. In the entered URL address, you can also use tags that will be replaced with appropriate values so you will easier distinguish which trigger was fired:
(WORKER)tag will be replaced with the worker’s name.
(IF)tag will be replaced with the setting under the IF condition, defined in point (1).
(OF)tag will be replaced with the group name under the OF condition, defined in point (2).
(IS)tag will be replaced with the setting under the IS condition, defined in point (3).
So if the URL of the webhook would be defined as
you would be able to read the worker’s name and the temperature value and adjust the script on the URL to act accordingly.