This release is a pre-release and may not be stable for production use.
Renogy BLE
A Python library for communicating with Renogy Bluetooth Low Energy (BLE) devices and parsing their Modbus responses.
Overview
Library for communicating with Renogy devices over BLE using BT-1 and BT-2 Bluetooth modules for controller-style devices, plus direct BLE communication for supported Renogy batteries, inverters, and Smart Shunt 300 devices.
Currently supported devices:
- Renogy charge controllers (such as Rover, Wanderer, Adventurer)
- Renogy DC-DC chargers that use the controller-style Modbus protocol
- Renogy batteries using legacy, Battery Pro, or RNGPRO protocols
- Renogy inverters
- Renogy Smart Shunt 300
Supported battery advertisements include:
- Legacy
BT-TH-*names containingBATTorBATTERY - Battery Pro names beginning with
RNGRBPorRNGC - RNGPRO-family names beginning with
RNGPRO - Battery Pro advertisements containing manufacturer ID
0xE14C
Installation
pip install renogy-ble
Usage
There are two common ways to use this library:
- Parse raw Modbus response bytes (if you already handle BLE I/O elsewhere).
- Use the built-in BLE client to connect, read, and parse data end-to-end.
Parse Raw Modbus Responses
Use this when you already have the raw Modbus response bytes and the register address you requested.
from renogy_ble import RenogyParser
# Raw BLE data received from your Renogy device
raw_data = b"\xff\x03\x02\x00\x04\x90S" # Example data
# Parse the data for a specific model and register
parsed_data = RenogyParser.parse(raw_data, device_type="controller", register=57348)
# Use the parsed data
print(parsed_data)
# Example output: {'battery_type': 'lithium'}
Notes:
raw_datamust include the full Modbus response, including address, function code, byte count, and CRC.- Parsed values may be scaled or mapped based on the register map (for example, voltages are scaled to volts).
Connect Over BLE and Read Data
The RenogyBleClient handles Modbus framing, BLE notification reads, and parsing.
This example discovers a BLE device, connects, reads the default command set, and
prints the parsed data.
import asyncio
from bleak import BleakScanner
from renogy_ble import RenogyBLEDevice, RenogyBleClient
async def main() -> None:
devices = await BleakScanner.discover()
ble_device = next(device for device in devices if "Renogy" in (device.name or ""))
renogy_device = RenogyBLEDevice(ble_device, device_type="controller")
client = RenogyBleClient()
result = await client.read_device(renogy_device)
if result.success:
print(result.parsed_data)
else:
print(f"Read failed: {result.error}")
if __name__ == "__main__":
asyncio.run(main())
Inverter Reads
Inverters use a dedicated BLE read flow. device_type="inverter" triggers the
inverter-specific transport and parser path automatically.
import asyncio
from bleak import BleakScanner
from renogy_ble import RenogyBLEDevice, RenogyBleClient
async def main() -> None:
devices = await BleakScanner.discover()
ble_device = next(
device for device in devices if (device.name or "").startswith("RNGRIU")
)
renogy_device = RenogyBLEDevice(ble_device, device_type="inverter")
result = await RenogyBleClient().read_device(renogy_device)
print(result.parsed_data)
if __name__ == "__main__":
asyncio.run(main())
The RIV4835CSH1S uses a different register layout and does not answer the standard model probe. Select its profile explicitly when constructing the device:
from renogy_ble import RIV4835CSH1S_MODEL, RenogyBLEDevice
renogy_device = RenogyBLEDevice(
ble_device,
device_type="inverter",
model_hint=RIV4835CSH1S_MODEL,
)
Battery Reads
Supported Renogy batteries use a dedicated command set and parser. Set
device_type="battery"; the client detects the legacy, Battery Pro, or RNGPRO
protocol variant from the BLE advertisement.
See the battery usage guide for discovery and read examples.
Smart Shunt 300 Reads
Smart Shunt 300 devices do not use the same Modbus command flow as Renogy
controllers. device_type="shunt300" is handled by a dedicated
notification-based client.
For one-off reads, RenogyBleClient.read_device() will automatically delegate to
the shunt client:
import asyncio
from bleak import BleakScanner
from renogy_ble import RenogyBLEDevice, RenogyBleClient
async def main() -> None:
devices = await BleakScanner.discover()
ble_device = next(
device for device in devices if (device.name or "").startswith("RTMShunt300")
)
renogy_device = RenogyBLEDevice(ble_device, device_type="shunt300")
result = await RenogyBleClient().read_device(renogy_device)
print(result.parsed_data)
if __name__ == "__main__":
asyncio.run(main())
If you want the derived shunt energy totals to accumulate across repeated reads,
reuse a single ShuntBleClient instance:
from renogy_ble import RenogyBLEDevice, ShuntBleClient
client = ShuntBleClient()
device = RenogyBLEDevice(ble_device, device_type="shunt300")
result = await client.read_device(device)
Device Settings
The semantic settings API accepts battery types, native currents and voltages, and boolean load states. The library owns profile support, encoding, addressing, and acknowledgement validation. See the device settings guide for the public contract, supported controls, and pending-release status.
Custom Commands or Device IDs
You can supply your own Modbus command set or device ID if needed.
from renogy_ble import COMMANDS, RenogyBleClient
custom_commands = {
"controller": {
**COMMANDS["controller"],
"battery": (3, 57348, 1),
}
}
client = RenogyBleClient(device_id=0xFF, commands=custom_commands)
Features
- Connects to Renogy BLE devices and reads Modbus registers
- Connects to supported Renogy batteries and detects their protocol variant
- Connects to Renogy inverter devices and reads inverter-specific Modbus registers
- Connects to Renogy Smart Shunt 300 devices and parses BLE notifications
- Builds Modbus read requests with CRC framing
- Parses raw BLE Modbus responses from Renogy devices
- Extracts information about battery, solar input, load output, inverter status, controller status, and energy statistics
- Returns data in a flat dictionary structure
- Applies scaling and mapping based on the register definitions
Data Handling
Input Format
The library accepts raw BLE Modbus response bytes and requires you to specify:
- The device type (e.g.,
device_type="controller") - The register number being parsed (e.g.,
register=256)
Output Format
Returns a flat dictionary of parsed values:
{
"battery_voltage": 12.9,
"pv_power": 250,
"charging_status": "mppt", # Mapped from numeric values where applicable
}
Extending for Other Models
The library is designed to be easily extensible for other Renogy device types. To add support for a new type:
- Update the
REGISTER_MAPinregister_map.pywith the new device type's register mapping - Create a new type-specific parser class in
parser.py(if needed) - Update the
RenogyParser.parse()method to route to your new parser
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
References
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Metadata
Release files for renogy-ble 2.10.0b238
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| renogy_ble-2.10.0b238.tar.gz | 104.4 kB | Without provenance | Details for renogy_ble-2.10.0b238.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| renogy_ble-2.10.0b238-py3-none-any.whl | Python 3 | none | any | Details for renogy_ble-2.10.0b238-py3-none-any.whl |
Total release size: 149.8 kB
Release files / renogy_ble-2.10.0b238.tar.gz
| Download URL | renogy_ble-2.10.0b238.tar.gz |
|---|---|
| Size | 104.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95bbf65c6d2e8df7dc2fc342158b6d750d7423d25c0afd221834036bdacf536e
|
|
BLAKE2b-256 checksum How to use checksums |
c2f1e7448daf84279a02aadc96fed023b88189eb957f00e31e6d24e69a9cb213
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / renogy_ble-2.10.0b238-py3-none-any.whl
| Download URL | renogy_ble-2.10.0b238-py3-none-any.whl |
|---|---|
| Size | 45.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a6666b598e7206ab1d561fa22626185887da6d3f3ca279e03dcbcddda2a8625
|
|
BLAKE2b-256 checksum How to use checksums |
7d77355919ffa9ad9c66845cd9654663d977d51519d96ab38ca3a53067b6f2d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for renogy-ble 2.10.0b238
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.