-- SAVR-MIB -- SNMP MIB module for the SAVR Automatic Transfer Switch -- (AVR controller with battery monitoring). -- -- Enterprise tree implemented by the device firmware: -- iso.org.dod.internet.private.enterprises.savrMIB (1.3.6.1.4.1.59999) -- -- The agent also implements the standard MIB-2 system group -- (SNMPv2-MIB, 1.3.6.1.2.1.1). Those objects are NOT redefined here; -- load SNMPv2-MIB together with this module. -- -- sysObjectID value reported by the agent: -- savrSysDescr (1.3.6.1.4.1.59999.1.1) -- -- All enterprise objects are read-only scalars (instance .0). SAVR-MIB DEFINITIONS ::= BEGIN IMPORTS MODULE-IDENTITY, OBJECT-TYPE, Integer32, Gauge32, enterprises FROM SNMPv2-SMI DisplayString, TEXTUAL-CONVENTION FROM SNMPv2-TC MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF; savrMIB MODULE-IDENTITY LAST-UPDATED "202609040000Z" ORGANIZATION "SAVR" CONTACT-INFO "Product: SAVR Automatic Transfer Switch MIB-2 sysContact / sysLocation on the device carry the site responsible person, phone, city and address configured in the web interface. Private Enterprise Number 59999 is provisional until an official IANA PEN is registered: https://pen.iana.org/" DESCRIPTION "MIB module for the SAVR Automatic Transfer Switch: mains / UPS measurements, battery monitoring, battery capacity tests, switching limits and 1-Wire temperature. Revision 1 matches the enterprise OID tree implemented in the device SNMP agent (prefix 1.3.6.1.4.1.59999)." REVISION "202609040000Z" DESCRIPTION "Initial revision. Enterprise groups: system, measurements, battery, tests, configuration, temperature." ::= { enterprises 59999 } -- ============================================================ -- Textual conventions -- ============================================================ SavrPresenceState ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION "Presence of voltage at a power node. absent(0) -- no voltage present(1) -- voltage is present" SYNTAX INTEGER { absent(0), present(1) } SavrSaveSource ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION "Source currently feeding the guaranteed (protected) load output of the ATS. fromUps(0) -- load is fed from the UPS fromMains(1) -- load is fed from mains 220 V" SYNTAX INTEGER { fromUps(0), fromMains(1) } SavrEnableState ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION "Enable flag. disabled(0) enabled(1)" SYNTAX INTEGER { disabled(0), enabled(1) } SavrTestStatus ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION "Battery test status / end cause. running(0) -- test is in progress batteryLow(1) -- battery voltage below discharge threshold mainsOutOfRange(2) -- mains 220 V voltage out of range upsOutOfRange(3) -- UPS output voltage out of range stoppedByUser(4) -- test stopped by the user" SYNTAX INTEGER { running(0), batteryLow(1), mainsOutOfRange(2), upsOutOfRange(3), stoppedByUser(4) } -- ============================================================ -- OID tree -- ============================================================ savrSystem OBJECT IDENTIFIER ::= { savrMIB 1 } savrMeasurements OBJECT IDENTIFIER ::= { savrMIB 2 } savrBattery OBJECT IDENTIFIER ::= { savrMIB 3 } savrTests OBJECT IDENTIFIER ::= { savrMIB 4 } savrConfig OBJECT IDENTIFIER ::= { savrMIB 5 } savrTemperature OBJECT IDENTIFIER ::= { savrMIB 6 } savrSysVersions OBJECT IDENTIFIER ::= { savrSystem 6 } savrMeasPwrIn OBJECT IDENTIFIER ::= { savrMeasurements 1 } savrMeasUpsOut OBJECT IDENTIFIER ::= { savrMeasurements 2 } savrMeasUpsIn OBJECT IDENTIFIER ::= { savrMeasurements 3 } savrMeasSave OBJECT IDENTIFIER ::= { savrMeasurements 4 } savrBatRuntime OBJECT IDENTIFIER ::= { savrBattery 7 } savrTestCurrent OBJECT IDENTIFIER ::= { savrTests 1 } savrTestPrevious OBJECT IDENTIFIER ::= { savrTests 2 } savrCfgDelays OBJECT IDENTIFIER ::= { savrConfig 1 } savrCfgVoltLimits OBJECT IDENTIFIER ::= { savrConfig 2 } savrConformance OBJECT IDENTIFIER ::= { savrMIB 7 } savrCompliances OBJECT IDENTIFIER ::= { savrConformance 1 } savrGroups OBJECT IDENTIFIER ::= { savrConformance 2 } -- ============================================================ -- Group 1: System -- ============================================================ savrSysDescr OBJECT-TYPE SYNTAX DisplayString (SIZE (0..64)) MAX-ACCESS read-only STATUS current DESCRIPTION "Short description of the product. The agent reports: AVR controller with battery monitoring. The object identifier of this object (without instance) is also used as MIB-2 sysObjectID: 1.3.6.1.4.1.59999.1.1" ::= { savrSystem 1 } savrSysName OBJECT-TYPE SYNTAX DisplayString (SIZE (0..16)) MAX-ACCESS read-only STATUS current DESCRIPTION "Product family name. The agent reports: SAVR. The site-specific device name is MIB-2 sysName." ::= { savrSystem 2 } savrSysSerial OBJECT-TYPE SYNTAX DisplayString (SIZE (0..31)) MAX-ACCESS read-only STATUS current DESCRIPTION "Device serial number as stored in non-volatile memory." ::= { savrSystem 3 } savrSysUptime OBJECT-TYPE SYNTAX Integer32 (0..2147483647) UNITS "minutes" MAX-ACCESS read-only STATUS current DESCRIPTION "Time since the last reboot of the interface controller, in minutes. MIB-2 sysUpTime provides the same interval in TimeTicks (hundredths of a second)." ::= { savrSystem 4 } savrSysPing OBJECT-TYPE SYNTAX DisplayString (SIZE (0..8)) MAX-ACCESS read-only STATUS current DESCRIPTION "Reachability probe. The agent reports: OK while the SNMP service is running." ::= { savrSystem 5 } savrSysVerCore OBJECT-TYPE SYNTAX DisplayString (SIZE (0..16)) MAX-ACCESS read-only STATUS current DESCRIPTION "Firmware version of the WT32-ETH01 (ESP32) core controller, for example 0.1.16." ::= { savrSysVersions 1 } savrSysVerWeb OBJECT-TYPE SYNTAX DisplayString (SIZE (0..16)) MAX-ACCESS read-only STATUS current DESCRIPTION "Version of the embedded web interface stored in SPIFFS." ::= { savrSysVersions 2 } savrSysVerMeasMcu OBJECT-TYPE SYNTAX DisplayString (SIZE (0..7)) MAX-ACCESS read-only STATUS current DESCRIPTION "Firmware version of the measurement MCU (STM32), reported as a decimal string, for example 334." ::= { savrSysVersions 3 } -- ============================================================ -- Group 2: Instantaneous measurements -- ============================================================ -- 2.1 Mains 220 V input (power input of the ATS) savrMeasPwrInVolt OBJECT-TYPE SYNTAX Integer32 (0..400) UNITS "V" MAX-ACCESS read-only STATUS current DESCRIPTION "RMS voltage at the mains 220 V input of the ATS." ::= { savrMeasPwrIn 1 } savrMeasPwrInCurr OBJECT-TYPE SYNTAX Integer32 (0..50000) UNITS "mA" MAX-ACCESS read-only STATUS current DESCRIPTION "Current at the mains 220 V input of the ATS." ::= { savrMeasPwrIn 2 } savrMeasPwrInPwr OBJECT-TYPE SYNTAX Integer32 (0..20000000) UNITS "mW" MAX-ACCESS read-only STATUS current DESCRIPTION "Active power at the mains 220 V input. Computed as voltage in volts times current in milliamperes." ::= { savrMeasPwrIn 3 } savrMeasPwrInState OBJECT-TYPE SYNTAX SavrPresenceState MAX-ACCESS read-only STATUS current DESCRIPTION "Presence of voltage at the mains 220 V input." ::= { savrMeasPwrIn 4 } -- 2.2 UPS output (inverter output that can feed the load) savrMeasUpsOutVolt OBJECT-TYPE SYNTAX Integer32 (0..400) UNITS "V" MAX-ACCESS read-only STATUS current DESCRIPTION "RMS voltage at the UPS output." ::= { savrMeasUpsOut 1 } savrMeasUpsOutCurr OBJECT-TYPE SYNTAX Integer32 (0..50000) UNITS "mA" MAX-ACCESS read-only STATUS current DESCRIPTION "Current at the UPS output." ::= { savrMeasUpsOut 2 } savrMeasUpsOutPwr OBJECT-TYPE SYNTAX Integer32 (0..20000000) UNITS "mW" MAX-ACCESS read-only STATUS current DESCRIPTION "Active power at the UPS output. Computed as voltage in volts times current in milliamperes." ::= { savrMeasUpsOut 3 } savrMeasUpsOutState OBJECT-TYPE SYNTAX SavrPresenceState MAX-ACCESS read-only STATUS current DESCRIPTION "Presence of voltage at the UPS output." ::= { savrMeasUpsOut 4 } -- 2.3 UPS input (charger / non-guaranteed load side) savrMeasUpsInVolt OBJECT-TYPE SYNTAX Integer32 (0..400) UNITS "V" MAX-ACCESS read-only STATUS current DESCRIPTION "RMS voltage at the UPS input." ::= { savrMeasUpsIn 1 } savrMeasUpsInCurr OBJECT-TYPE SYNTAX Integer32 (0..50000) UNITS "mA" MAX-ACCESS read-only STATUS current DESCRIPTION "Current at the UPS input." ::= { savrMeasUpsIn 2 } savrMeasUpsInPwr OBJECT-TYPE SYNTAX Integer32 (0..20000000) UNITS "mW" MAX-ACCESS read-only STATUS current DESCRIPTION "Active power at the UPS input. Computed as voltage in volts times current in milliamperes." ::= { savrMeasUpsIn 3 } savrMeasUpsInState OBJECT-TYPE SYNTAX SavrPresenceState MAX-ACCESS read-only STATUS current DESCRIPTION "Presence of voltage at the UPS input relay node." ::= { savrMeasUpsIn 4 } -- 2.4 Guaranteed (protected) load output of the ATS savrMeasSaveVolt OBJECT-TYPE SYNTAX Integer32 (0..400) UNITS "V" MAX-ACCESS read-only STATUS current DESCRIPTION "RMS voltage at the guaranteed load output of the ATS." ::= { savrMeasSave 1 } savrMeasSaveCurr OBJECT-TYPE SYNTAX Integer32 (0..50000) UNITS "mA" MAX-ACCESS read-only STATUS current DESCRIPTION "Current at the guaranteed load output of the ATS." ::= { savrMeasSave 2 } savrMeasSavePwr OBJECT-TYPE SYNTAX Integer32 (0..20000000) UNITS "mW" MAX-ACCESS read-only STATUS current DESCRIPTION "Active power at the guaranteed load output. Computed as voltage in volts times current in milliamperes." ::= { savrMeasSave 3 } savrMeasSaveState OBJECT-TYPE SYNTAX SavrSaveSource MAX-ACCESS read-only STATUS current DESCRIPTION "Which source currently feeds the guaranteed load: UPS output or mains 220 V." ::= { savrMeasSave 4 } -- ============================================================ -- Group 3: Battery -- ============================================================ savrBatVolt OBJECT-TYPE SYNTAX Gauge32 UNITS "mV" MAX-ACCESS read-only STATUS current DESCRIPTION "Battery voltage in millivolts. Example: 12500 means 12.500 V. Divide by 1000 to obtain volts." ::= { savrBattery 1 } savrBatCurr OBJECT-TYPE SYNTAX Gauge32 UNITS "mA" MAX-ACCESS read-only STATUS current DESCRIPTION "Battery current measured through the shunt, in milliamperes. Reports 0 when the shunt is disabled." ::= { savrBattery 2 } savrBatDischargeThr OBJECT-TYPE SYNTAX Integer32 (0..100000) UNITS "mV" MAX-ACCESS read-only STATUS current DESCRIPTION "Configured battery discharge threshold in millivolts. Example: 10800 means 10.800 V. A battery test ends with batteryLow when voltage falls below this threshold." ::= { savrBattery 3 } savrBatShuntRes OBJECT-TYPE SYNTAX Integer32 (0..100000) UNITS "microohms" MAX-ACCESS read-only STATUS current DESCRIPTION "Configured shunt resistance in microohms. Example: 500 means 0.000500 ohm." ::= { savrBattery 4 } savrBatShuntEnabled OBJECT-TYPE SYNTAX SavrEnableState MAX-ACCESS read-only STATUS current DESCRIPTION "Whether shunt-based battery current measurement is enabled. When disabled, savrBatCurr and savrBatRuntimeShunt report 0." ::= { savrBattery 5 } savrBatUpsKpd OBJECT-TYPE SYNTAX Integer32 (1..100) UNITS "percent" MAX-ACCESS read-only STATUS current DESCRIPTION "Configured efficiency of the UPS power stage, in percent. Used when estimating battery runtime from UPS-output power." ::= { savrBattery 6 } savrBatRuntimeShunt OBJECT-TYPE SYNTAX Integer32 (0..2147483647) UNITS "minutes" MAX-ACCESS read-only STATUS current DESCRIPTION "Estimated remaining battery runtime based on shunt current, in minutes. 0 means the shunt is disabled or runtime cannot be estimated. 2147483647 means the estimated runtime is treated as infinite (load is negligible)." ::= { savrBatRuntime 1 } savrBatRuntimeUpsOut OBJECT-TYPE SYNTAX Integer32 (0..2147483647) UNITS "minutes" MAX-ACCESS read-only STATUS current DESCRIPTION "Estimated remaining battery runtime based on UPS-output power and UPS efficiency, in minutes. 2147483647 means the estimated runtime is treated as infinite (load is negligible)." ::= { savrBatRuntime 2 } -- ============================================================ -- Group 4: Battery tests -- ============================================================ -- 4.1 Current (latest) test savrTestCurStart OBJECT-TYPE SYNTAX DisplayString (SIZE (0..29)) MAX-ACCESS read-only STATUS current DESCRIPTION "Start time of the current (latest) battery test. Format: DD.MM.YYYY HH:MM:SS (UTC). --- if the test has not been started." ::= { savrTestCurrent 1 } savrTestCurStop OBJECT-TYPE SYNTAX DisplayString (SIZE (0..29)) MAX-ACCESS read-only STATUS current DESCRIPTION "Stop time of the current (latest) battery test. Format: DD.MM.YYYY HH:MM:SS (UTC). --- if the test is still running or was never finished." ::= { savrTestCurrent 2 } savrTestCurDuration OBJECT-TYPE SYNTAX Integer32 (0..2147483647) UNITS "minutes" MAX-ACCESS read-only STATUS current DESCRIPTION "Duration of the current (latest) battery test, in minutes." ::= { savrTestCurrent 3 } savrTestCurStatus OBJECT-TYPE SYNTAX SavrTestStatus MAX-ACCESS read-only STATUS current DESCRIPTION "Status of the current (latest) battery test, including the cause of completion." ::= { savrTestCurrent 4 } savrTestCurCapShunt OBJECT-TYPE SYNTAX Integer32 (0..2147483647) UNITS "mAh" MAX-ACCESS read-only STATUS current DESCRIPTION "Electric charge taken from the battery during the current (latest) test, measured via the shunt, in milliampere-hours." ::= { savrTestCurrent 5 } savrTestCurCapUpsOut OBJECT-TYPE SYNTAX Integer32 (0..2147483647) UNITS "mAh" MAX-ACCESS read-only STATUS current DESCRIPTION "Electric charge taken from the battery during the current (latest) test, estimated from UPS-output energy and UPS efficiency, in milliampere-hours." ::= { savrTestCurrent 6 } savrTestCurThreshold OBJECT-TYPE SYNTAX Integer32 (0..100000) UNITS "mV" MAX-ACCESS read-only STATUS current DESCRIPTION "Battery discharge threshold that was in effect for the current (latest) test, in millivolts." ::= { savrTestCurrent 7 } -- 4.2 Previous test savrTestPrevStart OBJECT-TYPE SYNTAX DisplayString (SIZE (0..29)) MAX-ACCESS read-only STATUS current DESCRIPTION "Start time of the previous battery test. Format: DD.MM.YYYY HH:MM:SS (UTC). --- if no previous test is stored." ::= { savrTestPrevious 1 } savrTestPrevStop OBJECT-TYPE SYNTAX DisplayString (SIZE (0..29)) MAX-ACCESS read-only STATUS current DESCRIPTION "Stop time of the previous battery test. Format: DD.MM.YYYY HH:MM:SS (UTC). --- if no previous test is stored." ::= { savrTestPrevious 2 } savrTestPrevDuration OBJECT-TYPE SYNTAX Integer32 (0..2147483647) UNITS "minutes" MAX-ACCESS read-only STATUS current DESCRIPTION "Duration of the previous battery test, in minutes." ::= { savrTestPrevious 3 } savrTestPrevStatus OBJECT-TYPE SYNTAX SavrTestStatus MAX-ACCESS read-only STATUS current DESCRIPTION "Status of the previous battery test, including the cause of completion." ::= { savrTestPrevious 4 } savrTestPrevCapShunt OBJECT-TYPE SYNTAX Integer32 (0..2147483647) UNITS "mAh" MAX-ACCESS read-only STATUS current DESCRIPTION "Electric charge taken from the battery during the previous test, measured via the shunt, in milliampere-hours." ::= { savrTestPrevious 5 } savrTestPrevCapUpsOut OBJECT-TYPE SYNTAX Integer32 (0..2147483647) UNITS "mAh" MAX-ACCESS read-only STATUS current DESCRIPTION "Electric charge taken from the battery during the previous test, estimated from UPS-output energy and UPS efficiency, in milliampere-hours." ::= { savrTestPrevious 6 } savrTestPrevThreshold OBJECT-TYPE SYNTAX Integer32 (0..100000) UNITS "mV" MAX-ACCESS read-only STATUS current DESCRIPTION "Battery discharge threshold that was in effect for the previous test, in millivolts." ::= { savrTestPrevious 7 } -- ============================================================ -- Group 5: Configuration -- ============================================================ savrCfgDelayPwr OBJECT-TYPE SYNTAX Integer32 (0..1000000) UNITS "milliseconds" MAX-ACCESS read-only STATUS current DESCRIPTION "Delay before restoring the load to mains 220 V after mains voltage has returned into the valid range." ::= { savrCfgDelays 1 } savrCfgDelayUps OBJECT-TYPE SYNTAX Integer32 (0..1000000) UNITS "milliseconds" MAX-ACCESS read-only STATUS current DESCRIPTION "Delay before treating UPS output voltage as invalid (out of range)." ::= { savrCfgDelays 2 } savrCfgVoltMax OBJECT-TYPE SYNTAX Integer32 (0..400) UNITS "V" MAX-ACCESS read-only STATUS current DESCRIPTION "Upper mains / UPS voltage limit used by the ATS when deciding that a source is out of range." ::= { savrCfgVoltLimits 1 } savrCfgVoltMin OBJECT-TYPE SYNTAX Integer32 (0..400) UNITS "V" MAX-ACCESS read-only STATUS current DESCRIPTION "Lower mains / UPS voltage limit used by the ATS when deciding that a source is out of range." ::= { savrCfgVoltLimits 2 } savrCfgVoltHysto OBJECT-TYPE SYNTAX Integer32 (0..100) UNITS "V" MAX-ACCESS read-only STATUS current DESCRIPTION "Hysteresis applied to savrCfgVoltMax and savrCfgVoltMin to avoid chatter around the switching thresholds." ::= { savrCfgVoltLimits 3 } -- ============================================================ -- Group 6: Temperature (1-Wire) -- ============================================================ savrTempSensorsCount OBJECT-TYPE SYNTAX Integer32 (0..255) UNITS "sensors" MAX-ACCESS read-only STATUS current DESCRIPTION "Number of 1-Wire temperature sensors currently detected." ::= { savrTemperature 1 } savrTempDs18b20 OBJECT-TYPE SYNTAX Integer32 (-10000..20000) UNITS "0.01 degrees Celsius" MAX-ACCESS read-only STATUS current DESCRIPTION "Temperature reported by the DS18B20 sensor, in hundredths of a degree Celsius. The value may be negative. Example: 2550 means 25.50 degrees Celsius. Divide by 100 to obtain degrees Celsius." ::= { savrTemperature 2 } -- ============================================================ -- Conformance -- ============================================================ savrSystemGroup OBJECT-GROUP OBJECTS { savrSysDescr, savrSysName, savrSysSerial, savrSysUptime, savrSysPing, savrSysVerCore, savrSysVerWeb, savrSysVerMeasMcu } STATUS current DESCRIPTION "System identification, uptime and firmware versions." ::= { savrGroups 1 } savrMeasurementsGroup OBJECT-GROUP OBJECTS { savrMeasPwrInVolt, savrMeasPwrInCurr, savrMeasPwrInPwr, savrMeasPwrInState, savrMeasUpsOutVolt, savrMeasUpsOutCurr, savrMeasUpsOutPwr, savrMeasUpsOutState, savrMeasUpsInVolt, savrMeasUpsInCurr, savrMeasUpsInPwr, savrMeasUpsInState, savrMeasSaveVolt, savrMeasSaveCurr, savrMeasSavePwr, savrMeasSaveState } STATUS current DESCRIPTION "Instantaneous voltage, current, power and state at the four power nodes of the ATS." ::= { savrGroups 2 } savrBatteryGroup OBJECT-GROUP OBJECTS { savrBatVolt, savrBatCurr, savrBatDischargeThr, savrBatShuntRes, savrBatShuntEnabled, savrBatUpsKpd, savrBatRuntimeShunt, savrBatRuntimeUpsOut } STATUS current DESCRIPTION "Battery measurements, shunt configuration and estimated remaining runtime." ::= { savrGroups 3 } savrTestsGroup OBJECT-GROUP OBJECTS { savrTestCurStart, savrTestCurStop, savrTestCurDuration, savrTestCurStatus, savrTestCurCapShunt, savrTestCurCapUpsOut, savrTestCurThreshold, savrTestPrevStart, savrTestPrevStop, savrTestPrevDuration, savrTestPrevStatus, savrTestPrevCapShunt, savrTestPrevCapUpsOut, savrTestPrevThreshold } STATUS current DESCRIPTION "Results of the current and previous battery tests." ::= { savrGroups 4 } savrConfigGroup OBJECT-GROUP OBJECTS { savrCfgDelayPwr, savrCfgDelayUps, savrCfgVoltMax, savrCfgVoltMin, savrCfgVoltHysto } STATUS current DESCRIPTION "ATS switching delays and voltage limits." ::= { savrGroups 5 } savrTemperatureGroup OBJECT-GROUP OBJECTS { savrTempSensorsCount, savrTempDs18b20 } STATUS current DESCRIPTION "1-Wire temperature sensors." ::= { savrGroups 6 } savrMIBCompliance MODULE-COMPLIANCE STATUS current DESCRIPTION "Compliance statement for a SAVR ATS SNMP agent. Implementations of this module must also provide the SNMPv2-MIB system group." MODULE -- this module MANDATORY-GROUPS { savrSystemGroup, savrMeasurementsGroup, savrBatteryGroup, savrTestsGroup, savrConfigGroup, savrTemperatureGroup } ::= { savrCompliances 1 } END