Automated JSON API based communication with Fronius Symo

Overview

PyFronius - a very basic Fronius python bridge

Build Status Coverage Status PyPI version PyPI - Python Version PyPI - Status

A package that connects to a Fronius device in the local network and provides data that is provided via the JSON API of the Fronius. This includes the grid consumption, grid return, photovoltaic production and many more details on the status of the local power supply.

Features

The package supports the following data provided by Fronius devices:

  • Power Flow (System scope)
  • Meter (System and Device scope)
  • Inverter (System and Device scope)
  • Storage (System and Device scope, Experimental)
  • Active Devices
  • Logger Information
  • Inverter Information

The package currently supportes the Fronius API V1 and V0 and aims to support as many different device types as possible (Hybrid, GEN24,...).

I also know there are better scripts, yet they are not on pypi which is necessary for using them with Home Assistant

Contributing

Support may be enhanced based on the official documentation (V1, V0). Pull requests are very welcome.

If you own a Fronius device, feel free to provide us with raw data returned by fetching the API endpoints manually. Data from systems featuring Ohmpilots and Storages are much welcomed as we have no data for testing these so far.

Comments
  • unable to clone

    unable to clone

    Not sure if it is releated to my machine, or the content of the project. If I clone I get an error: image nothing gets cloned. With the suggested git restore I have more: image

    opened by retos 6
  • Drop loop kwarg from asyncio.gather call

    Drop loop kwarg from asyncio.gather call

    On Python 3.10 gather does not accept the loop kwarg anymore:

    >       res = await asyncio.gather(*requests, loop=loop, return_exceptions=True)
    E       TypeError: gather() got an unexpected keyword argument 'loop'
    

    Tested against python 3.9/3.10.

    opened by mweinelt 5
  • New Fronius API

    New Fronius API

    As discovered here there seems to be a new api under http:///components/readable where the GEN24 web interface gets it data from which seems quite extensive, maybe all we ever dreamed of :)

    For example it has very interesting lifetime stats for BYD battery storages:

                                            "BAT_CAPACITY_ESTIMATION_MAX_F64" : 21897.0,
    					"BAT_CAPACITY_ESTIMATION_REMAINING_F64" : 16247.0,
    					"BAT_CURRENT_DC_F64" : -4.9048422066971815,
    					"BAT_CURRENT_DC_INTERNAL_F64" : -4.8977628097185475,
    					"BAT_ENERGYACTIVE_LIFETIME_CHARGED_F64" : 2152417.0,
    					"BAT_ENERGYACTIVE_LIFETIME_DISCHARGED_F64" : 1856524.0,
    					"BAT_MODE_CELL_STATE_U16" : 3.0,
    					"BAT_MODE_HYBRID_OPERATING_STATE_U16" : 1.0,
    					"BAT_MODE_LAST_FAULT_PARAMETER_U16" : 0.0,
    					"BAT_MODE_STATE_U16" : 64.0,
    					"BAT_MODE_U16" : 2.0,
    					"BAT_MODE_WAKE_ENABLE_STATUS_U16" : 1.0,
    					"BAT_TEMPERATURE_CELL_F64" : 8.5,
    					"BAT_TEMPERATURE_CELL_MAX_F64" : 9.0,
    					"BAT_TEMPERATURE_CELL_MIN_F64" : 8.0,
    					"BAT_VALUE_STATE_OF_CHARGE_RELATIVE_U16" : 74.200000000000003,
    					"BAT_VALUE_STATE_OF_HEALTH_RELATIVE_U16" : 99.0,
    					"BAT_VALUE_WARNING_CODE_U16" : 46.0,
    					"BAT_VOLTAGE_DC_INTERNAL_F64" : 415.69999999999999,
    					"COMPONENTS_MODE_ENABLE_U16" : 1.0,
    					"COMPONENTS_MODE_VISIBLE_U16" : 1.0,
    					"COMPONENTS_TIME_STAMP_U64" : 1646425005.0,
    					"DCLINK_POWERACTIVE_LIMIT_DISCHARGE_F64" : 16628.0,
    					"DCLINK_POWERACTIVE_MAX_F32" : 16748.0,
    					"DCLINK_VOLTAGE_MEAN_F32" : 415.10000000000002,
    					"DEVICE_TEMPERATURE_AMBIENTEMEAN_F32" : 10.0
    

    @farmio How could this treasure of data best be integrated in pyfronius and then home assistant?

    opened by jmtatsch 5
  • Push data to the connector (by @budbundi)

    Push data to the connector (by @budbundi)

    @budbundi

    Hello, I'm not sure if this is the right place or the home assistant repo. But at this moment I can't use the official HA Fronius component since the poll interval is too long for my purposes and the data of the IOs are missing. I know the IOs are not present in the pull API the user must set a push service for "Datamanager IO Sates". Maybe it is possible to ask the user if he wants to push or pull the data in a config flow and if he chose to push, the component shows a link of the webhook to send the data to.

    @nielstron

    Hello @BudBundi, I am not quite sure which tool you are talking about. This Library is primarily aimed at obtaining the data directly supplied by Fronius devices via the official Fronius JSON API V1. Is there another way to access this data? Is there a way to control switches in the fronius device? Does this require certain devices?

    @budbundi

    I think no special device is necessary.

    You can use all JSON API Data and some more, for me the "Datamanager IO Sates" part is essential.

    Screenshot 2021-02-19 203753 see also official documentation Operating Instruction Fronius Push Service.pdf

    @nielstron

    That looks really interesting! I do not currently have a Fronius device available to play around with this. Also, this requires a completely different setup than the current one (as the current package is aimed at user-initiated requests rather than regular incoming notifications). So thanks for the suggestion but I think this will (and can) not be implemented soonish (at least in this package).

    Regarding the issue of too long poll intervals - you can manually configure the scan interval of the fronius component (down to any time interval you'd like). You will definitely get down to 10 seconds with this while too small intervals might slow down home assistant considerably.

    @gbeine

    The Push Service is in fact an interesting feature. If the HTTP polling interval slows down HA too much, one could try the https://github.com/gbeine/fronius2mqtt script. That polls the Fronius devices using pyfronius and publishes the results via MQTT. Given an HA configured as a MQTT client, the interval of 10 seconds definitely will not slow down the HA.

    @jmtatsch

    The inverter can also be controlled via modbus tcp Look at this how they set the charge target https://github.com/godfuture/SymoGen24Weather/blob/96bcde1c31a6ec144f4f17355a577100b75c90b3/SymoGen24Controller.py#L60

    Note: reconstructed after temporary deletion of the project

    opened by nielstron 0
  • Submitting PRs after accidental deletion

    Submitting PRs after accidental deletion

    Hey everyone, I accidentally deleted this repository...

    So all fork relationships are lost. If you want to submit a PR from a fork before the deletion, fork this repository, copy your changes over from the old fork, and place a PR. Sorry for the inconveniences!

    @farmio

    opened by nielstron 3
Releases(release-0.7.1)
Owner
Niels Mündler
Informatics student on work days. Working on smart and not-so-smart home and mechanized verification of data structures.
Niels Mündler
Asynchronous Python Wrapper for the GoFile API

Asynchronous Python Wrapper for the GoFile API

Gautam Kumar 22 Aug 04, 2022
Cloudshell-sandbox-reporter - Helper modules and classes for writing to Cloudshell sandbox console

Cloudshell Sandbox Reporter This project provides utility classes for formatting

QualiLab 2 Sep 07, 2022
A python to scratch API connector. Can fetch data from the API and send it back in cloud variables.

Scratch2py Scratch2py or S2py is a easy to use, versatile tool to communicate with the Scratch API Based of scratchclient by Raihan142857 Installation

20 Jun 18, 2022
A discord bot consuming Notion API to add, retrieve data to Notion databases.

Notion-DiscordBot A discord bot consuming Notion API to add and retrieve data from Notion databases. Instructions to use the bot: Pre-Requisites: a)In

Servatom 57 Dec 29, 2022
An API wrapper for Henrik's Unofficial VALORANT API

ValorantAPI.py An API wrapper for Henrik's Unofficial VALORANT API Warning!! This project is still in beta and only contains barely anything yet. If y

Jakkaphat Chalermphanaphan 0 Feb 04, 2022
Anti Spam/NSFW Telegram Bot Written In Python With Pyrogram.

✨ SpamProtectionRobot ✨ Anti Spam/NSFW Telegram Bot Written In Python With Pyrogram. Requirements Python = 3.7 Install Locally Or On A VPS $ git clon

Akshay Rajput 46 Dec 13, 2022
Group Chat Spammer For Discord

Group Chat Spammer For Discord Free and public gc spammer

Dreamy 20 Dec 27, 2022
A discord bot that send SMS spam!

bruh-bot send spam sms! send spam with email! it sends you spam via sms and Email using two tools, quack and impulse! if you have some problem contact

pai 32 Dec 25, 2022
Python client for Toyota North America service API

toyota-na Python client for Toyota North America service API Install pip install toyota-na[qt] [qt] is required for generating authorization code. Us

Gavin Ni 18 Sep 06, 2022
Telegram Userbot to steram youtube live or Youtube vido in telegram vc by help of pytgcalls

