Skip to content

Commit abb4b91

Browse files
authored
Initial version with inverter device and several entities (#8)
1 parent bbdab7a commit abb4b91

File tree

17 files changed

+656
-654
lines changed

17 files changed

+656
-654
lines changed

README.md

Lines changed: 31 additions & 178 deletions
Original file line numberDiff line numberDiff line change
@@ -2,210 +2,63 @@
22

33
This is very initial version of the Solis Cloud Control API integration for Home Assistant.
44
It allows you to read and control various settings of your Solis inverter.
5-
Doesn't support sensors, switches, or other entities yet - only basic read and control actions crafted for automations.
65

76
See [issue tracker](https://github.com/mkuthan/solis-cloud-control/issues) for further plans.
87

9-
## Local run
8+
## Installation
109

11-
Configure Solis Cloud Control API credentials in `secrets.yaml`:
10+
The integration is not currently available in [HACS](https://www.hacs.xyz/). However, you can install it manually by following these steps:
1211

13-
```yaml
14-
solis_api_key: "YOUR_API_KEY_HERE"
15-
solis_token: "YOUR_TOKEN_HERE"
16-
solis_inverter_sn: "YOUR_INVERTER_SN_HERE"
17-
```
18-
19-
Install dependencies (once):
12+
Clone the repository into your Home Assistant filesystem:
2013

2114
```bash
22-
uv sync
15+
git clone https://github.com/mkuthan/solis-cloud-control.git
2316
```
2417

25-
Run the integration locally:
18+
Create a symlink to the `custom_components` directory:
2619

2720
```bash
28-
./scripts/run
29-
```
30-
31-
## Read inverter settings
32-
33-
Storage Mode
34-
35-
```yaml
36-
action: solis_cloud_control.read
37-
data:
38-
cid: 636
21+
ln -s solis-cloud-control/custom_components custom_components/solis_cloud_control
3922
```
4023

41-
Charge Time Slot 1
42-
43-
```yaml
44-
action: solis_cloud_control.read
45-
data:
46-
cid: 5946
47-
```
24+
Restart Home Assistant and search for "Solis Cloud Control" in the integrations page.
4825

49-
Charge Time Slot 1 Current
26+
> [!TIP]
27+
> For updates on HACS availability, see [issue #7](https://github.com/mkuthan/solis-cloud-control/issues/7).
5028
51-
```yaml
52-
action: solis_cloud_control.read
53-
data:
54-
cid: 5948
55-
```
29+
## Configuration
5630

57-
Charge Time Slot 1 Battery SOC
31+
Configure Solis Cloud Control integration with:
5832

59-
```yaml
60-
action: solis_cloud_control.read
61-
data:
62-
cid: 5928
63-
```
33+
* Solis API key
34+
* Solis Token
35+
* Solis Inverter Serial Number
6436

65-
Discharge Time Slot 1
37+
## Features
6638

67-
```yaml
68-
action: solis_cloud_control.read
69-
data:
70-
cid: 5964
71-
```
39+
![Inverter Controls](inverter-controls.png)
7240

73-
Discharge Time Slot 1 Current
41+
### Functional
7442

75-
```yaml
76-
action: solis_cloud_control.read
77-
data:
78-
cid: 5967
79-
```
43+
* ⚡ Storage Modes: "Self-Use", "Feed-In Priority"
44+
* 🛠️ "Battery Reserve" and "Allow Grid Charging" options as Storage Mode attributes
45+
* ⏱️ Charge/Discharge Slots
46+
* 🔋 Battery Reserve SOC, Over Discharge SOC and Force Charge SOC
8047

81-
Discharge Time Slot 1 Battery SOC
82-
83-
```yaml
84-
action: solis_cloud_control.read
85-
data:
86-
cid: 5965
87-
```
88-
89-
## High-level inverter control
90-
91-
Set Self-Use Mode - Battery Reserve On, Grid Charging Off:
92-
93-
```yaml
94-
action: solis_cloud_control.set_storage_mode
95-
data:
96-
storage_mode: Self Use
97-
battery_reserve: "ON"
98-
allow_grid_charging: "OFF"
99-
```
100-
101-
Set charge time slot:
102-
103-
```yaml
104-
action: solis_cloud_control.set_charge_time_slot
105-
data:
106-
time_slot: "11:00-13:00"
107-
current: "90"
108-
battery_soc: "80"
109-
```
110-
111-
Set discharge time slot:
112-
113-
```yaml
114-
action: solis_cloud_control.set_discharge_time_slot
115-
data:
116-
time_slot: "11:00-13:00"
117-
current: "90"
118-
battery_soc: "80"
119-
```
120-
121-
Disable charge time slot:
122-
123-
```yaml
124-
action: solis_cloud_control.disable_charge_time_slot
125-
```
48+
* 📦 Batch reading of all inverter settings in a single request to fit within the API limits
49+
* 🔄 Retry logic for API requests to mitigate API stability issues
50+
* 🏡 Best Home Assistant practices for integration development 😜
12651

127-
Disable discharge time slot:
52+
## Local Development
12853

129-
```yaml
130-
action: solis_cloud_control.disable_discharge_time_slot
131-
```
132-
133-
## Low-level inverter control
134-
135-
### Control storage mode
136-
137-
Self-Use Mode - Battery Reserve On, Grid Charging Off:
138-
139-
```yaml
140-
action: solis_cloud_control.control
141-
data:
142-
cid: 636
143-
value: "17"
144-
```
145-
146-
Feed-In Priority Mode - Battery Reserve On, Grid Charging Off:
147-
148-
```yaml
149-
action: solis_cloud_control.control
150-
data:
151-
cid: 636
152-
value: "80"
153-
```
154-
155-
### Control charge time slot
156-
157-
Set Charge Time Slot 1:
158-
159-
```yaml
160-
action: solis_cloud_control.control
161-
data:
162-
cid: 5946
163-
value: "11:00-13:00"
164-
```
165-
166-
Set Charge Time Slot 1 Current:
167-
168-
```yaml
169-
action: solis_cloud_control.control
170-
data:
171-
cid: 5948
172-
value: "90"
173-
```
174-
175-
Set Charge Time Slot 1 Battery SOC:
176-
177-
```yaml
178-
action: solis_cloud_control.control
179-
data:
180-
cid: 5928
181-
value: "80"
182-
```
183-
184-
### Control discharge time slot
185-
186-
Set Discharge Time Slot 1:
187-
188-
```yaml
189-
action: solis_cloud_control.control
190-
data:
191-
cid: 5964
192-
value: "11:00-13:00"
193-
```
194-
195-
Set Discharge Time Slot 1 Current:
54+
Install dependencies (once):
19655

197-
```yaml
198-
action: solis_cloud_control.control
199-
data:
200-
cid: 5967
201-
value: "90"
56+
```bash
57+
uv sync
20258
```
20359

204-
Set Discharge Time Slot 1 Battery SOC:
60+
Run the integration locally:
20561

206-
```yaml
207-
action: solis_cloud_control.control
208-
data:
209-
cid: 5965
210-
value: "80"
62+
```bash
63+
./scripts/run
21164
```

config/configuration.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
1-
# Loads default set of integrations. Do not remove.
21
default_config:
32

4-
# Load frontend themes from the themes folder
5-
frontend:
6-
themes: !include_dir_merge_named themes
7-
8-
automation: !include automations.yaml
9-
script: !include scripts.yaml
10-
scene: !include scenes.yaml
11-
123
logger:
134
default: error
145
logs:
156
custom_components.solis_cloud_control: debug
16-
17-
solis_cloud_control:
18-
api_key: !secret solis_api_key
19-
token: !secret solis_token
20-
inverter_sn: !secret solis_inverter_sn

0 commit comments

Comments
 (0)