Comments (12)
I've removed libscrc dependency.
from renogy-bt.
well now iam dealing with missing dbus, probably gonna look at Issue #12 and google a bit.
edit: i am indeed running into the same issues as @marcuslib did, now something about 'gi' - no idea what this is
could go with the nested docker, but not sure if i like it. overhead seem a bit unnecessary.
but a new HA/debian based raspi installation seem overkill as well.
from renogy-bt.
Were you able to resolve the issue? May be installing dbus-python
will help
from renogy-bt.
unfortunately no, terminal says dbus is installed, but wont find it when running the script.
when i finally got dbus out of the way, its complaining about gi
instead
i dont know if the script some kind of raspberry exclusive, but couldnt make gatt work with ubuntu either
from renogy-bt.
I got it to work in the end by installing HA in docker and then had to install python within a VM. To run it i then had to create a service to run the python script, it will also check if its running and if not run it, as I did find it took a few times to run the script for it to pickup the BT-1.
from renogy-bt.
I got it to work in the end by installing HA in docker and then had to install python within a VM. To run it i then had to create a service to run the python script, it will also check if its running and if not run it, as I did find it took a few times to run the script for it to pickup the BT-1.
yes, i noticed. But i dont want to move HA back to docker. I used to use docker, but couldnt use addons, so i switched to native.
I dont really understand why gatt is behaving the way it does. maybe we can dockerize the whole thing to make it easier? i tried something along the lines, but ran into the very same issues. plus you need some way to expose bt to the docker.
I will most likely try a different ble interface and clone the renogy logic, dont know tbh
from renogy-bt.
update: since the SoC supplied by the bluetooth is not accurate, so there is no need to implement it in HA for me
from renogy-bt.
@Abudinka is there a guide on how to implement this in HA? I'm not an expert, but I was planning to install Ubuntu and then HA on my orange pi zero 3.
Im sure it would be an adventure to figure this out, but if you have any clear steps on how to achieve it that would be awesome.
At first i thought about going with the RS485 method until I saw that we can actually interpret the BL2, which is amazing!
from renogy-bt.
sorry cant help here, as i said i dropped attempting renogy bluetooth communication since there is nothing to gain for me. if available i recommend using the home assistant raspberry pi image directly instead of using ubuntu. initially i used ubuntu and HA docker, but it has some drawbacks like no addon support. switched to raspberry pi 4B and used the HA image available in Raspberry Pi Imager.
from renogy-bt.
I'd still be interested in getting this to work directly in HA. I'll have a tinker with it and see if I can work it out.
from renogy-bt.
Ran into Module 'dbus' not found
on headless Raspberry PI. Something in all of this fixed it:
pip3 install --user -r requirements.txt
sudo apt-get install python3-dbus
sudo apt install libdbus-1-3 libdbus-1-dev
sudo apt-get install libglib2.0-dev
sudo apt install python3-pydbus
python3 -m pip install --user dbus-python
And then I ran into
File "/home/cruscio/.local/lib/python3.12/site-packages/gatt/gatt_linux.py", line 13, in <module>
from gi.repository import GObject
ModuleNotFoundError: No module named 'gi'
Which should be fixed by running
pip3 install --user PyGObject
But that fails ... So then:
sudo apt install libcairo2 libcairo2-dev
pip3 install --user PyGObject
Another new failure. Log says to install libgirepository1.0-dev
sudo apt install libgirepository1.0-dev
pip3 install --user PyGObject
Finally! The PyGObject
install worked, though it might have been easier to install libgtk2.0-dev (which a stackoverflow post for libglib2.0-dev mentioned
And now I get
ModuleNotFoundError: No module named 'requests'
./facepalm
pip3 install --user requests
ANNNNND finally ...
python3 ./example.py config.ini
INFO:root:Init BatteryClient: BT-TH-XXXXXXXX => XX:XX:XX:XX:XX:XX
INFO:root:Adapter status - Powered: True
INFO:root:Starting discovery...
Couple thoughts:
- @cyrils - It seems a few requirements are missing from
requirements.txt
(not complaining. I definitely appreciate all the work you've shared here. Just wanted to call out that it may be worth adding all the requirements torequirements.txt
:) ) - I don't understand why there are so many things (glib2, cairo, GObject) that seem tied to GTK in a non-gui application...? (maybe this has something to do with accessing BT?)
Now if only I could figure out how to discover my battery info without needing to dismantle my battery box to muck with the daisy chain. (Bluetooth logging while running the android app shows chatter in wireshark, but I'm not smart enough to decipher it :( )
Anyway - I hope this helps others with similar issues.
from renogy-bt.
Hm.. I think the gatt
library uses these for some reason. A regular raspberry pi image includes all of these by default, never tested it over headless image. Doesn't hurt to include them into requirements.txt though.
And unfortunately the app does not show the device id. Currently the only way to get the individual Ids is to connect one device at a time. However you can try some usual suspects for batteries:
33, 34, 35.. series
48, 49, 50..
97, 98..
247, 248..
from renogy-bt.
Related Issues (20)
- MQTT logging issues to HA HOT 3
- polling not working? HOT 1
- Error when calling set_load() function HOT 2
- Test Inverter compatibility HOT 5
- Renogy Core One support coming? HOT 2
- can be deleted, wrong user error
- client can not be used directly HOT 1
- BT-2 device is undiscoverable HOT 2
- Error when using raspberry pi 4 HOT 9
- ERROR:root:base client cannot be used directly HOT 3
- plattform esp32-ble esphome - ENHANCEMENT HOT 22
- install steps HOT 4
- dump example.py to text file or json locally? HOT 2
- tested also with RCC40RVRE HOT 4
- Can this be migrated to esphome ble
- ML2440 HOT 6
- Hammering MQTT servers? HOT 6
- Using Computer and USB-RS232 converter with Renogy Rover MPTT 40A, bypassing Bluetooth Module BT-01 HOT 2
- DCC50S ID via hub is 96, not 97 HOT 1
- Temperature showing up as hotter than surface of the sun. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from renogy-bt.