https://github.com/faanskit/ha-esolar
Custom Integration of SAJ eSOLAR
https://github.com/faanskit/ha-esolar
esolar esolar-air hacs home-assistant homeassistant homeassistant-config homeassistant-custom-component homeassistant-integration saj saj-h1 saj-inverters saj-r5 solar
Last synced: 5 months ago
JSON representation
Custom Integration of SAJ eSOLAR
- Host: GitHub
- URL: https://github.com/faanskit/ha-esolar
- Owner: faanskit
- License: gpl-3.0
- Created: 2022-12-03T09:11:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-09T07:02:02.000Z (over 1 year ago)
- Last Synced: 2025-10-09T06:32:43.452Z (9 months ago)
- Topics: esolar, esolar-air, hacs, home-assistant, homeassistant, homeassistant-config, homeassistant-custom-component, homeassistant-integration, saj, saj-h1, saj-inverters, saj-r5, solar
- Language: Python
- Homepage: https://github.com/faanskit/ha-checkwatt
- Size: 839 KB
- Stars: 10
- Watchers: 7
- Forks: 13
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://my.home-assistant.io/redirect/hacs_repository/?owner=faanskit&repository=ha-esolar&category=integration)
[](https://www.paypal.me/faanskit/) [](https://www.buymeacoffee.com/faanskit)
# Home Assistant SAJ eSolar Custom Integration
This integration uses cloud polling from the SAJ eSolar portal using a reverse engineered private API.
Thanks to [SAJ eSolar](https://github.com/djansen1987/SAJeSolar) for inspiration.
This integration today support SAJ R5 and SAJ H1. SAJ SEC has not yet been implemented mainly due to lack of access to a SEC system,
The focus on this integration is to reduce the amount of sensors published while at the same time maximize the information available and provide them as attributes.
As an example, the H1 Inverter Power sensor has 50 information elements (15 x 3 + 5) published as attributes. This is a bit against the nature of Home Assistant development, but given a system comprising two plants, one R5 and two H1 - the amount of sensors would easly be in the hundreds. Therefore, this integration aims to publish only what is relevant as sensors.

These attributes can be fetched by implementing a template sensor using jinja2. An example of that can be found in the advanced section below.
# Installation
### HACS
[](https://my.home-assistant.io/redirect/hacs_repository/?owner=faanskit&repository=ha-esolar&category=integration)
### Manual
- Copy directory `custom_components/saj_esolar_air` to your `/custom_components` directory.
- Restart Home-Assistant.
## Enable the integration
Go to Settings / Devices & Services / Integrations. Click **+ ADD INTERATION**

Search for eSolar and click on it

Enter your SAJ eSolar username and password

If you have more than one site, select which of the sites that shall be installed

Following a succesful installation, a device per plant will be created

You can see that a number of devices and entites has been created at the SAJ eSolar integration

If you click on the devices, you can see this also in the Devices section

Your home screen will now have a number of new entities depending on your system. A R5 system will have two sensors (Status and Energy) and a H1 System will have five sensors (Status, Sell Energy, Buy, Energy, Charge Energy, Discharge Energy)

## Configuration
If you need more sensor and more detailed attributes in the sensors, you can configure the integration as follows
Go to Settings / Devices & Services / SAL eSolar. Click **CONFIGURE**.
Select if you want additional inverter sensors and if you want Photovoltaics and Grid attributes.
Take note that the Photovoltaics and Grid attributes will pull additional data from the SAJ servers.

After the configuration is done you need to restart the integration. Click **...** and select **Reload**

The system will now reload and add two-tre new sensors per inverter (Energy Total, Power and for H1 system Battery SoC)

## Final result
When the system is fully set-up it can look something like this

# Advanced
### Creating a template sensor based on sensor attributes.
The below example will fetch the battery direction from the inverter energy total sensor and publish that as a new sensor
```
template:
- sensor:
- name: "Battery Direction"
unique_id: inverter_ass111111111111111_energy_total_battery_direction
state: >
{{state_attr('sensor.inverter_ass111111111111111_energy_total', 'Battery Direction')}}
```
# Donations
I mainly did this project as a learning experience for myself and have no expectations from anyone.
If you like what have been done here and want to help I would recommend that you firstly look into supporting Home
Assistant.
You can do this by purchasing some swag from their [store](https://teespring.com/stores/home-assistant-store)
or paying for a Nabu Casa subscription. None of this could happen without them.
After you have done that if you still feel this work has been valuable to you I welcome your support through BuyMeACoffee or Paypal.
[](https://paypal.me/faanskit)