Awesome Miner uses rules to define actions to be performed when a certain condition (trigger) is met. The rules can be used to detect mining issues and provide notifications or take actions like rebooting a miner.

There are two kind of rules:

  • Predefined rules: These rules are included in Awesome Miner and cannot be removed, only disabled. The actions of a predefined rule can be modified, but only limited changes to the triggers are allowed.
  • User defined rules: These rules are defined by the user of Awesome Miner and both triggers and actions can be fully configured.

The configuration of rules are performed in the Options dialog, Rules section, illustrated below.

Configure a rule

This section describes the settings that can be configured for a specific rule.

A rule consists of one or more triggers and one or more actions. If the conditions of the triggers are met, all the defined actions will be performed.

The rule configuration dialog where triggers and actions can be configured are displayed below.

Rule settings

  • Description: Configuration of the name of the rule and selection of which miners the rule should apply to.
  • Only trigger for selected miners: By default the rule will consider all miners. Use this setting to limit the rule to only consider specific miners or specific groups of miners
  • Limit actions to run at most once every: Prevent the rule actions from running too frequently. If the trigger conditions are met, a rule will by default run all actions every 5 seconds. In many scenarios it's relevant to define a limit on how often the actions should run. The limit is per miner, not global.
  • Limit actions per day: Defines a limit on how many times per day the rule actions can run. The limit is per miner, not global.
  • Support manual activation via the toolbar: See detailed description below
  • Run actions of another rule: In addition to running the actions specified for this rule, the actions of second rule can also be executed. In case the second rule also enabled "Run actions of another rule", pointing to a third rule, the actions of the third rule will not be executed.
  • Override miners to run actions on: For most scenarios, this setting shouldn't be used. By default a rule will run on all miners where the trigger conditions are met. If used, the actions will be executed for the specified miners, no matter which miners that met the trigger conditions.

Support manual activation - trigger actions with a button click

Instead of, or in addition to, the defined triggers, this features allows a rule to be triggered manually. When enabled, a button with all the rules supporting manual activation will be displayed in the toolbar of the Awesome Miner main window. The toolbar button name is Actions and will expand a sub menu with all available rules.

In the Edit rule dialog, the feature can be enabled like below

To run these actions, select one or more miners in the Awesome Miner main window and use the Actions menu as illustrated below. All the five actions in the illustration are custom rules where the property "Support manual activation via the toolbar" is enabled.

Triggers

Triggers define the conditions when to run rule actions. A rule can have one or many triggers.

If Match all is selected, the conditions for all triggers must be met to trigger the actions. If Match at least one is selected, only the conditions for at least one trigger must be met.

See documentation for all triggers

Actions

Actions defines the operations to take when all trigger conditions of a rule is met. 

See documentation for all actions

Example: Show notification on low hashrate, and optionally reboot

The screenshot below shows an example of a Check statistics trigger that is configured to check if the current hash rate is less than (or equal) to 9 TH/s.

The screenshot below shows an example of a Create notification action that is configured to display an information message.

When checking for low hashrates, it's often better to check not only the current, but also the hashrate a couple of minutes ago. This is to reduce the number of false alarms where the hashrate for a very short period of time is dropping. The example below will both look at the current hashrate and on the hashrate 5 minutes ago. If both are lower than the limit, the actions will be triggered. Note that Match all must be selected to get this behavior.

This rule can also be extended with more actions in addition to the notification listed below. Additional actions could be to either reboot a computer or to reboot an Antminer.

Rule specification:

  • Description: Monitor hashrate 9 TH/s limit
  • Triggers: Match all
  • Trigger: Check statistics
    • Property: Hashrate, Current
    • Compare operation: Less than or equals
    • Compare value with 9 (TH/s)
  • Trigger: Check statistics
    • Property: Hashrate, 5 minutes ago
    • Compare operation: Less than or equals
    • Compare value with 9 (TH/s)
  • Action: Notification
    • Message: The hashrate is below 9 TH/s

Extend rule with reboot for ASIC mining (for example with Antminers)

Add an additional action to reboot the miner

  • Action: SSH command
    • Username: root (default)
    • Password: admin (default)
    • Command: Reboot system

Extend rule with reboot for GPU mining

Add an additional action to reboot the computer (when Remote Agent is used)

  • Action: Miner command (Optional and only for GPU mining)
    • Command: Reboot

Example: Reboot ASIC miner when showing up as Disconnected

Modify the existing rule Offline Detection and add an additional action to reboot the miner

  • Action: SSH command
    • Username: root (default)
    • Password: admin (default)
    • Command: Reboot system

Example: Mining only when the computer is idle

Rule specification:

  • Description: Start mining when idle
  • Trigger: Computer idle
    • Trigger on: Computer is idle
  • Action: Miner command
    • Command: Start miner

Rule specification:

  • Description: Stop mining when used
  • Trigger: Computer idle
    • Trigger on: Computer is used
  • Action: Miner command
    • Command: Stop miner

