Library to communicate with Solar Frotier inverters
Project description
PySolarFrontier
PySolarFrontier interacts as a library to communicate with Solar Frontier inverters.
I created this library to use it in the Solar Frontier Inverter integration made for Home Assistant.
Confirmed to work with the SF-WR-3000 inverter.
Credits to fredericvl and his pysaj library, alot of the code is based on his library.
Example usage
Customize based on your needs.
#!/usr/bin/env python3
import pysolarfrontier as pysf
import asyncio
INVERTER_IP = 'x.x.x.x'
async def example():
# Initiate sensors
sensor_def = pysf.Sensors()
# Define IP of the inverter
sf = pysf.SF(INVERTER_IP)
# Get sensor values
await sf.read(sensor_def)
# Print sensor values
for sensor in sensor_def:
print()
print('key: ', sensor.key)
print('name: ', sensor.name)
print('unit: ', sensor.unit)
print('value: ', sensor.value)
print('per_day_basis: ', sensor.per_day_basis)
print('per_total_basis: ', sensor.per_total_basis)
print('date: ', sensor.date)
print('enabled: ', sensor.enabled)
asyncio.run(example())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pysolarfrontier-1.0.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for pysolarfrontier-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cca72580fb8bfc0924e3d7282cff8fe42fb98927426494331a1e51d8f2df188c |
|
MD5 | 32b29a973e1cbc9228308b1d1f557bc1 |
|
BLAKE2b-256 | 3868c5833991402d8a57b7ec8c85945bba00406c564daa6e77f786b853a76786 |