Switchport value via direct access - Rx Power: 0.77dBm, Working range: [-14.400, 0.499]dBm
Tx Power: -3.73dBm, Working range: [-8.198, 0.499]dBm
Libre is reporting the value as totally different, I have this problem on multiple Huawei ATN 910C-B units, meanwhile any light level values with negative numbers are displayed correctly.
Basically, Huawei is sometimes providing dbm, sometimes mW, for the same OID. So I had to declare it twice in the YAML, with some key to choose between the 2 and skip the wrong one.
It seems that the key set I used back then is not applicable to this device.
It is a combination of the existance of OIDs (whatever the value is), the fact that the hwEntityOpticalRxPower is positive or negative.
So basically, you need to play (and probably add a new condition) to avoid the double detection. And most importantly, avoid breaking other devices (that’s the tricky part really )
There never been and old YAML that used to work. Previous was even more incomplete. The game here is that Huawei is wrong in their replies, and it is difficult to change it now because this mistake is all around.
So you have to play with snmpwalk and try to find better keys to choose between one model and the other. Basically, you need to eliminate the wrong value by adding a new skip condition.
And then the regression tests will check that you are not breaking any device from the huawei family.