MegaTec NetAgent II AdPos PSU internal battery voltage wrong

I try to integrate 52 AdPos PSUs. All of them show the health sensor value for internal battery voltage as beeing off by the factor of 10 (beeing 2.2 V instead of 22V - see screenshot).

While checking
I saw, the two OIDs for battery voltage (. for single phase units, . for three phase units ) already deliver the right value, but the outcome is unnecessarily put through the same divider as the voltage OIDs for input and output (where the division is actually necessary!).

Is this a bug or on purpose?

The RFC1628 says for the three phase unit OID ( . ) that “upsBatteryVoltage” is a “NonNegativeInteger” with “0.1 Volt DC” units. I guess, the device is missbehaving and delivering 1 Volt DC units - at least for the small PSUs that we are using. There ARE cases, where the internal voltage is actually around 300 volts, but we don’t manage PSUs that big, so I can’t test the OID output on these big fellas.

If I have to, I will, but I don’t want to locally hack the discovery script What would be the way to best differentiate between the two cases and get the right values?

Here#s the obligatory validate.php output. The fails/errors don’t have anything to do with the problem.

# ./validate.php 
Component | Version
--------- | -------
LibreNMS  | 1.55
DB Schema | 2019_07_09_150217_update_users_widgets_settings (140)
PHP       | 7.2.5
MySQL     | 10.2.25-MariaDB
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3

[OK]    Composer Version: 1.9.0
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct
[FAIL]  The poller (<our-machine-name>) has not completed within the last 5 minutes, check the cron job.
[WARN]  Some devices have not been polled in the last 5 minutes. You may have performance issues.
	Check your poll log and see:
	 <... list-of-device-names ...>
[FAIL]  fping6 location is incorrect or bin not installed.
	Install fping6 or manually set the path to fping6 by placing the following in config.php: $config['fping6'] = '/path/to/fping6';
[WARN]  Your local git contains modified files, this could prevent automatic updates.
	You can fix this with ./scripts/github-remove
	Modified Files:
[FAIL]  Some folders have incorrect file permissions, this may cause issues.
	sudo chown -R librenms:librenms /opt/librenms
	sudo setfacl -d -m g::rwx /opt/librenms/rrd /var/log/librenms /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
	sudo chmod -R ug=rwX /opt/librenms/rrd /var/log/librenms /opt/librenms/bootstrap/cache/ /opt/librenms/storage/

Workaround in the SQL of the alert rule for now:

SELECT * FROM devices,sensors WHERE (devices.device_id = ? AND devices.device_id = sensors.device_id) AND sensors.sensor_current < sensors.sensor_limit_low AND sensors.sensor_alert = 1 AND (devices.status = 1 && (devices.disabled = 0 && devices.ignore = 0)) = 1 AND (sensors.sensor_type != "netagent2" AND sensors.sensor_class != "voltage" AND sensors.sensor_descr != "Battery")

aka. “Not caring about that specific sensor, when it is a netagent2-device.”