Renogy Devices and Raspberry Pi - bluetooth/WiFi

SolarShed

Solar Enthusiast
Joined
Jul 20, 2021
Messages
120
Hi,

I'm looking for the ability of my Renogy Bluetooth devices (via BT-1 and BT-2 modules) to connect to a raspberry pi and log the data, and thus have a wifi connection to view my devices when I'm not in Bluetooth range

I found this, which is great, seems to only support the Rover (not batteries or inverters) which is still awesome, but it also requires a wired connection to the Rover so you'll have to use up the port:


Anybody know if something like this exists, bit can take the data off of the existing BT-1/2 module for Renogy smart devices?
 

scottnichol

New Member
Joined
Nov 4, 2021
Messages
17
Hi,

I'm looking for the ability of my Renogy Bluetooth devices (via BT-1 and BT-2 modules) to connect to a raspberry pi and log the data, and thus have a wifi connection to view my devices when I'm not in Bluetooth range

I found this, which is great, seems to only support the Rover (not batteries or inverters) which is still awesome, but it also requires a wired connection to the Rover so you'll have to use up the port:


Anybody know if something like this exists, bit can take the data off of the existing BT-1/2 module for Renogy smart devices?
I was using this setup to connect to my Renogy Rover charge controller. It's a bit of work to get Prometheus and Grafana installed, but not too difficult, really. Brian's documentation is a little sparse in areas, but I wanted to put together a cheat sheet of all the installation steps.

https://github.com/corbinbs/solarshed

I used this explainer to install Grafana and Prometheus:

http://www.d3noob.org/2020/02/installing-prometheus-and-grafana-on.html

You'll need to make a DIY serial to USB cable, but it's not too bad. You'll need the following:
Split open the phone cable, you'll need wires 1, 2 and 3.
  1. Wire 1 (white) TX to DB-9 box terminal 3
  2. Wire 2 (black) RX to DB-9 box terminal 2
  3. Wire 3 (red) GROUND to DB-9 box terminal 5
After you plug the USB to serial cable into your Pi, look at /dev to see which new ttyUSB[x] was added. If it's not ttyUSB0, you'll need to edit solar shed's server.py file to point it to the correct ttyUSB[x]. There's info out there on how to create the links in /dev so the tty port doesn't bounce around each time you plug and unplug it. But I'd just get it working first.

Let me know if you have trouble setting it up.

scott
 

SolarShed

Solar Enthusiast
Joined
Jul 20, 2021
Messages
120
thanks, Scott.

This is great information to know. I was looking for something that uses the existing Bluetooth connection, i.e.. read this information off the Renogy BT-1 and BT-2 modules as oppose to the wired connections,

It doesn't seem like something like this exists, yet, probably because its not easy to do.

could you confirm that?
 

scottnichol

New Member
Joined
Nov 4, 2021
Messages
17
I haven't seen anything that scrapes the bluetooth. And depending on their implementation, it might be hard to get a 3rd party app to connect to it due to security considerations. I thought about the same thing and I'm a software engineer by trade, but I don't know anything about bluetooth and the whole idea seems rather daunting to try to hack it out, especially since the existing solution works so well.
 

SolarShed

Solar Enthusiast
Joined
Jul 20, 2021
Messages
120
I hear you.

There one other option, not really an option now, is to wait. Supposedly, Renogy is working a Wifi thingamajig so that you can connect to you system when you are outside bluetooth range but within wifi range.
 

oedo808

New Member
Joined
Dec 15, 2021
Messages
23
GENTLEMEEEEEN!!! Long time creeper, first time poster. Turns out there's another project that's working with a rebranded Renogy (or maybe Renogy is the rebrand). I got this working with an RPi zero w, at least for data reads not sure if I can change the load state. I did my best to write everything up in a hurry check out my Reddit comment for some detail and instructions.

https://www.reddit.com/r/SolarDIY/comments/frafmv/_/hoqc2wu
Next I want to try to get it going on esphome with an esp32 so I can run it closer to my charge controller without draining as much battery as the Pi.

Anyways, enjoy and let me know if you have any questions. Note I am not the author of the library and definitely use at your own risk.
 
Last edited:

SolarShed

Solar Enthusiast
Joined
Jul 20, 2021
Messages
120
I have some homework to do.... So your collecting and storing data via BT to your Pi? What variables can you do just voltage, temperature, etc?

Can you also do current, solar panel watts, etc?

Oh and thanks for Sharing!
 

oedo808

New Member
Joined
Dec 15, 2021
Messages
23
I have some homework to do.... So your collecting and storing data via BT to your Pi? What variables can you do just voltage, temperature, etc?

