Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can you run this when connected to the MPPT? #8

Open
bigbborn opened this issue Feb 13, 2021 · 5 comments
Open

How can you run this when connected to the MPPT? #8

bigbborn opened this issue Feb 13, 2021 · 5 comments

Comments

@bigbborn
Copy link

The README does a good job of explaining how to use the Example data, but what do you need to do if you're hooked up directly to the MPPT? (sorry, it's probably very basic, but I'm and extremely new Python developer 😅)

@kjkoster
Copy link

On a Raspberry Pi, you plug in one of those VE.Direct to USB cables (really just serial to USB) and use something like the following:

$ python3 examples/vedirect_print.py --port /dev/ttyUSB0

@Gamma-Software
Copy link

@karioja I'm connected to my Victron devices (2 of them) via Bluetooth then "sudo rfcomm bind 1 $MAC_ADDRESS" to bind to /dev/rfcomm1 and didn't succeed to connect.
I get this kind of error:

$ python3 examples/vedirect_print.py --port /dev/rfcomm1
Traceback (most recent call last):
File "examples/vedirect_print.py", line 16, in
print(ve.read_data_callback(print_data_callback))
File "/home/rudloff/sources/CapsuleScripts/devices_driver/vedirect/vedirect/vedirect.py", line 84, in read_data_callback
data = self.ser.read()
File "/home/rudloff/sources/CapsuleScripts/devices_driver/vedirect/.venv/lib/python3.8/site-packages/serial/serialposix.py", line 595, in read
raise SerialException(
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

But I don't use the serial port anywhere.
This connectivity issue is systematic on my 2 devices.
I may have done something wrong.
Have you experienced something similar and connected via Bluetooth ?

@karioja
Copy link
Owner

karioja commented Sep 15, 2021

AFAIK the Victron Bluetooth Dongle / Bluetooth enabled devides use a custom protocol.
https://community.victronenergy.com/questions/24952/using-bluetooth-to-read-direct-values.html
They mention GATT so perhaps the data is available through GATT characteristics.

@birdie1
Copy link

birdie1 commented Sep 15, 2021

If you want to connect via bluetooth, check out this repo: https://github.com/birdie1/victron. We have reverse engineered parts of the victron bluetooth protocol for different devices and added the new ble gatt protocol from smartshunt as well.

@Gamma-Software
Copy link

Nice guys ! thanks for the fast reply. I'll definitely check the links out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants