npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

iobroker.sun2000

v2.6.2

Published

sun2000

Downloads

989

Readme

Logo

ioBroker.sun2000

NPM version Downloads Number of Installations Current version in stable repository Documentation Wiki Donate

NPM

Tests: Test and Release

This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers.
For more details and for information how to disable the error reporting see Sentry-Plugin Documentation!

sun2000 adapter for ioBroker

Read and write register data from Huawei SUN2000 inverter and LUNA2000 battery using Modbus TCP. Third-party devices can access via the modbus proxy. Even a Huawei SmartLogger or an Huawei Emma can be integrated.

Huawei product information

Feel free to follow the discussions in the german iobroker forum

Requirements

  • Node.js 22 or higher
  • ioBroker host (js-controller) 6.0.11 or higher
  • ioBroker admin 7.6.20 or higher

Documentation

See the documentation page or browse in the wiki

Supported hardware

  • HUAWEI Inverter SUN2000 Serie (M0,M1,M2 and higher)
  • HUAWEI Smart Dongle-WLAN-FE / min. Softwareversion: V100R001C00SPC133 (SDongleA-05)
  • HUAWEI Luna2000 Battery
  • HUAWEI Smart Power Sensor DTSU666-H or DDSU666-H
  • HUAWEI Smart Logger / min. Softwareversion: V300R023C10SPC311
  • HUAWEI EMMA / min. Softwareversion: V100R024C00SPC101

Feature list

  • Up to 5 inverters (master/slave) supported, each with an optional battery module.

  • Real-time values (input/output power, charge/discharge power, grid consumption) are read at a fixed interval; states are only written on changed data to reduce load on the ioBroker instance.

  • Battery charge control: control charging mode (e.g. "charge from grid"), charging capacity and power.

  • Time-of-Use (TOU) scheduling: define weekly charge/discharge time windows via a simple JSON interface (up to 14 segments/week, German & English day names) — supported for both inverter and EMMA.

  • Force charge/discharge battery: mainly for testing the connected battery.

  • Export Control: limit grid feed-in power (kW or %) where local regulations require it.

  • SmartGuard / grid power control (EMMA): power supply configuration and mains-fault handling registers.

  • modbus-proxy: lets third-party devices (wallbox, energy manager, …) read data even while the inverter's Modbus interface is in use by the adapter, with automatic direct-read fallback if the cached value is missing or stale.

  • Huawei SmartLogger integration for monitoring/managing the PV system.

  • Huawei Emma integration: combines Modbus access, WiFi/Ethernet connectivity and the DDSU/DTSU-666H smart meter in one unit; also supports EV chargers and load control via selected Shelly devices.

  • Huawei Charger via EMMA: chargers are auto-detected and stored under their own path.

  • Statistics: historical data aggregated into hourly/daily/weekly/monthly/annual summaries, plus a configurable live power chart (1–15 min interval), with a user-definable consumption breakdown into sub-categories (e.g. wallbox, heat pump). Visualized via built-in Apache ECharts configurations (customizable templates) or the ioBroker flexcharts adapter.

  • Surplus Power Control: calculates how much self-generated solar power is available for home devices instead of being fed into the grid.

Changelog

2.6.2 (2026-08-23)

  • (bolliy) update devDependencies to latest versions
  • (bolliy) fix: update day-start baseline handling of consumption breakdown

2.6.1 (2026-08-16)

  • (bolliy/claude) Fix: consumption breakdown entries (statistics.dataDef.consumptionBreakdown) the correct daily value in statistics.jsonToday`
  • (bolliy) fix: enhance error handling and validation in device initialization
  • (bolliy) Added: consumption.baseValue field in statistics.json* — holds the unreduced total house consumption before breakdown entries are subtracted.

2.6.0 (2026-07-22)

  • (booliy/claude) Optimization of memory usage
  • (bolliy/claude) Added six new EMMA control registers (#285)
  • (bolliy/claude) Implemented Time-of-Use (TOU)
  • (booliy/claude) modbus-proxy: Direct register reading on cache mismatch

2.5.1 (2026-06-29)

  • (bolliy) fix: update service queue logic (#283)
  • (bolliy) statistics fix: adjust reset handling logic to treat significant drops in value as potential resets

2.5.0 (2026-06-09)

  • (bolliy) statistics: added live power chart (statistics.jsonLive)
  • (bolliy) statistics: consumption breakdown — breakdown values are now subtracted from the total consumption entry so the lower chart panel shows the remainder separately from the breakdown series
  • (bolliy) statistics: xAxisFormatter for the live chart only labels full-hour ticks to avoid clutter
  • (bolliy) statistics: tooltip formatter refactored — formatTooltipValue(unit, negative, decimals) helper used consistently across all series
  • (bolliy) statistics: if no battery is present, the charts are generated without battery information (SOC, charge, discharge).
  • (bolliy) fix emma: update register addresses of meter.activePowerL1-L3 (#282)
  • (bolliy) requires node.js >= 22

Older changelogs can be found there

License

MIT License

Copyright (c) 2025-2026 bolliy [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.