Giter Club home page Giter Club logo

hoymiles-wifi's Introduction

hoymiles-wifi

This Python library facilitates communication with Hoymiles DTUs and the HMS-XXXXW-2T HMS microinverters, utilizing protobuf messages.

For the Home Assistant integration have a look here: https://github.com/suaveolent/ha-hoymiles-wifi

Disclaimer: This library is not affiliated with Hoymiles. It is an independent project developed to provide tools for interacting with Hoymiles HMS-XXXXW-2T series micro-inverters featuring integrated WiFi DTU. Any trademarks or product names mentioned are the property of their respective owners.

Supported Devices

The library was successfully tested with:

  • Hoymiles HMS-800W-2T
  • Hoymiles DTU WLite

Installation

$ pip install hoymiles-wifi

Usage

You can integrate the library into your own project, or simply use it in the command line.

Command line:

hoymiles-wifi [-h] --host HOST [--as-json] <command>

commands:
    get-real-data-new,
    get-real-data-hms,
    get-real-data,
    get-config,
    network-info,
    app-information-data,
    app-get-hist-power,
    set-power-limit,
    set-wifi,
    firmware-update,
    restart-dtu,
    turn-on-inverter,
    turn-off-inverter,
    get-information-data,
    get-version-info,
    heartbeat,
    identify-dtu,
    identify-inverters

The `--as-json` option is optional and allows formatting the output as JSON.

Python code

from hoymiles_wifi.dtu import DTU
...
dtu = DTU(<ip_address>)
response = await dtu.<command>

if response:
    print(f"DTU Response: {response}")
else:
    print("Unable to get response!")

Available functions

  • async_get_real_data_new(): Retrieve real-time data
  • async_get_real_data_hms(): Retrieve real-time data
  • async_get_real_data(): Retrieve real-time data
  • async_get_config(): Retrieve configuration information
  • async_network_info(): Retrieve network information
  • async_app_information_data(): Retrieve application information data
  • async_app_get_hist_power(): Retrieve historical power data
  • async_set_power_limit(power_limit): Set the power limit of the inverter (0-100%)
  • async_set_wifi(wifi_ssid, wifi_password): Configure the wifi network
  • async_firmware_update(): Update to latest firmware
  • async_restart_dtu: Restart the DTU
  • async_turn_on_inverter: Turn the inverter on
  • async_turn_off_inverter: Turn the inverter off
  • async_get_information_data: Retrieve information data
  • async_heartbeat: Request a heartbeat message from the DTU

Note

Please be aware of the following considerations:

  • No DTU Implementation: This library retrieves information directly from the (internal) DTU of Hoymiles Wifi inverters.

Caution

Use this library responsibly and be aware of potential risks. There are no guarantees provided, and any misuse or incorrect implementation may result in undesirable outcomes. Ensure that your inverter is not compromised during communication.

Known Limitations

Update Frequency: The library may experience limitations in fetching updates, potentially around twice per minute. The inverter firmware may enforce a mandatory wait period of approximately 30 seconds between requests.

Compatibility: While developed for the HMS-800W-2T inverter, compatibility with other inverters from the series is untested at the time of writing. Exercise caution and conduct thorough testing if using with different inverter models.

Attribution

A special thank you for the inspiration and codebase to:

hoymiles-wifi's People

Contributors

suaveolent avatar creolis avatar

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.