An ioBroker adapter for sonnen batterys.
MIT License
===========================
The developers of this module are in no way endorsed by or affiliated with sonnen GmbH, or any associated subsidiaries, logos or trademarks.
From version 1.8.0 on, the adapter comes with a vis widget. The widget only works with the port 8080 API.
You can either install the adapter via the ioBroker web interface or on your local machine via npm.
Navigate into your iobroker folder and execute the following command:
npm i iobroker.sonnen
Additional to the adapter installation you have to add an instance of the adapter.
Here you can find a description of the states and how to use them. The most states of this adapter are read-only states. Note, that there are two different sonnen API's so if you are missing states, they are probably not supported.
Note: The old and legacy API states (API port 3480/7979) are currently not or only partially documented
With API v2 the new channel configurations can be used, for write states you can also change the configuration, like Operating Mode.
info.connection
Data type | Permission |
---|---|
boolean | R |
Read-only boolean which is true if the adapter is connected to the battery.
info.lastSync
Data type | Permission |
---|---|
timestamp | R |
Read-only timestamp w. r. t. the last successful synchronization time.
info.configuration
Data type | Permission |
---|---|
string | R |
Read-only JSON string, which contains configuration information of your battery.
Only API v1, v2 has the channel configurations
info.powerMeter
Data type | Permission |
---|---|
string | R |
Read-only JSON string, which contains power metering information of your battery.
info.inverter.*
Data type | Permission |
---|---|
number | R |
Read-only number, which contains inverter information of your battery.
info.ios.*
Data type | Permission |
---|---|
boolean | R |
Read-only boolean which contains discrete IO information of your battery.
status.consumption
Data type | Permission |
---|---|
number | R |
Read-only number, which represents the current consumption of your house in watts.
status.production
Data type | Permission |
---|---|
number | R |
Read-only number, which represents the current production of you photovoltaics system in watts.
status.pacTotal
Data type | Permission |
---|---|
number | R |
Read-only number, which represents the inverter AC Power in watts. If the value is greater than 0 the battery is discharging, if less than zero it is charging.
status.relativeSoc
Data type | Permission |
---|---|
number | R |
Read-only number, which represents the state of charge of your battery in percent.
status.userSoc
Data type | Permission |
---|---|
number | R |
Read-only number, which represents the state of charge of your battery in percent.
status.acFrequency
Data type | Permission |
---|---|
number | R |
Read-only number, which represents the AC Frequency in hertz.
status.acVoltage
Data type | Permission |
---|---|
number | R |
Read-only number, which represents the current AC voltage of your inverter.
status.batteryVoltage
Data type | Permission |
---|---|
number | R |
Read-only number, which represents the current DC voltage of the battery.
status.systemTime
Data type | Permission |
---|---|
date | R |
Read-only ISO date, which represents the system time of your battery.
status.systemInstalled
Data type | Permission |
---|---|
boolean | R |
Read-only boolean indicator. True if system is installed otherwise false.
status.batteryCharging
Data type | Permission |
---|---|
boolean | R |
Read-only boolean indicator. True if battery is charging, otherwise false.
status.flowConsumptionBattery
Data type | Permission |
---|---|
boolean | R |
Read-only boolean indicator. True if you are consuming from battery, otherwise false.
status.flowConsumptionGrid
Data type | Permission |
---|---|
boolean | R |
Read-only boolean indicator. True if you are consuming from grid, otherwise false.
status.flowConsumptionProduction
Data type | Permission |
---|---|
boolean | R |
Read-only boolean indicator. True if you are consuming from your current production, otherwise false.
status.flowGridBattery
Data type | Permission |
---|---|
boolean | R |
Read-only boolean indicator. True if grid charges battery, otherwise false.
status.flowProductionBattery
Data type | Permission |
---|---|
boolean | R |
Read-only boolean indicator. True if production charges battery, otherwise false.
status.flowProductionGrid
Data type | Permission |
---|---|
boolean | R |
Read-only boolean indicator. True if production flows into grid, otherwise false.
status.gridFeedIn
Data type | Permission |
---|---|
number | R |
Read-only number, which represents the amount of watts consuming from or feeding in grid. If the number is positive you are feeding the grid, if negative you are consuming from grid.
status.onlineStatus
Data type | Permission |
---|---|
boolean | R |
Read-only boolean which is true if your sonnen battery is online.
status.systemStatus
Data type | Permission |
---|---|
string | R |
Read-only string, which indicates if the battery is connected to the grid.
control.charge
Data type | Permission |
---|---|
number | R/W |
Number-value which allows you to control the charging rate of the battery in watts. If you set garbage here it will also be acknowledged, because acknowldging just means that the battery received your command. The corresponding value of the setpoint is kept until the battery receives a new charging or discharging value. If VPP is active, the request will be rejected.
Example:
setState('sonnen.0.control.charge', 1250); // Do not charge more than 1250 watts
control.discharge
Data type | Permission |
---|---|
number | R/W |
Number-value which allows you to control the discharging rate of the battery in watts. If you set garbage here it will also be acknowledged, because acknowldging just means that the battery received your command. The corresponding value of the setpoint is kept until the battery receives a new charging or discharging value. If VPP is active, the request will be rejected.
Example:
setState('sonnen.0.control.discharge', 1250); // Do not discharge more than 1250 watts
This channel has two subchannels, e.g. 4_1
and 4_2
where one represents consumption and the other one production.
E.g. 4_1.kwh_imported
represents the overall production since installation of the battery.
The both channels have the identical states. All states are read-only numbers.
The channel consists of read-only states of type number
, providing information about the inverter of your battery.
The channel consists of read-only states of type boolean
, providing information about the discrete IO states of your battery.
The channel allows reading and writing configuration values of the battery.
The channel provides battery specific information like the number of cycle count.
battery.balanceChargeRequest
(closes #258)configurations.SH_HeaterOperatingMode'
battery.cyclecount
state (closes #194)ios
and inverter
endpointslatestData.dcShutdownReason
(closes #213)info.lastSync
and status.systemTime
are now type numberios
endpoint to support both API versionslatestData
endpoint providing eclipse LED status and time since last full chargestatus.systemStatus
to indicate if the battery is connected to the grid (closes #139)The MIT License (MIT)
Copyright (c) 2018-2024 Moritz Heusinger [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.