Possible bug: repeater uses bus_voltage_v and battery_voltage_v in different areas to denote battery status. #176

Open
opened 2026-10-27 09:36:13 +01:00 by adam · 0 comments
Owner

While reviewing openHop repeater code in the ⁠I have Openhop Repeater running… discussion, I see that repeater status frame is looking for the first available bus_voltage_v value to return as the "battery" voltage. But the companion telemetry looks for battery_voltage_v or battery_voltage_mv. And a GitHub search didn't show anywhere that the repeater is synthesizing one of these values from the other based on presence. The openhop modem sensor also seems to be using battery and not bus.

Is this a legacy/whatever mismatch? Should this be standardized? I get that sensors like an INA219 are returning a bus voltage -- they don't know if its coming from a battery or a power supply. But the code that looks for and returns the "battery" should probably accept either of these, no?

I've confirmed this with my G3+RPi4 build. When I do a remote telemetry pull, I get the bus voltage from the G3's INA219. But when I connect to the virtual companion and view its telemetry, I get the battery voltage from the Victron VE.Direct sensor.

The repeater and companion logic should 1) be centralized, and 2) probably scan for "battery" variants first, and if they are not present, do a scan for the "bus" variant.

While reviewing openHop repeater code in the ⁠[I have Openhop Repeater running…](https://discord.com/channels/1489331292309946508/1561427601816297473) discussion, I see that repeater status frame is looking for the first available bus_voltage_v value to return as the "battery" voltage. But the companion telemetry looks for battery_voltage_v or battery_voltage_mv. And a GitHub search didn't show anywhere that the repeater is synthesizing one of these values from the other based on presence. The openhop modem sensor also seems to be using battery and not bus. Is this a legacy/whatever mismatch? Should this be standardized? I get that sensors like an INA219 are returning a bus voltage -- they don't know if its coming from a battery or a power supply. But the code that looks for and returns the "battery" should probably accept either of these, no? I've confirmed this with my G3+RPi4 build. When I do a remote telemetry pull, I get the bus voltage from the G3's INA219. But when I connect to the virtual companion and view its telemetry, I get the battery voltage from the Victron VE.Direct sensor. The repeater and companion logic should 1) be centralized, and 2) probably scan for "battery" variants first, and if they are not present, do a scan for the "bus" variant. <!-- github-sync-id:6029620415 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/pyMC_Repeater#176