Dokumentation DE
Documentation EN
Initially targeted at the Senec Home V2.1 System. In the Senec.Home system, only selected values can be changed by the adapter. Use of this functionality is at your own risk and must be activated manually in the configuration beforehand. Senec currently also no longer provides a reliable way to influence peak shaving via the web interface. For this purpose, mein-senec.de must be used. Whether other systems (e.g. V3) also work with it depends on whether they are also based on lala.cgi and provide the same JSON information. Even with integration into the Senec.Clound it is not guaranteed that the data can still be retrieved via the web interface (for this please report your experiences).
Adapter supports local polling via lala.cgi and polling via Web API.
Systems that might work:
- Senec Home 4.0, 6.0, 8.0, 10.0 / Blei
- Senec Home 5.0, 7.5, 10.0, 15.0 / Lithium
- Senec Home V2 5.0, 7.5, 10.0
- Senec Home V2.1
- Senec.Home V3
- Senec.Home V4
- Senec Business 30.0 / Blei
- Senec Business V2 30.0 / Blei
- Senec Business 25.0 / Lithium
- Senec Business V2_2ph / Lithium
- Senec Business V2 3ph / Lithium
- ADS Tec
- OEM LG
- Solarinvert Storage 10.0 / Blei
SENEC Systems that don't provide a local webinterface might be monitored by using the API functionality only. Please contact the developer if you have any input on this.
All product and company names or logos are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them or any associated subsidiaries! This personal project is maintained in spare time and has no business goal.
Here you can find a description of the states (list is incomplete) and how to use them. All states of this adapter are read-only states.
-
info.connection
Data type Permission boolean R Read-only boolean which is true if the adapter is connected to the senec system.
This channel contains values polled from SENEC App-API.
-
MODULES_CONFIGURED
Data type Permission number R Read-only number, which represents the number of modules currently configured in the system.
-
MODULE_COUNT
Data type Permission number R Read-only number, which represents the number of modules currently known the system (incl. non-configured).
-
GUI_BAT_DATA_CURRENT
Data type Permission number R Read-only number, which represents the battery's current in Amps.
-
GUI_BAT_DATA_FUEL_CHARGE
Data type Permission number R Read-only number, which represents the current level of your battery system in %.
-
GUI_BAT_DATA_VOLTAGE
Data type Permission number R Read-only number, which represents the battery's current voltage in volt.
-
GUI_BAT_DATA_POWER
Data type Permission number R Read-only number, which represents how much power is coming from / going into the battery in Watts. Negative values are discharging.
-
GUI_CHARGING_INFO
Data type Permission boolean R Read-only boolean, which represents if the battery is currently charging.
-
GUI_GRID_POW
Data type Permission number R Read-only number, which represents the power currenty coming from / going into the grid in Watts. Negative values are sending into the grid.
-
GUI_HOUSE_POW
Data type Permission number R Read-only number, which represents the power in Watts currently consumed by the house.
-
GUI_INVERTER_POWER
Data type Permission number R Read-only number, which represents the current power supplied by your PV system.
-
STAT_HOURS_OF_OPERATION
Data type Permission number R Read-only number, detailing the system's uptime in hours.
-
STAT_STATE
Data type Permission number R Read-only number, which represents the system's state.
-
STAT_STATE_Text
Data type Permission string R Read-only string, which represents the system's state in human readable format (sorry - we only have the german states from senec).
-
NPU_IMAGE_VERSION
Data type Permission number R Read-only number, representing the Revision NPU-IMAGE
-
NPU_VER
Data type Permission number R Read-only number, representing the Revision NPU-REGS
-
UPDATE_AVAILABLE
Data type Permission boolean R boolean-value which is true if there is an update available (Updates happen automatically and are scheduled by SENEC).
-
APPLICATION_VERSION
Data type Permission string R Read-only text, representing the Revision MCU
-
CONFIG_LOADED
Data type Permission boolean R boolean-value which is true if configuration is loaded. This being false is very unlikely and it shouldn't persist as false.
-
INTERFACE_VERSION
Data type Permission string R Read-only text, representing the Revision GUI
-
SETUP_NUMBER_WALLBOXES
Data type Permission number R Read-only number, which designates how many wallboxes are configured in the system.
-
SETUP_WALLBOX_SERIAL[0..3]
Data type Permission number R Read-only number, which designates the number of wallbox [0..3]. This is only available on systems with configured wallboxes.
- STATISTIC
- Display
- _calc (not relevant anymore since we lost STATISTIC)
- BAT1OBJ[2-4]
Maintenance of this adapter can be quite time consuming. If you wish to thank the author, please use these links:
- (copilot) Adapter requires node.js >= 22 now
- Dependency updates
- Clamping end-dates to current time if they are in the future to avoid issues with API
- Dependency updates
- Updated iobroker\testing-action-* versions
- Rewrote AllTime History Rebuild: We should now be able to rebuild AllTime History even if the senec server struggles with timeouts. Warning! Rebuild will take considerable time now depending on the server. Current state of rebuild will be reported to log (info).
- You will now need to supply the installation year of your appliance upon AllTime History rebuild if you don't want empty yearly folders in the measurements path for yours you don't have data.
- More comprehensive logging on what is being polled from API.
- Better debug-logging for polling
- Increased default API poll interval to 6 minutes. This appears to be causing less issues with the server than 5 minutes.
- You can now define different polling intervals for dashboard (frequently), details (usually hourly and daily information), heavy (for everything else that usually is done per month or year).
Please be careful with high frequency polling as this can and will lead to problems and the senec server will stop responding to your requests. Longer delays between polls are preferred. - Dependency updates
- Code optimizations
- Added control.RebootAppliance to initiate appliance reboot. Only works if local lala.cgi is available and connected. Function requires extra permission via adapter settings. Please use responsible!
- We are now revealing that an ioBroker integration is accessing the API per default (UserAgent is set to 'integration'). Please consider leaving that to 'integration' so SENEC knows there are many users using the ioBroker integration. If you don't want this or experience issues with 'integration' UserAgent, check settings and revert UserAgent to 'Browser' or define your 'custom' UserAgent.
- Fixed incremential back-off for local polling.
- Moved local appliance control settings into own tab.
- Concurrency for API requests can now be controlled via settings. Please be cautious! Senec API is fragile. Go with 1 concurrent request if you experience issues.
- You can now enable diagnostics for api-request-queue. You can log them to 'info' log or have them in _api.diagnostics.queue.*
- Reduced local polling interval for lowPrio to 5 minutes.
- UI now hides unavailable options.
- Added option to remove API log spam. If you don't need to know every few minutes we are refreshing tokens or polling the API: Deactivate it.
- Partial code rewrite (you can now safely have several instances of adapter - if you ever wanted)
- Dependency updates
- Connection type now is "cloud" (ioBroker internal setting) - although we still support local interaction (if possible per individual appliance)
- Dependency updates
- Clearly indicating that initial API login busted and adapter will turn off API polling until restart
- Certain warnings moved to debug (as they are pretty much for debug purposes only)
- Made usage of axios-cookiejar-support ESM compatible (dynamic import). Solves issues with node 22.
- RND made node22+ safe.
- Code optimizations
- Optimizations in Token Refesh Szenarios
- Optimizations in case of authentication issues
- Persisted RefreshToken across adapter restarts (less logins)
- Reworded errors/warning messages
- Dependency updates
- fixed typo that made today/hourly today/horly. You can safely delete the horly branch Measurements/Daily/horly
- Updated delay for token refresh (it can be up to 2 min now).
- Exponential backoff, if all systems cannot get polled. If at least 1 system can be polled we resume normal action. Now - if all systems fail polling (like 1 if you only have 1) this would be example backoff times for a 5min base interval: 1 Failure -> 0-10 min, 2 Failure -> 0-20 min, 3 Failures -> 0-40 min, 4+ Failures -> 0-40 min. Once polling works again we will resume normal operations.
- API uses its own backoff settings when polling. You can only configure delay between polls. Instead we are using strategy used by: AWS SDK, Google Cloud SDK, Stripe API client, Kubernetes controllers or Distributed message brokers to prevent: retry storms, thundering herd, burst collapse after outage recovery, adapter lockups or permanent dead loops. This leads to: IF (SENEC API down for 2 hours, or Token refresh fails 20 times, or 429 rate limiting kicks in, or Internet drops temporarily) ? (Never dies, never overlaps, never floods API, always recovers)
- API polling no longer honors retries-setting. It will just keep backing off exponentially if errors persist -> we keep trying until you stop the adapter.
- Using Token-Refresh strategy. No unnecessary logins anymore.
- 401 won't throw warning anymore
- ReAuth shouldn't stop polling anymore
- AuthToken in _api is no longer used. You can safely delete it.
- Decoupled frequencies to lower API load. Every poll: Dashboard and today values; Once per day: Yesterday, Monthly, Yearly values (we reduce load by about 65% compared to polling everything every time)
- AccessToken logic centralized
- True Single Flight Token refresh (avoiding duplicate logins, duplicate login storms)
- Avoiding overlapping Polls
- exponential backoff on auth failure
- retry backoff
- proper lifecycle safety
- Automatic 401 retry
- Fixing issues with polling from senec api when token expires
- Old entries in changelog moved to old.
- Senec changed login procedure (again). Adapter now also works with 2-stage login where senec asks for username/email first and password second.
- Dependency updates
- Measurements for today and yesterday are also available by the hour
- Measurements for month and previous month are also available by day
- Measurements for year are also available by month
- Unit calculation fixed if we don't know the unit yet per state_attr.js
- Added definitions for cascadeDevicesCount and mode
- Dependency update
- Migrated to i18n
- Update handling of "new" states that are just an "extra" to an existing state like state and state.1 or state.42
- Dependency Updates
- Fixed: History rebuild will only run once now when requested (remember: To force rebuild you need to configure this in settings)
- Polling yearly measurements as year from API - not months (and summing them up)
- Added back AllTimeHistory with BATTERY_LEVEL_IN_PERCENT averaged and AUTARKY_IN_PERCENT calculated
- Removed selection to use https or http for lala.cgi. https is enforced now.
- reading all previous years (up to inception of SENEC) added again (to make this happen: activate recalculation of full history via settings)
- added today / yesterday again
- optimizations for measurements handling
- less log noise
- more silencing log messages
- housekeeping
- fixed datatype for WIZARD.SG_READY_CURR_MODE
- less logging (moved some info to debug again)
- Complete rewrite of the Senec API functionality. Thanks to @timfxtones for pointing me in the right direction
- No longer using the web-interface at mein-senec.de - it didn't work properly on the long run ...
- Still missing some datapoints so far. They will be implemented in the future.
- Updated to use new SENEC API via mein-senec.de - Thanks to @maett81
- Some code and dependency housekeeping
MIT License
Copyright (c) 2020-2026 Norbert Bluemle github@bluemle.org
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.