Example: Launch Remote Desktop for selected Managed Miner

This example illustrates the "Manual activation" feature that can be enabled for rules. When enabled, the rule will be displayed in the Actions menu in the main window of Awesome Miner when a miner is selected. The command can be changed to launch other applications and services as well. The [Host] parameter will be replaced with the hostname/IP of the selected miner.

Rule specification:

  • Description: Launch Remote Desktop
  • Action: Run executable
    • Executable: mstsc.exe
    • Parameters: /v:[Host]
  • Support manual activation: Yes (checked)

Example: Open web interface for ASIC miner

This example illustrates the "Manual activation" feature that can be enabled for rules. When enabled, the rule will be displayed in the Actions menu in the main window of Awesome Miner when a miner is selected. In this example Chrome is used.

Rule specification:

  • Description: Launch Web Interface
  • Action: Run executable
    • Executable: chrome.exe
    • Parameters: http://[Host]
  • Support manual activation via the toolbar: Yes (checked)

Example: Reboot an Antminer on chip failures

Antminers can report chip failures and these are displayed on the ASIC tab when selecting an Antminer in Awesome Miner. This is indicated as 'o' for a working chip and 'x' for a failed chip. This example describes how to create a rule that reboots Antminers with two or more chip failures.

Rule specification:

  • Description: Reboot Antminer on chip failure
  • Detect dead/sick device
    • Enable: Antminer chip failure, threashold: 2
  • Action: SSH command
    • Username: root (default)
    • Password: admin (default)
    • Command: Reboot system

Example: Stop mining on high device temperature

If the temperature of a GPU becomes higher than 92 °C, this rule will stop the mining and send a notification message.

Rule specification:

  • Description: Overheat protection
  • Trigger: Detect temperature
    • Temperature: 92 °C
  • Action: Miner command
    • Command: Stop miner
  • Action: Notification
    • Message: Stopping mining because of high temperature

Example: Pause mining on high device temperature - for ASIC miners

If the chip temperature of a device becomes higher than 89 °C for 30 seconds, this rule will pause the mining and send a notification message. This rule works on all ASIC miners with support for the Pause mining operation.

Rule specification:

  • Description: Pause on high temperature
  • Trigger: Device temperature
    • Temperature: 89 °C
    • Temperature source: ASIC chip (can be set to Main/PCB temperature if needed)
    • When conditions are met for: 30 seconds
  • Action: ASIC Tools -> Pause mining and sleep
  • Action: Notification
    • Message: Pause mining because of high temperature

Extend rule by also restarting the mining

The rule can also be extended to start the mining again after a period of time. The following actions can be added in addition to the actions above to resume the mining after 20 minutes.

  • Action: Wait
    • Seconds: 1200 (equals 20 minutes)
  • Action: ASIC Tools -> Resume mining

Example: Reboot GPU miner after several mining software crashes

If the mining software process is crashing, Awesome Miner will automatically restart the mining process to continue the mining. Awesome Miner will do these restart attempts a number of times, but if the mining software keeps crashing many times within a short period of time, Awesome Miner will no longer try to restart it. In order to reboot the GPU mining computer after all these restart attempts has been made, define the following rule.

Rule specification:

  • Description: Reboot after mining software crashes
  • Trigger: Process failure
    • Check only: Mining process not running and too many failed attempts to restart
  • Action: Miner command
    • Command: Reboot

Example: Reboot GPU miners every 12 hours

In case a GPU miner becomes unstable after a longer period of operation, this rule can reboot the miner every 12 hours.

Rule specification:

  • Description: Reboot every 12h
  • Trigger: Time
    • Trigger every: Hour: 12
  • Action: Miner command
    • Command: Reboot


Example: Reboot ASIC miners once per day

In case an ASIC miner becomes unstable after a longer period of operation, this rule can reboot the miner at 4 AM every day.

Rule specification:

  • Description: Reboot ASIC at 4 AM
  • Trigger: Time
    • Trigger on time: 4 AM (04:00)
  • Action: SSH command
    • Username: root (default)
    • Password: admin (default)
    • Command: Reboot system


Example: Run GPU mining during a specific time

This example shows how to start the mining at 8 AM (08:00) and stop the mining at 7 PM (19:00). Please note that two individual rules are required for this setup, one to start the mining and another one to stop the mining.

Rule specification:

  • Description: Start in the morning
  • Trigger: Time
    • Trigger on specific time: 8 AM (08:00)
  • Action: Miner command
    • Command: Start miner

Rule specification:

  • Description: Stop in the evening
  • Trigger: Time
    • Trigger on specific time: 7 PM (19:00)
  • Action: Miner command
    • Command: Stop miner

Example: Change mining pool three times per day

