Coder Social home page Coder Social logo

fronius-driver's Introduction

Fronius driver for Home Assistant

This script provides a means to apply a value contained in a helper to the soft limit field on a fronius inverter.

Setup

  • Ensure you know the service password for your fronius inverter. You will need it.
  • In the DNO Editor, scroll down to "Dynamic power reduction", and ensure that "Limit Entire System" and "Export Limiting Control (Soft Limit)" are both selected.

Script Arguments

The script requires the following arguments:

  • -t, --home_assistant_token: The access token for Home Assistant.
  • -u, --home_assistant_url: The URL of your Home Assistant instance.
  • -f, --fronius_url: The URL of your Fronius inverter.
  • -p, --fronius_password: The password to access your Fronius inverter.

Additionally, you can specify one optional argument:

  • -e, --home_assistant_export_limit_entity: The entity in Home Assistant that controls the export limit. Defaults to input_number.export_limit if not specified.

You also have an option to specify whether to run your script in headless mode.

  • -n, --not_headless: Disable the headless mode in Firefox. Potentially useful for debugging. Probably not useful in docker.

How to run the script locally

  1. Ensure python is installed - install it if required.
  2. Create a virtual environment (technically optional, but I'd recommend it) using python -mvenv venv
  3. Enable it. . venv/bin/activate (at least on linux)
  4. Install dependencies. pip install requirements.txt
  5. Run the script with all mandatory arguments.

It might look something like this:

./main.py -t ABCDEFG -u http://localhost:8123 -f http://fronius -p "R3D@CT3D"

How to run the script in docker

Same deal really, except you get to skip nearly all the steps. Obviously ensure docker is installed though.

docker run --rm shadowbert/fronius-driver -t ABCDEFG -u http://localhost:8123 -f http://fronius -p "R3D@CT3D"

What if everything goes belly up?

If an exception is thrown during execution, a base64 representation of a screenshot will be output to the terminal. Convert it (search for base64 to image in your favourite search engine if you don't know what you're doing) and see if you gain any insight.

fronius-driver's People

Contributors

shadow7412 avatar

Stargazers

DNKROZ avatar B Synnerlig avatar  avatar

Watchers

 avatar

Forkers

besynnerlig

fronius-driver's Issues

Error in main.py

When I try to run it as a docker I get the following error (on a seperate machine on the same network)

Traceback (most recent call last):
File "/app/main.py", line 45, in
assert username == 'string:service', username
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

Attached the Base64 image
image
image
How the user selection looks like

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.