PitchHut
Log in / Sign up
solafans_rs485
5 views
Effortlessly integrate MPPT charger data into Home Assistant.
Pitch

Simplify the management of your MPPT chargers with our Python scripts designed to seamlessly query data over RS485. Support for dual chargers ensures that your Home Assistant sensors are continuously updated. Installation is straightforward, allowing you to focus on optimizing your renewable energy systems without the hassle of complex setups.

Description

This repository provides essential Python scripts designed for efficient data querying from MPPT solar chargers over RS485, alongside seamless integration with Home Assistant. The primary scripts include:

  • query_mppt.py: This script queries data from an MPPT charger, facilitating real-time monitoring of solar power systems and ensuring optimal performance.
  • homeassistant_dual.py: With the ability to handle two MPPT chargers simultaneously, this script updates Home Assistant sensors every second, enabling you to have a comprehensive view of your solar energy metrics.

Key Features

  • RS485 Communication: Enables accurate data retrieval from MPPT chargers, ensuring reliable performance monitoring.
  • Data Parsing: Parses incoming data according to a specified protocol, allowing for meaningful insights.
  • Home Assistant Updates: Automatically updates Home Assistant with the parsed data, ensuring your home automation system reflects real-time performance.
  • Dual MPPT Support: Flexible script allows monitoring of two chargers, consolidating solar performance data into a single interface.

Configuration Requirements

To successfully run the scripts, ensure you have the following prerequisites:

  • Python 3.x installed.
  • Python libraries: pyserial and requests. Install these via pip for robust functionality.
  • Home Assistant with REST API enabled, including a long-lived access token for secure interactions.

Protocol Overview

The MPPT charger responds with a structured 93-byte data packet, providing valuable information such as charging status, battery voltage, generated power, and temperature readings.

Developed by James Preston, this project facilitates enhanced solar energy monitoring and control, empowering you to optimize your solar power system effectively.