The Renogy SDK is a suite of tools that enables external communication capabilities with Renogy products. Developers can integrate our authorized SDK to implement communication features with Renogy energy products in their software projects. As Renogy’s product line continues to expand, the SDK’s supported energy product types are also growing.
Currently, it supports multiple product categories including Controllers, Inverters, DCDC and more, with additional energy products being added continuously.
The new SDK version achieves uniformity across different programming languages, featuring consistent:
• SDK usage methods
• API calling conventions
• Error codes
• Response packet formats
Product Type | Sample Products | SDK Version | Release Date |
---|---|---|---|
Charge Controller | RVR Series RVRE Series REGO Series VOYAGER Series WANDERER Series ADVENTURER Series |
1.0.0 | 2022-09-01 |
Battery Charger | DC-DC Series AC-DC Series | 1.0.0 | 2022-09-01 |
Inverter | 12V Pure Sine Wave Series 24V Pure Sine Wave Series 48V Pure Sine Wave Series REGO Series Renogy X Series |
1.0.0 | 2024-12-31(planned) |
Battery | Lithium Series AGM Series High Capacity Series |
1.0.0 | 2025-03-31(planned) |
Power Management | Renogy ONE Series Power Station Series Smart Bundle Series |
1.0.0 | 2025-12-31(planning) |
The SDK supports all Renogy energy products. This list may lag behind the actual code implementation. Please consult specific energy products if you have any questions.
Language: Kotlin/Java
Suggestion Android SDK:24 and above
Device Suppourt: Devices that support Android and support Bluetooth Low Energy
Renogy bluetooth module communication,Currently only some data of the controller is supported,other products are under development.Please refer to the Support Product List for more information.
Before using our SDK, you need to understand the module bus protocol, Bluetooth interaction, and some basic Android development capabilities
You need to finish installing your Android Studio and make sure it works!(Install the git plugin) If you don’t know how to install Android Studio, you need to go to Google Developer Center to learn how to install and use Android Studio Study Android Studio
How to use the app
How to add this item using
dependencies {
implementation 'com.renogy.rdpsdk:android:1.0.0'
}
maven { url = uri("https://raw.githubusercontent.com/121104115wyb/repository/master") }
/**
* "DeviceType.CTRL" the device type
* "CtrlConsts.TOTAL_POWER_GENERATION" the parameter name of the device
* "cmdEntity" Contents of the Directive
*/
val cmdEntity = ProtocolsConsts.getReadCmd(DeviceType.CTRL, CtrlConsts.TOTAL_POWER_GENERATION)
/**
* @param bleMac MAC address of Bluetooth
* @param hexStr Command
* @param tag The unique identifier of the command
*/
BtUtil.instance.send(bleMac, hexStr, tag)
//send command
BtUtil.instance.send(bleMac, cmdEntity.cmd, cmdEntity.cmdTag)
/**
* @param mac Bluetooth MAC address
* @param hexResp Response value
* @param cmdTag The unique identifier of the command
*/
@SuppressLint("SetTextI18n")
override fun onCharChanged(mac: String, hexResp: String, cmdTag: String) {
super.onCharChanged(mac, hexResp, cmdTag)
//To verify the response value, here is a simple verification of the data bits, strictly speaking, the data bits and CRC need to be checked
// ModBusUtils.checkCrc() This method can be used to verify the CRC
val rspCheck = ModBusUtils.simpleCheck(hexResp)
if (!rspCheck) return
//To parse the response value, it needs to be passed in"cmdTag"和"hexResp"
val baseParseEntity = ProtocolsConsts.parseResp(cmdTag, hexResp)
when (cmdTag) {
//The total power generation of the controller
CtrlConsts.TOTAL_POWER_GENERATION -> {
//To display the parsed data, the organization needs to add it by itself
vb.content.text = baseParseEntity.result() + UnitConsts.KWH
}
}
}
//To parse the response value, it needs to be passed in"cmdTag"和"hexResp"
val baseParseEntity = ProtocolsConsts.parseResp(cmdTag, hexResp)
• example:where baseParseEntity.result() can get a specific response value
• UnitConsts Commonly used units are listed, and of course you can define them yourself
Language: Swift
OS Requirements iOS Deployment Target: iOS 11.0
Device Support: iPad,iPhone
• Drag and drop the RNGBLE.framework file into your project
• Make sure RNGBLE.framework is listed under TARGETS -> General -> Frameworks, Libraries and Embedded Content. If not, click the + button to add RNGBLE.framework from the file
Import header file
import RNGBLE
bleManager
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
bleManager.delegate = self
}
}
scanPeripherals
array to receive Bluetooth, and implement the scanDevice()
method in viewDidAppear
class ViewController: UIViewController {
private let bleManager = RNGBLEManager()
private var scanPeripherals = [RNGPeripheral]()
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
scanDevice()
}
private func scanDevice() {
scanPeripherals.removeAll()
bleManager.scanDevice()
}
}
RNGBLEManagerDelegate
methodsextension ViewController: RNGBLEManagerDelegate {
func centralManagerDidUpdateState(_ central: RNGCentralManager) {
switch central.state {
case .poweredOff:
scanPeripherals.removeAll()
break
default: break
}
} func centralManager(_ central: RNGCentralManager, didDiscover peripheral: RNGPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) {
if !scanPeripherals.contains(where: { $0.identifier.uuidString == peripheral.identifier.uuidString }) {
scanPeripherals.append(peripheral)
}
}
bleManager.centralManager.stopScan()
class ViewController: UIViewController {
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
bleManager.centralManager.stopScan()
}
}
Copyright 2022 The RenogyRdpSdk authors
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Renogy API platform aims to provide all Renogy cloud service products. During the current beta phase, it primarily offers online API services paired with Renogy One products: