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
Sunflower-farmers-automated-bot - Sunflower Farmers NFT Game automated bot.IT IS NOT a cheat or hack bot

Sunflower-farmers-auto-bot Sunflower Farmers NFT Game automated bot.IT IS NOT a

Arthur Alves 17 Nov 9, 2022
A component of BuzzUtilityBot that allows for inter-server communication

A component of BuzzUtilityBot that allows for inter-server communication! Separated due to privacy and ease of inspection concerns

OHaiiBuzzle 2 Oct 11, 2022
Crosschat - A bot for cross-server communication

CrossChat A bot for cross-server communication. Running the bot To run the bot y

null 8 May 15, 2022
A Python script to create customised Spotify playlists using the JSON, Spotipy Library and Spotify Web API, based on seed tracks in your history.

A Python script to create customised Spotify playlists using the JSON, Spotipy Library and Spotify Web API, based on seed tracks in your history.

Youngseo Park 1 Feb 1, 2022
A Python Library to interface with Flickr REST API, OAuth & JSON Responses

Python-Flickr Python-Flickr is A Python library to interface with Flickr REST API & OAuth Features Photo Uploading Retrieve user information Common Fl

Mike Helmick 40 Sep 25, 2021
A Python Library to interface with LinkedIn API, OAuth and JSON responses

#Overview Here's another library based on the LinkedIn API, OAuth and JSON responses. Hope this documentation explains everything you need to get star

Mike Helmick 69 Dec 11, 2022
A simple waybar module to display the status of the ICE you are currently in using the ICE Portals JSON API.

waybar-iceportal A simple waybar module to display the status of the ICE you are currently in using the ICE Portals JSON API. Installation Ensure pyth

Moritz 7 Aug 26, 2022
Read API docs offline, CLI, supports DevDocs.io compatible JSON files

Read API docs offline, CLI, supports DevDocs.io compatible JSON files

Tero Karvinen 3 Oct 18, 2022
Python client for Invidious' JSON API

Python project template A template for new Python projects. Features Automatically builds PDoc documentation & uploads package to PyPI on new GitHub r

Kevo 2 Jun 5, 2022
NewpaperNews-API - Json data of the news with python

NewsAPI API Documentation BASE_URL = "https://saurav.tech/NewsAPI/" top_headline

Aryaman Prakash 2 Sep 23, 2022
It connects to Telegram's API. It generates JSON files containing channel's data, including channel's information and posts.

It connects to Telegram's API. It generates JSON files containing channel's data, including channel's information and posts. You can search for a specific channel, or a set of channels provided in a text file (one channel per line.)

Esteban Ponce de Leon 75 Jan 2, 2023
A python package that allows you to place automated trades using the TD Ameritrade API.

Template Repo Table of Contents Overview Setup Usage Support These Projects Overview Setup Setup - Requirements Install:* For this particular project,

Alex Reed 4 Jan 25, 2022
A Terminal User Interface (TUI) for automated trading with Komodo Platform's AtomicDEX-API

PytomicDEX Makerbot A Terminal User Interface (TUI) for automated trading with Komodo Platform's AtomicDEX-API Install sudo apt install wget curl jq g

null 6 Aug 25, 2022
🤖 Automated follow/unfollow bot for GitHub. Uses GitHub API. Written in python.

GitHub Follow Bot Table of Contents Disclaimer How to Use Install requirements Authenticate Get a GitHub Personal Access Token Add your GitHub usernam

João Correia 37 Dec 27, 2022
A telegram to pyrogram json bot

Pyrogram-Json-Bot A telegram to pyrogram json bot Please fork this repository don't import code Made with Python3 (C) @FayasNoushad Copyright permissi

Fayas Noushad 11 Dec 20, 2022
Telegram bot for making Heroku app.json by @AbirHasan2005

Heroku-app.json A Telegram bot for making Heroku app.json by @AbirHasan2005. Demo Bot Host Bot Deploy to Heroku Click Below Button to Deploy to Heroku

Abir Hasan 46 Nov 13, 2022
A Discord bot to easily and quickly format your JSON data

Invite PrettyJSON to your Discord server Table of contents About the project What is JSON? What is pretty printing? How to use Input options Command I

Sem 4 Jan 24, 2022