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 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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.