This example shows how to change to Pool#1 at 7 AM (07:00), then change to Pool#2 at 3 PM (15:00) and finally change to Pool#3 at 11 PM (23:00). The interval and number of pools to change between can be modified to fulfill other requirements as well. This example consists of 3 individual rules that all must be enabled. All pools must be predefined in the Options dialog, Pools section before defining the rules.

Rule specification:

  • Description: Set Pool#1
  • Trigger: Time
    • Trigger on specific time: 7 AM (07:00)
  • Action: Miner command
    • Command: Change pool
    • Pool: Pool#1

Rule specification:

  • Description: Set Pool#2
  • Trigger: Time
    • Trigger on specific time: 3 PM (15:00)
  • Action: Miner command
    • Command: Change pool
    • Pool: Pool#2

Rule specification:

  • Description: Set Pool#3
  • Trigger: Time
    • Trigger on specific time: 11 PM (23:00)
  • Action: Miner command
    • Command: Change pool
    • Pool: Pool#3

Example: Stop mining when profitability is too low

This example shows how to stop a Managed Profit Miner when the profitability is zero or below.

Rule specification:

  • Description: Stop on low profit
  • Trigger: Revenue/Profit
    • Property: Miner Profit
    • Compare operation: Less than or equals
    • Compare with value: 0
  • Action: Miner command
    • Command: Stop miner

Example: Start mining when profitability is above a defined value

This example shows how to start a Managed Profit Miner when the profitability is 1 USD per day or above. Note that the Property can't be Miner Profit if a miner is stopped, as the miner doesn't have any profit in this case. The Property Profit Profile should be used instead.

Rule specification:

  • Description: Start on profit
  • Trigger: Revenue/Profit
    • Property: Profile Profit
    • Compare operation: Greater than or equals
    • Compare with value: 1
  • Action: Miner command
    • Command: Start miner

Example: Set different electricity price depending on time of day.

This example shows how to set the electricity price to $0.07 (per kWh) from 6 AM (06:00) to 9 PM (21:00) and to $0.05 (per kWh) for all other time. Please note that two individual rules are required for this setup.

Rule specification:

  • Description: Set day rate
  • Trigger: Time
    • Trigger on time: 6 AM (06:00)
  • Action: Set Property
    • Property: Set electricity price (global)
    • Electricity price: 0.07

Rule specification:

  • Description: Set night rate
  • Trigger: Time
    • Trigger on time: 9 PM (21:00)
  • Action: Set Property 
    • Property: Set electricity price (global)
    • Electricity price: 0.05

Example: Set Antminer hashrate performance based on chip temperature

This example is intended for Antminers running the Awesome Miner Antminer firmware. Two rules will be required. The first rule will look for high chip temperature and set a lower hashrate (using the Mining Profile concept in the firmware). The second rule will look for high chip temperature and set a higher hashrate (also using Mining Profile).

The triggers are set to only start looking at the chip temperature after 15 minutes of mining. The example is based on Antminer S9 and use the 11.8 TH/s profile for the low hashrate and 14.5TH/s profile for the high hashrate. This is only used as examples and needs to be adjusted to work well with the specific Antminer being used and the mining environment.

Rule specification:

  • Description: Set low hashrate if high chip temperature
  • Limit actions to run at most once every: 5 minutes
  • Triggers: Match all
  • Trigger: Mining uptime
    • Mining uptime: 15 minutes
    • Compare operation: Greater than or equals
  • Trigger: Device temperature
    • Temperature: 95°C
    • Temperature source: Antminer chip
    • Compare operation: Greater than or equals
    • Compare with device: Highest device temperature
    • Trigger condition: 30 seconds
  • Action: Antminer -> Firmware mining profile
    • Mining Profile: 11.8 TH/s

Rule specification:

  • Description: Set high hashrate if low chip temperature
  • Limit actions to run at most once every: 5 minutes
  • Triggers: Match all
  • Trigger: Mining uptime
    • Mining uptime: 15 minutes
    • Compare operation: Greater than or equals
  • Trigger: Device temperature
    • Temperature: 75°C
    • Temperature source: Antminer chip
    • Compare operation: Less than or equals
    • Compare with device: Highest device temperature
    • Trigger condition: 30 seconds
  • Action: Antminer -> Firmware mining profile
    • Mining Profile: 14.5 TH/s

Example: Run Antminer mining during a specific time

This feature requires the Antminer to run the Awesome Miner Antminer firmware. This example shows how to pause the mining at 6 AM (06:00) and resume the mining at 5 PM (17:00). Please note that two individual rules are required for this setup, one to pause the mining and another one to resume the mining.

Rule specification:

  • Description: Pause Antminers
  • Trigger: Time
    • Trigger on specific time: 6 AM (06:00)
  • Action: Antminer -> Pause mining and sleep

Rule specification:

  • Description: Resume Antminers
  • Trigger: Time
    • Trigger on specific time: 5 PM (17:00)
  • Action: Antminer -> Resume mining