
# Morningstar TriStar PWM by SNMP

## Overview

This template is designed for the effortless deployment of Morningstar TriStar PWM monitoring by Zabbix via SNMP and doesn't require any external scripts.

## Requirements

Zabbix version: 7.0 and higher.

## Tested versions

This template has been tested on:
- Morningstar TriStar PWM

## Configuration

> Zabbix should be configured according to the instructions in the [Templates out of the box](https://www.zabbix.com/documentation/7.0/manual/config/templates_out_of_the_box) section.

## Setup

Refer to the vendor documentation.

### Macros used

|Name|Description|Default|
|----|-----------|-------|
|{$BATTERY.TEMP.MIN.WARN}|
Battery low temperature warning value
|`0`|
|{$BATTERY.TEMP.MAX.WARN}|
Battery high temperature warning value
|`45`|
|{$BATTERY.TEMP.MIN.CRIT}|
Battery low temperature critical value
|`-20`|
|{$BATTERY.TEMP.MAX.CRIT}|
Battery high temperature critical value
|`60`|
|{$VOLTAGE.MIN.WARN}|||
|{$VOLTAGE.MAX.WARN}|||
|{$VOLTAGE.MIN.CRIT}|||
|{$VOLTAGE.MAX.CRIT}|||
|{$CHARGE.STATE.WARN}|
disconnect
|`2`|
|{$CHARGE.STATE.CRIT}|
fault
|`4`|
|{$LOAD.STATE.WARN:"lvdWarning"}|
lvdWarning
|`2`|
|{$LOAD.STATE.WARN:"disconnect"}|
disconnect
|`5`|
|{$LOAD.STATE.WARN:"override"}|
override
|`7`|
|{$LOAD.STATE.CRIT:"lvd"}|
lvd
|`3`|
|{$LOAD.STATE.CRIT:"fault"}|
fault
|`4`|

### Items

|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Status: Uptime (network)|
The time (in hundredths of a second) since the network management portion of the system was last re-initialized.
|SNMP agent|status.net.uptime
**Preprocessing**

- 
Custom multiplier: `0.01`

|
|Status: Uptime (hardware)|
The amount of time since this host was last initialized. Note that this is different from sysUpTime in the SNMPv2-MIB [RFC1907] because sysUpTime is the uptime of the network management portion of the system.
|SNMP agent|status.hw.uptime
**Preprocessing**

- 
Check for not supported value: `any error`

⛔️Custom on fail: Set value to: `0`

- 
Custom multiplier: `0.01`

|
|Status: Control Mode|
MIB: TRISTAR

Description:Control Mode

Modbus address:0x001A

0: charge

1: loadControl

2: diversion

3: lighting
|SNMP agent|control.mode[controlMode.0]|
|Counter: KW-hours|
MIB: TRISTAR

Description:Kilowatt Hours

Scaling Factor:1.0

Units:kWh

Range:[0.0, 5000.0]

Modbus address:0x001E
|SNMP agent|counter.charge_kw_hours[kilowattHours.0]
**Preprocessing**

- 
Custom multiplier: `0.001`

- 
Regular expression: `^(\d+)(\.\d{1,2})? \1\2`

|
|Counter: Amp-hours|
MIB: TRISTAR

Description:Ah (Resettable)

Scaling Factor:0.1

Units:Ah

Range:[0.0, 50000.0]

Modbus addresses:H=0x0011 L=0x0012
|SNMP agent|counter.charge_amp_hours[ahResettable.0]
**Preprocessing**

- 
Custom multiplier: `0.1`

|
|Battery: Battery Voltage discovery|
MIB: TRISTAR

Description:Battery voltage

Scaling Factor:0.002950042724609375

Units:V

Range:[0.0, 80.0]

Modbus address:0x0008
|SNMP agent|battery.voltage.discovery[batteryVoltage.0]
**Preprocessing**

- 
Custom multiplier: `0.002950042725`

|
|Temperature: Battery|
MIB: TRISTAR

Description:Battery Temperature

Scaling Factor:1.0

Units:deg C

Range:[-40, 120]

Modbus address:0x000F
|SNMP agent|temp.battery[batteryTemperature.0]|
|Temperature: Heatsink|
MIB: TRISTAR

Description:Heatsink Temperature

Scaling Factor:1.0

Units:deg C

Range:[-40, 120]

Modbus address:0x000E
|SNMP agent|temp.heatsink[heatsinkTemperature.0]|
|Status: Faults|
MIB: TRISTAR

Description:Battery voltage

Scaling Factor:0.002950042724609375

Units:V

Range:[0.0, 80.0]

Modbus address:0x0008
|SNMP agent|status.faults[faults.0]
**Preprocessing**

- 
Discard unchanged with heartbeat: `1h`

- 
JavaScript: `The text is too long. Please see the template.`

|
|Status: Alarms|
MIB: TRISTAR

Description:Alarms

Modbus addresses:H=0x001D L=0x0017
|SNMP agent|status.alarms[alarms.0]
**Preprocessing**

- 
Discard unchanged with heartbeat: `1h`

- 
JavaScript: `The text is too long. Please see the template.`

|

### Triggers

|Name|Description|Expression|Severity|Dependencies and additional info|
|----|-----------|----------|--------|--------------------------------|
|Morningstar TriStar PWM: Status: Device has been restarted|
Uptime is less than 10 minutes.
|`(last(/Morningstar TriStar PWM by SNMP/status.hw.uptime)>0 and last(/Morningstar TriStar PWM by SNMP/status.hw.uptime)<10m) or (last(/Morningstar TriStar PWM by SNMP/status.hw.uptime)=0 and last(/Morningstar TriStar PWM by SNMP/status.net.uptime)<10m)`|Info|**Manual close**: Yes|
|Morningstar TriStar PWM: Status: Failed to fetch data|
Zabbix has not received data for items for the last 5 minutes.
|`nodata(/Morningstar TriStar PWM by SNMP/status.net.uptime,5m)=1`|Warning|**Manual close**: Yes|
|Morningstar TriStar PWM: Temperature: Low battery temperature||`max(/Morningstar TriStar PWM by SNMP/temp.battery[batteryTemperature.0],5m)<{$BATTERY.TEMP.MIN.WARN}`|Warning|**Depends on**:

- Morningstar TriStar PWM: Temperature: Critically low battery temperature
|
|Morningstar TriStar PWM: Temperature: Critically low battery temperature||`max(/Morningstar TriStar PWM by SNMP/temp.battery[batteryTemperature.0],5m)<{$BATTERY.TEMP.MIN.CRIT}`|High||
|Morningstar TriStar PWM: Temperature: High battery temperature||`min(/Morningstar TriStar PWM by SNMP/temp.battery[batteryTemperature.0],5m)>{$BATTERY.TEMP.MAX.WARN}`|Warning|**Depends on**:

- Morningstar TriStar PWM: Temperature: Critically high battery temperature
|
|Morningstar TriStar PWM: Temperature: Critically high battery temperature||`min(/Morningstar TriStar PWM by SNMP/temp.battery[batteryTemperature.0],5m)>{$BATTERY.TEMP.MAX.CRIT}`|High||
|Morningstar TriStar PWM: Status: Device has "externalShort" faults flag||`count(/Morningstar TriStar PWM by SNMP/status.faults[faults.0],#3,"like","externalShort")=2`|High||
|Morningstar TriStar PWM: Status: Device has "overcurrent" faults flag||`count(/Morningstar TriStar PWM by SNMP/status.faults[faults.0],#3,"like","overcurrent")=2`|High||
|Morningstar TriStar PWM: Status: Device has "mosfetSShorted" faults flag||`count(/Morningstar TriStar PWM by SNMP/status.faults[faults.0],#3,"like","mosfetSShorted")=2`|High||
|Morningstar TriStar PWM: Status: Device has "softwareFault" faults flag||`count(/Morningstar TriStar PWM by SNMP/status.faults[faults.0],#3,"like","softwareFault")=2`|High||
|Morningstar TriStar PWM: Status: Device has "highVoltageDisconnect" faults flag||`count(/Morningstar TriStar PWM by SNMP/status.faults[faults.0],#3,"like","highVoltageDisconnect")=2`|High||
|Morningstar TriStar PWM: Status: Device has "tristarHot" faults flag||`count(/Morningstar TriStar PWM by SNMP/status.faults[faults.0],#3,"like","tristarHot")=2`|High||
|Morningstar TriStar PWM: Status: Device has "dipSwitchChange" faults flag||`count(/Morningstar TriStar PWM by SNMP/status.faults[faults.0],#3,"like","dipSwitchChange")=2`|High||
|Morningstar TriStar PWM: Status: Device has "customSettingsEdit" faults flag||`count(/Morningstar TriStar PWM by SNMP/status.faults[faults.0],#3,"like","customSettingsEdit")=2`|High||
|Morningstar TriStar PWM: Status: Device has "reset" faults flag||`count(/Morningstar TriStar PWM by SNMP/status.faults[faults.0],#3,"like","reset")=2`|High||
|Morningstar TriStar PWM: Status: Device has "systemMiswire" faults flag||`count(/Morningstar TriStar PWM by SNMP/status.faults[faults.0],#3,"like","systemMiswire")=2`|High||
|Morningstar TriStar PWM: Status: Device has "rtsShorted" faults flag||`count(/Morningstar TriStar PWM by SNMP/status.faults[faults.0],#3,"like","rtsShorted")=2`|High||
|Morningstar TriStar PWM: Status: Device has "rtsDisconnected" faults flag||`count(/Morningstar TriStar PWM by SNMP/status.faults[faults.0],#3,"like","rtsDisconnected")=2`|High||
|Morningstar TriStar PWM: Status: Device has "rtsShorted" alarm flag||`count(/Morningstar TriStar PWM by SNMP/status.alarms[alarms.0],#3,"like","rtsShorted")=2`|Warning||
|Morningstar TriStar PWM: Status: Device has "rtsDisconnected" alarm flag||`count(/Morningstar TriStar PWM by SNMP/status.alarms[alarms.0],#3,"like","rtsDisconnected")=2`|Warning||
|Morningstar TriStar PWM: Status: Device has "heatsinkTempSensorOpen" alarm flag||`count(/Morningstar TriStar PWM by SNMP/status.alarms[alarms.0],#3,"like","heatsinkTempSensorOpen")=2`|Warning||
|Morningstar TriStar PWM: Status: Device has "heatsinkTempSensorShorted" alarm flag||`count(/Morningstar TriStar PWM by SNMP/status.alarms[alarms.0],#3,"like","heatsinkTempSensorShorted")=2`|Warning||
|Morningstar TriStar PWM: Status: Device has "tristarHot" alarm flag||`count(/Morningstar TriStar PWM by SNMP/status.alarms[alarms.0],#3,"like","tristarHot")=2`|Warning||
|Morningstar TriStar PWM: Status: Device has "currentLimit" alarm flag||`count(/Morningstar TriStar PWM by SNMP/status.alarms[alarms.0],#3,"like","currentLimit")=2`|Warning||
|Morningstar TriStar PWM: Status: Device has "currentOffset" alarm flag||`count(/Morningstar TriStar PWM by SNMP/status.alarms[alarms.0],#3,"like","currentOffset")=2`|Warning||
|Morningstar TriStar PWM: Status: Device has "batterySense" alarm flag||`count(/Morningstar TriStar PWM by SNMP/status.alarms[alarms.0],#3,"like","batterySense")=2`|Warning||
|Morningstar TriStar PWM: Status: Device has "batterySenseDisconnected" alarm flag||`count(/Morningstar TriStar PWM by SNMP/status.alarms[alarms.0],#3,"like","batterySenseDisconnected")=2`|Warning||
|Morningstar TriStar PWM: Status: Device has "uncalibrated" alarm flag||`count(/Morningstar TriStar PWM by SNMP/status.alarms[alarms.0],#3,"like","uncalibrated")=2`|Warning||
|Morningstar TriStar PWM: Status: Device has "rtsMiswire" alarm flag||`count(/Morningstar TriStar PWM by SNMP/status.alarms[alarms.0],#3,"like","rtsMiswire")=2`|Warning||
|Morningstar TriStar PWM: Status: Device has "highVoltageDisconnect" alarm flag||`count(/Morningstar TriStar PWM by SNMP/status.alarms[alarms.0],#3,"like","highVoltageDisconnect")=2`|Warning||
|Morningstar TriStar PWM: Status: Device has "diversionLoadNearMax" alarm flag||`count(/Morningstar TriStar PWM by SNMP/status.alarms[alarms.0],#3,"like","diversionLoadNearMax")=2`|Warning||
|Morningstar TriStar PWM: Status: Device has "systemMiswire" alarm flag||`count(/Morningstar TriStar PWM by SNMP/status.alarms[alarms.0],#3,"like","systemMiswire")=2`|Warning||
|Morningstar TriStar PWM: Status: Device has "mosfetSOpen" alarm flag||`count(/Morningstar TriStar PWM by SNMP/status.alarms[alarms.0],#3,"like","mosfetSOpen")=2`|Warning||
|Morningstar TriStar PWM: Status: Device has "p12VoltageReferenceOff" alarm flag||`count(/Morningstar TriStar PWM by SNMP/status.alarms[alarms.0],#3,"like","p12VoltageReferenceOff")=2`|Warning||
|Morningstar TriStar PWM: Status: Device has "loadDisconnectState" alarm flag||`count(/Morningstar TriStar PWM by SNMP/status.alarms[alarms.0],#3,"like","loadDisconnectState")=2`|Warning||

### LLD rule Battery voltage discovery

|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Battery voltage discovery|
Discovery for battery voltage triggers
|Dependent item|battery.voltage.discovery
**Preprocessing**

- 
JavaScript: `The text is too long. Please see the template.`

|

### Item prototypes for Battery voltage discovery

|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Battery: Voltage{#SINGLETON}|
MIB: TRISTAR

Description:Battery voltage

Scaling Factor:0.002950042724609375

Units:V

Range:[0.0, 80.0]

Modbus address:0x0008
|SNMP agent|battery.voltage[batteryVoltage.0{#SINGLETON}]
**Preprocessing**

- 
Custom multiplier: `0.002950042725`

- 
Regular expression: `^(\d+)(\.\d{1,2})? \1\2`

|

### Trigger prototypes for Battery voltage discovery

|Name|Description|Expression|Severity|Dependencies and additional info|
|----|-----------|----------|--------|--------------------------------|
|Morningstar TriStar PWM: Battery: Low battery voltage||`max(/Morningstar TriStar PWM by SNMP/battery.voltage[batteryVoltage.0{#SINGLETON}],5m)<{#VOLTAGE.MIN.WARN}`|Warning|**Depends on**:

- Morningstar TriStar PWM: Battery: Critically low battery voltage
|
|Morningstar TriStar PWM: Battery: Critically low battery voltage||`max(/Morningstar TriStar PWM by SNMP/battery.voltage[batteryVoltage.0{#SINGLETON}],5m)<{#VOLTAGE.MIN.CRIT}`|High||
|Morningstar TriStar PWM: Battery: High battery voltage||`min(/Morningstar TriStar PWM by SNMP/battery.voltage[batteryVoltage.0{#SINGLETON}],5m)>{#VOLTAGE.MAX.WARN}`|Warning|**Depends on**:

- Morningstar TriStar PWM: Battery: Critically high battery voltage
|
|Morningstar TriStar PWM: Battery: Critically high battery voltage||`min(/Morningstar TriStar PWM by SNMP/battery.voltage[batteryVoltage.0{#SINGLETON}],5m)>{#VOLTAGE.MAX.CRIT}`|High||

### LLD rule Charge mode discovery

|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Charge mode discovery|
Discovery for device in charge mode
|Dependent item|controlmode.charge.discovery
**Preprocessing**

- 
JavaScript: `The text is too long. Please see the template.`

|

### Item prototypes for Charge mode discovery

|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Array: Voltage{#SINGLETON}|
MIB: TRISTAR

Description:Array/Load Voltage

Scaling Factor:0.00424652099609375

Units:V

Range:[0, 80]

Modbus address:0x000A
|SNMP agent|array.voltage[arrayloadVoltage.0{#SINGLETON}]
**Preprocessing**

- 
Custom multiplier: `0.004246520996`

- 
Regular expression: `^(\d+)(\.\d{1,2})? \1\2`

|
|Battery: Charge Current{#SINGLETON}|
MIB: TRISTAR

Description:Charge Current

Scaling Factor:0.002034515380859375

Units:A

Range:[0, 60]

Modbus address:0x000B
|SNMP agent|charge.current[chargeCurrent.0{#SINGLETON}]
**Preprocessing**

- 
Custom multiplier: `0.002034515381`

- 
Regular expression: `^(\d+)(\.\d{1,2})? \1\2`

|

### LLD rule Load mode discovery

|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Load mode discovery|
Discovery for device in load mode
|Dependent item|controlmode.load.discovery
**Preprocessing**

- 
JavaScript: `The text is too long. Please see the template.`

|

### Item prototypes for Load mode discovery

|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Load: State{#SINGLETON}|
MIB: TRISTAR

Description:Load State

Modbus address:0x001B

0: Start

1: Normal

2: LvdWarning

3: Lvd

4: Fault

5: Disconnect

6: LvdWarning1

7: OverrideLvd

8: Equalize
|SNMP agent|load.state[loadState.0{#SINGLETON}]
**Preprocessing**

- 
Discard unchanged with heartbeat: `1h`

|

### Trigger prototypes for Load mode discovery

|Name|Description|Expression|Severity|Dependencies and additional info|
|----|-----------|----------|--------|--------------------------------|
|Morningstar TriStar PWM: Load: Device load in warning state||`last(/Morningstar TriStar PWM by SNMP/load.state[loadState.0{#SINGLETON}])={$LOAD.STATE.WARN:"lvdWarning"}  or last(/Morningstar TriStar PWM by SNMP/load.state[loadState.0{#SINGLETON}])={$LOAD.STATE.WARN:"override"}`|Warning|**Depends on**:

- Morningstar TriStar PWM: Load: Device load in critical state
|
|Morningstar TriStar PWM: Load: Device load in critical state||`last(/Morningstar TriStar PWM by SNMP/load.state[loadState.0{#SINGLETON}])={$LOAD.STATE.CRIT:"lvd"} or last(/Morningstar TriStar PWM by SNMP/load.state[loadState.0{#SINGLETON}])={$LOAD.STATE.CRIT:"fault"}`|High||

### LLD rule Diversion mode discovery

|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Diversion mode discovery|
Discovery for device in diversion mode
|Dependent item|controlmode.diversion.discovery
**Preprocessing**

- 
JavaScript: `The text is too long. Please see the template.`

|

### Item prototypes for Diversion mode discovery

|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Load: PWM Duty Cycle{#SINGLETON}|
MIB: TRISTAR

Description:PWM Duty Cycle

Scaling Factor:0.392156862745098

Units:%

Range:[0.0, 100.0]

Modbus address:0x001C
|SNMP agent|diversion.pwm_duty_cycle[pwmDutyCycle.0{#SINGLETON}]
**Preprocessing**

- 
Custom multiplier: `0.3921568627`

- 
Regular expression: `^(\d+)(\.\d{1,2})? \1\2`

|

### LLD rule Charge + Diversion mode discovery

|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Charge + Diversion mode discovery|
Discovery for device in charge and diversion modes
|Dependent item|controlmode.charge_diversion.discovery
**Preprocessing**

- 
JavaScript: `The text is too long. Please see the template.`

|

### Item prototypes for Charge + Diversion mode discovery

|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Battery: Charge State{#SINGLETON}|
MIB: TRISTAR

Description:Control State

Modbus address:0x001B
|SNMP agent|charge.state[controlState.0{#SINGLETON}]
**Preprocessing**

- 
Discard unchanged with heartbeat: `1h`

|
|Battery: Target Voltage{#SINGLETON}|
MIB: TRISTAR

Description:Target Regulation Voltage

Scaling Factor:0.002950042724609375

Units:V

Range:[0.0, 80.0]

Modbus address:0x0010
|SNMP agent|target.voltage[targetVoltage.0{#SINGLETON}]
**Preprocessing**

- 
Custom multiplier: `0.002950042725`

- 
Regular expression: `^(\d+)(\.\d{1,2})? \1\2`

|

### Trigger prototypes for Charge + Diversion mode discovery

|Name|Description|Expression|Severity|Dependencies and additional info|
|----|-----------|----------|--------|--------------------------------|
|Morningstar TriStar PWM: Battery: Device charge in warning state||`last(/Morningstar TriStar PWM by SNMP/charge.state[controlState.0{#SINGLETON}])={$CHARGE.STATE.WARN}`|Warning|**Depends on**:

- Morningstar TriStar PWM: Battery: Device charge in critical state
|
|Morningstar TriStar PWM: Battery: Device charge in critical state||`last(/Morningstar TriStar PWM by SNMP/charge.state[controlState.0{#SINGLETON}])={$CHARGE.STATE.CRIT}`|High||

### LLD rule Load + Diversion mode discovery

|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Load + Diversion mode discovery|
Discovery for device in load and diversion modes
|Dependent item|controlmode.load_diversion.discovery
**Preprocessing**

- 
JavaScript: `The text is too long. Please see the template.`

|

### Item prototypes for Load + Diversion mode discovery

|Name|Description|Type|Key and additional info|
|----|-----------|----|-----------------------|
|Load: Current{#SINGLETON}|
MIB: TRISTAR

Description:Load Current

Scaling Factor:0.00966400146484375

Units:A

Range:[0, 60]

Modbus address:0x000C
|SNMP agent|load.current[loadCurrent.0{#SINGLETON}]
**Preprocessing**

- 
Custom multiplier: `0.009664001465`

- 
Regular expression: `^(\d+)(\.\d{1,2})? \1\2`

|
|Load: Voltage{#SINGLETON}|
MIB: TRISTAR

Description:Array/Load Voltage

Scaling Factor:0.00424652099609375

Units:V

Range:[0, 80]

Modbus address:0x000A
|SNMP agent|load.voltage[arrayloadVoltage.0{#SINGLETON}]
**Preprocessing**

- 
Custom multiplier: `0.004246520996`

- 
Regular expression: `^(\d+)(\.\d{1,2})? \1\2`

|

## Feedback

Please report any issues with the template at [`https://support.zabbix.com`](https://support.zabbix.com)

You can also provide feedback, discuss the template, or ask for help at [`ZABBIX forums`](https://www.zabbix.com/forum/zabbix-suggestions-and-feedback)

