Skip to content

Commit

Permalink
Merge pull request #2803 from mbouyer/master
Browse files Browse the repository at this point in the history
netvision-mib: sync netvision_output_info with SOCOMECUPS-MIB.txt
  • Loading branch information
jimklimov authored Feb 14, 2025
2 parents caf8d1e + 91ce71a commit e718a1e
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
2 changes: 2 additions & 0 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ https://github.com/networkupstools/nut/milestone/11
serving same basic data points as were available in `baytech-mib.c`,
but checking for a different model OID subtree and different OIDs for
the device model information. [#2779]
* fixed `netvision-mib`: sync `netvision_output_info` with currently
available `SOCOMECUPS-MIB.txt`. [#2803]
- Introduced a new driver concept for interaction with OS-reported hardware
monitoring readings. Currently instantiated as `hwmon_ina219` specifically
Expand Down
5 changes: 5 additions & 0 deletions UPGRADING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ Changes from 2.8.2 to 2.8.3
and `ondelay` to 120 seconds, in accordance with man page suggestions;
users with custom settings not divisible by 60 will be loudly warned. [#1394]
- `snmp-ups` subdriver `netvision-mib`: synchronized `netvision_output_info`
with the currently available `SOCOMECUPS-MIB.txt`; this can impact some
other devices using that MIB (negatively, if the older mappings were
indeed correct for any practical cases, and were not a typo). [#2803]
- Added support for `lbrb_log_delay_sec=N` setting to delay propagation of
`LB` or `LB+RB` state (buggy with APC BXnnnnMI devices/firmwares issued
circa 2023-2024 which flood the logs with spurious LOWBATT and REPLACEBATT
Expand Down
3 changes: 2 additions & 1 deletion docs/nut.dict
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
personal_ws-1.1 en 3287 utf-8
personal_ws-1.1 en 3288 utf-8
AAC
AAS
ABI
Expand Down Expand Up @@ -1103,6 +1103,7 @@ SNR
SOCK
SOCKADDR
SOCKLEN
SOCOMECUPS
SOFF
SOLA
SOMECO
Expand Down
24 changes: 23 additions & 1 deletion drivers/netvision-mib.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include "netvision-mib.h"

#define NETVISION_MIB_VERSION "0.44"
#define NETVISION_MIB_VERSION "0.45"

#define NETVISION_SYSOID ".1.3.6.1.4.1.4555.1.1.1"

Expand Down Expand Up @@ -100,7 +100,18 @@ static info_lkp_t netvision_onbatt_info[] = {
#define NETVISION_OID_CONTROL_STATUS ".1.3.6.1.4.1.4555.1.1.1.1.8.1"
#define NETVISION_OID_CONTROL_SHUTDOWN_DELAY ".1.3.6.1.4.1.4555.1.1.1.1.8.2"

/*
* some of the output sources below are set to empty string; because we
* don't know from here if we are online or on batteries.
* In this case upsAlarmOnBattery will set the appropriate status.
*/
static info_lkp_t netvision_output_info[] = {
#if 0
/* For reference: from the times before Git until SVN, this mapping
* was defined as stashed away in this block of code. It was wrong
* at least for MASTERYS 3/3 SYSTEM 60 kVA UPS devices described in
* pull request https://github.com/networkupstools/nut/pull/2803
*/
info_lkp_default(1, ""), /* output source other */
info_lkp_default(2, ""), /* output source none */
info_lkp_default(3, "OL"), /* output source normal */
Expand All @@ -110,6 +121,17 @@ static info_lkp_t netvision_output_info[] = {
info_lkp_default(7, "OL TRIM"), /* output source reducer */
info_lkp_default(8, "OL"), /* output source standby */
info_lkp_default(9, ""), /* output source ecomode */
#else
info_lkp_default(1, ""), /* output source unknown */
info_lkp_default(2, ""), /* output source inverter */
info_lkp_default(3, "OL"), /* output source mains */
info_lkp_default(4, ""), /* output source ecomode */
info_lkp_default(5, "OL BYPASS"), /* output source bypass */
info_lkp_default(6, "OFF"), /* output source standby */
info_lkp_default(7, "OL BYPASS"), /* output source maintenance bypass */
info_lkp_default(8, "OFF"), /* output source off */
info_lkp_default(9, ""), /* output source normal */
#endif
info_lkp_sentinel
};

Expand Down

0 comments on commit e718a1e

Please sign in to comment.