Victron SDK for Python
NOTE: This is not an offical Victron SDK.
This Python Package enables you to develop applications with the Victron.
Install:
pip install victron
Example get a value:
from victron import Victron
# Create a configration
config = {
"grid_limit": device.get(c.CFG_GRID_LIMIT),
"ess_feed_limit": device.get(c.CFG_ESS_FEED_LIMIT),
"ess_soc_limit": device.get(c.CFG_ESS_SOC_LIMIT),
}
# Initialize a new Victron connection
victron = victron(
host="my-Victron.local",
port=502,
unit_id=100,
config=config
)
# get the state of charge
soc = victron.getSoc()
# print
print(soc)
Victron Class
Victron(
host:str,
port:int=502,
unit_id:int=100,
config:dict={}
)
Victron Config Options
NOTE: The Configuration is to prevent the devices form overloading the grid or other components! Handle with care!
When values are not provided or None the are unused.
{
"grid_limit": None, # The limit of the grid the deivce is connected to
"ess_feed_limit": None, # The limit of the feed from ESS to the grid
"ess_soc_limit": None, # The limit of the state of charge of the ESS
}
Methods
getSoc(address:int=843)
- Get the state of charge
readSingleHoldingRegisters(self, address:int, parse:bool=True):
- Read a single holding register
- Parse = True handles signed values
TODO: Add more methods
Metadata
Release files for victron 1.0.2
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 |
|---|---|---|---|---|
| victron-1.0.2.tar.gz | 25.2 kB | Without provenance | Details for victron-1.0.2.tar.gz |
Release files / victron-1.0.2.tar.gz
| Download URL | victron-1.0.2.tar.gz |
|---|---|
| Size | 25.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d862ed52928857ab25c4b38f10649670b26d4fc7094ef58470478b6a0d9f3fdb
|
|
BLAKE2b-256 checksum How to use checksums |
4f7ed0ebed99e986ebf4e342fd15e8945820b67daa54299684e9030a32bbeeb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.5
|
Security for victron 1.0.2
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.