===========================
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.
- Open your ioBroker web interface in a browser (eg: 192.168.30.70:8081)
- Click on Tab "Adapters"
- Type "sonnen" in the filter
- Click on the three points and then on the "+" symbol of the sonnen adapter
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.
- Open your ioBroker interface in a browser (eg: 192.168.1.33:8081)
- Navigate to Tab "Adapters"
- Click on the three points and then on the "+" symbol of the sonnen adapter
- Now you can see the main settings of the adapter configuration page --> type in the ip-address of your sonnen battery. It is also strongly recommended, to provide an API key, which can be found in the webinterface of your sonnen battery (Tab: Software Integration). Otherwise, the adapter uses the unofficial API.
- If you want to change the interval in which the states are polled, click on the tab "Advanced Settings"
- You can set the poll interval between 2000 ms (2 seconds) and 60000 ms (1 minute), the default value is 7 seconds
- If you want to avoid requests from your battery to the sonnen server, you can deactivate the online status polling (only relevant for 8080 API - e.g. eco8 and newer)
- Click on Save & Close
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.
- (foxriver76) fixed detection of legacy API
- (foxriver76) added new inverter and powermeter states
- (foxriver76) sync brightness status of eclipse led
- (foxriver76) fixed issue with eclipse led status (closes #293)
- (foxriver76) added state
battery.balanceChargeRequest
(closes #258)
- (foxriver76) added two GPIOs for CHP status
- (foxriver76) added state list for
configurations.SH_HeaterOperatingMode'
- (foxriver76) marked some datapoints as read-only and fixed state types
- (foxriver76) fixed crash if v2 configurations endpoint is not available (closes #228)
- (foxriver76) internal optimizations (Axios port)
- (foxriver76) internal optimization (ES6 class)
- (foxriver76) added
battery.cyclecount
state (closes #194)
- (foxriver76) full port to v2 API (Software Version >= 1.8.7)
- (foxriver76) brings back
ios
andinverter
endpoints - (foxriver76) configuration request is now handled by a single call instead of one for each attribute
- (foxriver76) we fixed a lot of state roles
- (foxriver76) implemented new state
latestData.dcShutdownReason
(closes #213)
- (foxriver76) minor performance optimization
- (foxriver76)
info.lastSync
andstatus.systemTime
are now type number - (foxriver76) implemented silent fail on
ios
endpoint to support both API versions
- (foxriver76) added
latestData
endpoint providing eclipse LED status and time since last full charge
- (foxriver76) readded widget (closes #189)
- (foxriver76) fixed issue with data types of configuration
- (foxriver76) we now use the V2 API for the powermeter endpoint
- (foxriver76) we have ported the code to TypeScript
- (foxriver76) added configuration for V2 API, including ability to change it via adapter
- (foxriver76) added
status.systemStatus
to indicate if the battery is connected to the grid (closes #139)
- (rivengh) added battery discrete io states
- (foxriver76) make requesting online status optional for 8080 api (closes #76)
- (foxriver76) fix for horizontal flow animations in Safari (broken with 1.9.4)
- (foxriver76) widget: make the svg smaller by using a flexbox to center the svg correctly inside the div
- (foxriver76) also poll the configuration instead of updating it only once at start (closes #70)
- (foxriver76) fix for legacy API
- (foxriver76) use legacy API if old API is not completely implemented
- (foxriver76) we now also support the legacy API (port 3480)
- (foxriver76) switch from intervals to timeouts to avoid overlapping poll runs
- (foxriver76) widget: we removed debug logging and unnecessary template functions
- (foxriver76) widget: we now cache the jquery selectors to improve the performance
- (foxriver76) widget: stroke width can now be configured
- (foxriver76) widget: we made ID names more adapter specific to avoid getting wrong translations
- (foxriver76) widget: we now allow defining the used adapter instance
- (foxriver76) widget: css classes now have adapter specific names to avoid conflicts
- (foxriver76) widget now has flow directions
- (foxriver76) added widget
- (foxriver76) we now update objects if attributes are updated, but preserve common.name attribute
- (foxriver76) we fixed some type issues (fixes #58)
- (foxriver76) do not log warnings on inverter endpoint if battery does not support it (closes #55)
- (foxriver76) new channels for powermeter and inverter
- (foxriver76) fixed charge and discharge not working with api v2
- (foxriver76) added support for official api, automatically used when auth token is given by user
- (foxriver76) poll online status always again if not confirmed that there are differences in api (old solution could lead to false negative)
- (foxriver76) more specific error handling
- (foxriver76) check if onlineStatus is supported at adapter start - else do not poll it
- (foxriver76) added online status indicator
- (foxriver76) added more translations
- (foxriver76) optimizations for compact mode
- (foxriver76) introducing new states with power metering and inverter information (supported on :8080 API)
- (foxriver76) only minimum support until we know what users need as states
- (foxriver76) introducing new state with configuration information (supported on :8080 API)
- (foxriver76) support of another sonnen api
- (foxriver76) bugfix for control states
- (foxriver76) add compact mode compatibility
- (foxriver76) use adapter-core module
- (foxriver76) take timezone offset into account on time states
- (foxriver76) formal version increment
- (foxriver76) Enhanced debug logging
- (foxriver76) Prevent crashing when a return code is received
- (foxriver76) Only set info.connection on change
- (foxriver76) Only set states if request was successfull --> prevents adapter crash
- (foxriver76) translations on index_m.html
- (foxriver76) use 7000 as interval if poll interval is undefined
- (foxriver76) fixed links to bugs, repo etc
- (foxriver76) bugfixes on control states
- (foxriver76) big readme update
- (foxriver76) addded more states
- (foxriver76) added advanced settings
- (foxriver76) initial release
The MIT License (MIT)
Copyright (c) 2018-2024 Moritz Heusinger moritz.heusinger@gmail.com
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.