Can you also do current, solar panel watts, etc?

Oh and thanks for Sharing!

I'm collecting data via BT from a Pi in my house from a charge controller for my greenhouse in my backyard.

Here is a screenshot of all the sensors I'm publishing from the charge controller. I'm reading the values using the project I mentioned in the Reddit comment and am writing those to my MQTT server. That's just the protocol I use to send data to my automation system OpenHAB which persists the data to Influxdb. You could probably wrote the output to syslog and send it over to a remote syslog server for a lighter weight implementation. I'm working on my Grafana dashboard to chart the data. I'll send some more screenshots when I get the graphs going. These aren't all necessary, honestly I was happy just to be able to SSH into the Pi and be able to read the console out from the script but a few extra steps got it all integrated with the rest of my sensors.
Screenshot_20211215-232621_openHAB Beta.jpg

If you're just getting started with home automation, home assistant is more user friendly and probably what I would use if I had to start over. You can also use something like Node RED to subscribe to the MQTT topics and push that into Influxdb and Grafana if you preferred, or even just send notifications or something more simple.
 

oedo808

New Member
Joined
Dec 15, 2021
Messages
23

randrcomputers

New Member
Joined
Dec 9, 2021
Messages
48
I got it working! And added to home assistant.
Couple questions though:
How would we load at startup and is it possible to still use Renogy app to change settings or will I need to shut this down first?
Also not having any luck connecting to batteries so fighting that?
This is very simple to setup my issue was I first tried it as root user and didn’t work so created a user and started over and worked straight up!
 

Attachments

  • Screen Shot 2021-12-18 at 2.27.20 PM.png
    Screen Shot 2021-12-18 at 2.27.20 PM.png
    355.2 KB · Views: 21
Last edited:

oedo808

New Member
Joined
Dec 15, 2021
Messages
23
I got it working! And added to home assistant.
Couple questions though:
How would we load at startup and is it possible to still use Renogy app to change settings or will I need to shut this down first?
Also not having any luck connecting to batteries so fighting that?
This is very simple to setup my issue was I first tried it as root user and didn’t work so created a user and started over and worked straight up!
Great! Good question about connecting with the app, I haven't tried it yet. When I ran the python script for the first time I think it generated a .service file you can install with systemd, I had to make a couple of changes to get it going, I'll post it later to help with auto starting the script. My battery doesn't have Bluetooth so I'm not sure on that side.
 

SolarShed

Solar Enthusiast
Joined
Jul 20, 2021
Messages
120
It would have to work with the BT-2 module to work with the battery and/or inverters, that would be awesome if it would. I guess you need to know the difference between the two modules. I'm talking about the BT-2 compatible ones (not the bluetooth built-in battery, I have no idea what that is).

This would be so cool if it can also read the BT-2 modules!
 

oedo808

New Member
Joined
Dec 15, 2021
Messages
23
It would have to work with the BT-2 module to work with the battery and/or inverters, that would be awesome if it would. I guess you need to know the difference between the two modules. I'm talking about the BT-2 compatible ones (not the bluetooth built-in battery, I have no idea what that is).

This would be so cool if it can also read the BT-2 modules!
So keep in mind that I'm not the author of this software, I just stumbled on it while searching the BT-1 UUIDs that it exposed to my phone. They support a flavor of batteries though https://github.com/Olen/solar-monitor. When I get a bit I'll dig through the classes and see if it looks like it supports the Renogy batteries or inverters. If you have an Android phone you can use nRF connect to see what UUIDs it exposed and that might help confirm whether it can communicate with BT-2.
 

randrcomputers

New Member
Joined
Dec 9, 2021
Messages
48
scanning battery mine shows/
{
kCBAdvDataIsConnectable = 1;
kCBAdvDataLocalName = YABO;
kCBAdvDataManufacturerData = <8ec23038 c1a4>;
kCBAdvDataRxPrimaryPHY = 1;
kCBAdvDataRxSecondaryPHY = 0;
kCBAdvDataServiceUUIDs = (
FF00
);
kCBAdvDataTimestamp = "661574137.075838";
kCBAdvDataTxPowerLevel = 63;
}

Not sure if my bms is compatible or not but guessing not
 

SolarShed

Solar Enthusiast
Joined
Jul 20, 2021
Messages
120
I think the script would need to be updated somehow, to read the off BT-2. The line with

kCBAdvDataServiceUUIDs = (FF00)

and then add it to the "class Config():"

with possible parameters that the Renogy battery can display...but, I can't really offer much now...
 
Top