Skip to main content

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


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.1.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

pysolarfrontier-1.1-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page