1+ [ ![ hacs_badge] [ hacsbadge ]] [ hacs ] [ ![ hainstall] [ hainstallbadge ]] [ hainstall ]
12# ha_sonnenbatterie
23Homeassistant integration to show many stats of Sonnenbatterie
34that should work with current versions of Sonnenbatterie.
45
56[ ![ Validate with hassfest] ( https://github.com/weltmeyer/ha_sonnenbatterie/actions/workflows/hassfest.yaml/badge.svg )] ( https://github.com/weltmeyer/ha_sonnenbatterie/actions/workflows/hassfest.yaml )
67[ ![ Validate with HACS] ( https://github.com/weltmeyer/ha_sonnenbatterie/actions/workflows/validate.yaml/badge.svg )] ( https://github.com/weltmeyer/ha_sonnenbatterie/actions/workflows/validate.yaml )
78
8- ## Installation
9- Easiest way to install is to add this repository via [ HACS] ( https://hacs.xyz ) .
10-
11- ## Tested working with
9+ ### Tested working with
1210* eco 8.03 9010 ND
1311* eco 8.0 DE 9010 ND
1412* sonnenBatterie 10 performance
1513
1614### Won't work with older Batteries
1715* ex. model 9.2 eco from 2014 not working
1816
17+ ## Installation
18+
19+ ### 1) via HACS
20+ 1 . Add a custom ** integration** repository to HACS using this link:
21+ [ https://github.com/weltmeyer/hasonnenbatterie ] ( https://github.com/weltmeyer/hasonnenbatterie )
22+ > [ !IMPORTANT]
23+ > This is a ** HACS _ integration_ ** , not a ** HASS-IO _ AddOn_ ** , so you <ins >need to have [ HACS] ( https://hacs.xyz ) installed</ins >,
24+ > and you need to add this repository as a custom ** integration repository** to HACS.
25+ 2 . Once the repository is added, use the search bar and type ` sonnenbatterie `
26+ 3 . Use the 3-dot menu to the right of the list entry (not the one at the top bar!) to download/install the integration.
27+ The latest release is automatically selected. Only select a different version if you've been told to do so
28+ by one of the maintainers.
29+ 4 . After you press download and the process has completed, you have to __ Restart Home Assistant__ to install the
30+ dependencies required by the integration
31+ 5 . Setup the ` sonnenbatterie ` custom integration
32+
33+ ### 2) Manual installation
34+
35+ 1 . Using your tool of choice open the directory (folder) where your HA configuration resides, e.g. where the
36+ ` configuration.yaml ` is
37+ 2 . If you don't have a ` custom_components ` directory (folder) there, create it
38+ 3 . In the ` custom_components ` directory (folder) create a new folder called ` sonnenbatterie `
39+ 4 . Download _ all_ the files from the ` custom_components/sonnenbatterie/ ` directory (folder) from this repository
40+ 5 . Place the files you downloaded in the new directory (folder) ` sonnenbatterie ` you created
41+ 6 . Restart Home Assistant
42+ 7 . Setup the sonnenbatterie custom integration as described below (see [ Adding or enabling the integration] ( #adding_or_enabling_the_integration ) )
43+
44+ ## Adding or enabling the integration
45+
46+ > [ !IMPORTANT]
47+ > The integration must be [ installed] ( #installation ) before you can start to add or enable it!
48+
49+ ### 1) My Home Assistant
50+
51+ Just click the following Button to start the configuration automatically:
52+
53+ [ ![ Open your Home Assistant instance and start setting up a new integration.] ( https://my.home-assistant.io/badges/config_flow_start.svg )] [ hainstall ]
54+
55+ ### 2) Manual
56+
57+ - Open the Home Assistant we interface
58+ - Go to ` Configuration -> Integrations ` and click the "Add Integration" button in the lower right corner
59+ - Search for "sonnenbatterie", select the correct entry and click on it
60+ - This starts the configuration of a new Sonnenbatterie instance. Make sure to
61+ - provide the correct IP address of your Sonnenbatterie within your network
62+ - set the update interval to a reasonable value
63+
1964## Sensors
2065The main focus of the integration is to provide a comprehensive set of sensors
2166for your SonnenBatterie. Right after installation the most relevant sensors
@@ -30,6 +75,13 @@ are already activated.
3075Since version 2025.01.01 this integration also supports actions you can use to
3176set some variables that influence the behaviour of your SonnenBatterie.
3277
78+ > [ !NOTE]
79+ > All actions require you ro provide a ` device_id ` to correctly identify the
80+ > Sonnenbatterie you want to talk to. To find the device id for your Sonnenbatterie
81+ > use the developer tools provided by Home Assistant. Just open the "Actions" tab
82+ > and select an action an a device. Then switch to YAML mode where instead of the
83+ > user-friendly name the device id will be displayed.
84+
3385Currently supported actions are:
3486
3587### <a name =" set_operatingmode " ></a >` set_operating_mode(mode=<mode>) `
@@ -43,6 +95,7 @@ Currently supported actions are:
4395``` yaml
4496action : sonnenbatterie.set_operating_mode
4597data :
98+ device_id : " <your sb instance's device id>"
4699 mode : " automatic"
47100` ` `
48101
@@ -73,6 +126,7 @@ An `int` representing the mode that has been set:
73126` ` ` yaml
74127action: sonnenbatterie.charge_battery
75128data:
129+ device_id: "<your sb instance's device id>"
76130 power: 0
77131` ` `
78132
@@ -103,6 +157,7 @@ otherwise.
103157` ` ` yaml
104158action: sonnenbatterie.discharge_battery
105159data:
160+ device_id: "<your sb instance's device id>"
106161 power: 0
107162` ` `
108163
@@ -119,6 +174,7 @@ otherwise.
119174` ` ` yaml
120175action: sonnenbatterie.set_battery_reserve
121176data:
177+ device_id: "<your sb instance's device id>"
122178 value: 10
123179` ` `
124180
@@ -158,12 +214,13 @@ An integer representing the current value of "battery reserve"
158214` ` ` yaml
159215action: sonnenbatterie.set_config_item
160216data:
217+ device_id: "<your sb instance's device id>"
161218 item: "EM_USOC"
162219 value: "10"
163220` ` `
164221# #### Response
165222` ` ` json
166- {' EM_USOC': '10' }
223+ {" EM_USOC": "10" }
167224` ` `
168225
169226# ## <a name="set_tou_schedule"></a>`set_tou_schedule(schedule=<schedule_array>)`
@@ -191,13 +248,14 @@ data:
191248` ` ` yaml
192249action: sonnenbatterie.set_tou_schedule_string
193250data:
251+ device_id: "<your sb instance's device id>"
194252 schedule: '[{"start":"10:00", "stop":"10:00", "threshold_p_max": 20000}]'
195253` ` `
196254
197255# #### Result
198256` ` ` json
199257{
200- "schedule": ' [{"start": "10:00", "stop": "10:00", "threshold_p_max": 20000}]'
258+ "schedule": [{"start": "10:00", "stop": "10:00", "threshold_p_max": 20000}]
201259}
202260` ` `
203261
@@ -207,12 +265,15 @@ data:
207265# #### Code snippet
208266` ` ` yaml
209267action: sonnenbatterie.get_tou_schedule
210- data: {}
268+ data:
269+ deviceid: "<your sb instance's device id>"
211270` ` `
212271
213272# #### Result
214- ` ` ` yaml
215- schedule: "[{\" start\" :\" 10:00\" , \" stop\" :\" 10:00\" , \" threshold_p_max\" : 20000}]"
273+ ` ` ` json
274+ {
275+ "schedule": [{"start": "10:00", "stop": "10:00", "threshold_p_max": 20000}]
276+ }
216277` ` `
217278
218279# # Problems and/or unused/unavailable sensors
@@ -233,3 +294,10 @@ Please put those logs along with the setting you want monitored into
233294
234295# # Screenshots :)
235296
297+
298+ ---
299+ [hacs] : https://hacs.xyz
300+ [hacsbadge] : https://img.shields.io/badge/HACS-Custom-orange.svg?style=for-the-badge&logo=homeassistantcommunitystore&logoColor=ccc
301+
302+ [hainstall] : https://my.home-assistant.io/redirect/config_flow_start/?domain=sonnenbatterie
303+ [hainstallbadge] : https://img.shields.io/badge/dynamic/json?style=for-the-badge&logo=home-assistant&logoColor=ccc&label=usage&suffix=%20installs&cacheSeconds=15600&url=https://analytics.home-assistant.io/custom_integrations.json&query=$.sonnenbatterie.total
0 commit comments