cyrils / renogy-bt

Python library to read Renogy compatible BT-1 or BT-2 bluetooth modules
GNU General Public License v3.0
94 stars 39 forks source link

Load and power date from Rover controller is all zeros #30

Closed calebu2 closed 1 year ago

calebu2 commented 1 year ago

Successfully got this working on a pi zero with a smart battery (RBT100LFP12SH) and rover 40 mppt connected via separate bt1 and bt2 modules.

Battery stats are fine and some of the rover stats are good too, but many of the controller stats are zero:

I will see if I can debug the bytestream and report back, but for now here is the parsed payload:

DEBUG:root:BT-TH-Exxxxxxx => {'function': 'READ', 'model': 'RNG-CTRL-RVR', 'battery_percentage': 99, 'battery_voltage': 13.100000000000001, 'battery_current': 0.0, 'battery_temperature': 19, 'controller_temperature': 21, 'load_status': 'on', 'load_voltage': 13.100000000000001, 'load_current': 0.0, 'load_power': 0, 'pv_voltage': 14.0, 'pv_current': 0.0, 'pv_power': 0, 'max_charging_power_today': 6, 'max_discharging_power_today': 26, 'charging_amp_hours_today': 0, 'discharging_amp_hours_today': 1, 'power_generation_today': 0, 'power_consumption_today': 13, 'power_generation_total': 160652, 'charging_status': 'mppt', 'battery_type': 'lithium', 'device': 'BT-TH-Exxxxxxx', 'client': 'RoverClient'} INFO:root:mqtt logging INFO:root:Exit: Disconnecting device: BT-TH-Exxxxxxx [c4:xx:xx:xx:xx:xx]

cyrils commented 1 year ago

To debug change BaseClient#61

logging.info(f"on_data_received: response for read operation {response.hex()}")
calebu2 commented 1 year ago

Here's the bytes for the controller data (2nd of the three strings returned): ff0344005b0082000013120082000000000004000000000001008100850039000000060000000000000000000002d88705012c00002fdf00001f680002738c00019342800000001ea8

Not sure what to make of it.

cyrils commented 1 year ago

Those values are in fact zero. This is the value Rover returned.

{'function': 'READ', 'battery_percentage': 91, 'battery_voltage': 13.0, 'battery_current': 0.0, 'battery_temperature': 18, 'controller_temperature': 19, 'load_status': 'on', 'load_voltage': 13.0, 'load_current': 0.0, 'load_power': 0, 'pv_voltage': 0.4, 'pv_current': 0.0, 'pv_power': 0, 'max_charging_power_today': 6, 'max_discharging_power_today': 0, 'charging_amp_hours_today': 0, 'discharging_amp_hours_today': 0, 'power_generation_today': 0, 'power_consumption_today': 0, 'power_generation_total': 160652, 'charging_status': 'deactivated'}
calebu2 commented 1 year ago

Strange. I just checked the renogy app and indeed it too is reporting a zero current zero power load - even when I have a fan running. So issue is on my side , not the code (and not sure why because it was showing real numbers in app before). You can close this issue out.

For what it's worth the following data is also presented (confirmed with numbers in the app): Offset Length ScaleFactor Description 25 2 0.1 Min Battery Volt 27 2 0.1 Max Battery Volt 45 2 1 Running Days Total 47 2 1 Battery Over Disc Times 49 2 1 Battery Full Charge Times 51 4 1 Battery Char Ah Total 55 4 1 Battery Disc Ah Total 63 4 1 Consumption Amount (Total)

calebu2 commented 1 year ago

Thanks for creating this package. Apologies for the confusion.

Realizing that people in a similar circumstance may find this closed issue I will share my diagnostic process as my penance:

1) double check with the renogy app (either renogy bt or dc home app) that you are not also getting zeros in the app. 2) if zeros in app, double check the live current/power display on the controller. 3) reboot the controller (I did not have the manual so I disconnected it from battery and solar)

Doing these steps should restore the data. If that still doesnt work, controller may be defective.