TGVCVidioPlayerUB Telegram Userbot to steram youtube live or youtube vidio in telegram vc by help of pytgcalls Commands = Vidio Playing 🎧 stream :

Achu biju 3 Oct 28, 2022
阿里云盘上传脚本

阿里云盘上传脚本 Author:李小恩 Github:https://github.com/Hidove/aliyundrive-uploader 如有侵权,请联系我删除 禁止用于非法用途,违者后果自负 环境要求 python3 使用方法 安装 git clone https://github.co

Hidove 301 Jan 01, 2023
Python library for the DeepL language translation API.

The DeepL API is a language translation API that allows other computer programs to send texts and documents to DeepL's servers and receive high-quality translations. This opens a whole universe of op

DeepL 535 Jan 04, 2023
A Twitter Bot that retweets and likes tweets with the hashtag #girlscriptwoc and #girlscript, and also follows the user.

GirlScript Winter of Contributing Twitter Bot A Twitter Bot that retweets and likes tweets with the hashtag #girlscriptwoc and #girlscript, and also f

Pranay Gupta 9 Dec 15, 2022
This repository contains free labs for setting up an entire workflow and DevOps environment from a real-world perspective in AWS

DevOps-The-Hard-Way-AWS This tutorial contains a full, real-world solution for setting up an environment that is using DevOps technologies and practic

Mike Levan 1.6k Jan 05, 2023
A Telegram Bot to manage your music channel with some cool features.

Music Channel Manager V2 A Telegram Bot to manage your music channel with some cool features like appending your predefined username to the musics tag

11 Oct 21, 2022
Python client for QIWI payment system

Pyqiwi Lib for QIWI payment system Installation pip install pyqiwi Usage from decimal import Decimal from datetime import datetime, timedelta from p

Andrey 12 Jun 03, 2022
A discord bot thet lets you play Space invaders.

space_Invaders A discord bot thet lets you play Space invaders. It is my first discord bot... so please give any suggestions to improve it :] Commands

2 Dec 30, 2021
Обертка для мини-игры "рабы" на python

Slaves API Библиотека для игры Рабы на Python. Большая просьба Поставьте звездочку на репозиторий. Это много для меня значит. Версии Т.к. разработчики

Zdorov Philipp 13 Mar 31, 2021
This Is Advanced Version Of Old Radio Player, An Telegram Bot to Play Radio/Music in Channel or Group Voice Chats.

Telegram Radio Player V2 An Telegram Bot to Play Radio/Music in Channel or Group Voice Chats. This is also the source code of the bot which is being u

SAF ONE 81 Dec 03, 2022
Auto filter bot for python

Media Search bot Index channel or group files for inline search. When you post file on telegram channel or group this bot will save that file in datab

1 Dec 22, 2021