Code Monkey home page Code Monkey logo

iobroker.sma-em's Introduction

ioBroker.sma-em

Logo

ioBroker Adapter for SMA Energy Meter

Number of Installations Downloads Stable version NPM version Tests: Test and Release

NPM

Info

This adapter reads information from SMA Energy Meter (EMETER-20) and Sunny Home Manager 2 (HM-20). It supports the SMA-EMETER-protocol-2. Thus also compatible energy meters from other manufacturers will work.

SMA Energy Meter and Sunny Home Manager 2 multicast datagrams with their energy measurement data to the network once or more times per second. The SMA Energy Meter Adapter receives these multicast messages and stores them as iobroker states.

RELEASE NOTES: Version 1.0.x includes some Breaking Changes:

  • node>=16, js-contoller>=4 and admin>=6 required
    Upgrade your ioBroker to at least this software level, if you want to use this adapter.

  • Configurable Energy Meters per adapter instance
    This feature mainly has been introduced to support ioBroker auto-discovery. Normally, if you do not configure sma-em via auto-discovery you will not have to change anything in the config page because the adapter defaults to serving all reachable Energy Meters like the previous versions did.
    If you update this adapter from a previous version configured for multiple Energy Meters and decide to have only one Energy Meter in this instance from now on, just enter the IP of the desired Energy Meter. Do not forget to delete the objects in the object tree belonging to the other Energy Meters since their values will not be updated anymore. Of course you can create new instances of sma-em, one for each of these other Energy Meters.

  • Selectable own network device IP to listen for multicast messages
    Previous versions of sma-em listen on all available network interfaces for Energy Meter multicasts. This results in problems when ioBroker hosts have network interfaces with multiple IP addresses or multiple interfaces in the same network. For example, a typical configuration might have eth0 and wlan0 both assigned to the same network. In this case Energy Meter multicasts arrive on both interfaces, thus effectively doubling the message rate and in some cases halve the realtime values.
    Although for compatibilty reasons the option to listen on all network interface IPs is available, one of the own network device IPs should be selected from the new config option by any means to avoid the problems mentioned above. Of course make sure to select an IP from the same network the Energy Meters are sending their multicasts. Please note that for these reasons you are prompted on the config page to explicitely enter the Own IP address even when you update the adapter from earlier versions.

  • The objects "last_message" and "TimeTick" were removed
    The objects "last_message" and "TimeTick" were removed from the adapter completely since they generate an excessive load on the iobroker. If the info regarding when some objects's state value was last received and/or updated is needed, it can be read from the timestamps of the objects's state values.
    If you update this adapter from a previous version instead of a new installation, you will find that the states of the objects "last_message" and "TimeTick" will not be updated anymore. In this case you should manually remove these objects from the object tree. The most simple solution to achieve this is to stop the adapter in the instances tab of ioBroker, completely delete the object tree in the objects tab and then restart the adapter. This of course is only neccessary once after the update and is not required if you do a clean new installation. Alternatively you can delete only the objects "last_message" and "TimeTick" from the object tree.

Available State Objects

States

States in non-extended mode

  • Instantaneous values of total active power consumption (pregard) and active power feed-in (psurplus)
  • Energy meter values of total active power consumption (pregardcounter) and active power feed-in (psurpluscounter)
  • Serial Number, SUSyID, Software Version of SMA Energy Meter and Sunny Home Manager
  • Detailed values for each of the individual phases L1 / L2 / L3 (optional):
    • Instantaneous values of active power consumption (pregard) and active power feed-in (psurplus) per phase
    • Energy meter values of active power consumption (pregardcounter) and active power feed-in (psurpluscounter) per phase

States in extended mode

In addition to the states in non-extended mode, the following values are available in extended mode

  • Instantaneous values of total reactive power consumption (qregard) and reactive power feed-in (qsurplus)
  • Energy meter values of total reactive power consumption (qregardcounter) and reactive power feed-in (qsurpluscounter)
  • Instantaneous values of total apparent power consumption (sregard) and apparent power feed-in (ssurplus)
  • Energy meter values of total apparent power consumption (sregardcounter) and apparent power feed-in (ssurpluscounter)
  • cosphi (power factor)
  • grid frequency (only available with Sunny Home Manager 2, SMA Energy Meter currently does not provide the grid frequency value)
  • Detailed for each of the individual phases L1 / L2 / L3 (optional):
    • Instantaneous values of reactive and apparent power consumption/feed-in per phase
    • Energy meter values of reactive and apparent power consumption/feed-in per phase
    • Voltage and current per phase

Configuration Options

Settings

  • Multicast IP: The default setting is 239.12.255.254.
  • Multicast Port: The default setting for the UDP port is 9522.
    (Both should not be changed, as SMA devices always use this IP address and port)
  • Own Network Interface IPs: Select box for all available Network Interface IPv4s on the ioBroker Server.
  • Selected Network Interface IP: Currently selected Network Interface IP listening for Multicast messages. IP 0.0.0.0 means that the adapter listens on all available Network Interfaces (not recommended).
  • Energy Meter IP: IP address of a specific Energy Meter - IP 0.0.0.0 selects all Energy Meters (default)

Settings

  • Details L1 - L3: These selection options can be set to display details of each phase.
  • Extended Mode: Provides more detailed information such as reactive power, apparent power, cosphi, grid frequency, voltage, current.
  • Realtime Update Interval: Update Interval for realtime data like instantaneous values of power consumption (pregard) and power feed-in (psurplus). This setting throttles the update rate of the data points to any value between 1 second up to 30 seconds. The default value is 1 second.
  • Non Realtime Update Interval: Update Interval for non-realtime data like instantaneous values of power consumption (pregardcounter) and power feed-in (psurpluscounter). This setting throttles the update rate of the data points to any value between 30 seconds up to 1 hour (3600 seconds). The default value is 30 seconds.

Changelog

1.0.1 (2024-01-26) - 2024 maintenance release

  • (pdbjjens) Updated dependencies

1.0.0 (2023-08-19)

  • (pdbjjens) Change: node>=16, js-contoller>=4 and admin>=6 required
  • (pdbjjens) Change: Configurable Energy Meters per adapter instance
  • (pdbjjens) Change: Selectable own network device IP to listen for multicast messages
  • (pdbjjens) Change: Objects "last_message" and "TimeTick" were removed
  • (pdbjjens) New: Support ioBroker discovery
  • (pdbjjens) New: Detect SMA-EM 1.0 (SUSy 270)
  • (arteck) New: Detect new SHM 2.0 with SUSy 501
  • (ticaki) Fix: Catch interface errors

0.7.0 (2023-03-14)

  • (pdbjjens) New: Configurable data point update intervals to reduce system load
  • (pdbjjens) New: Use JSON config

0.6.6 (2023-02-28) 2023 maintenance release

  • (pdbjjens) Updated dependencies
  • (pdbjjens) New: Use adapter-dev instead of gulp translate

0.6.5 (2022-02-19)

  • Updated dependencies
  • Compatibility check for js-controller 4.0
  • Prevent onUnload warnings

Legal Notices

SMA and Sunny Home Manager are registered trademarks of SMA Solar Technology AG https://www.sma.de/en.html

All other trademarks are the property of their respective owners.

The authors are in no way endorsed by or affiliated with SMA Solar Technology AG, or any associated subsidiaries, logos or trademarks.

License

The MIT License (MIT)

Copyright (c) 2024 IoBroker-Community

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.

iobroker.sma-em's People

Contributors

andiling avatar apollon77 avatar arteck avatar ctjaeger avatar dependabot-preview[bot] avatar dependabot[bot] avatar dutchmannl avatar germanbluefox avatar mcm1957 avatar pdbjjens avatar ticaki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

iobroker.sma-em's Issues

get state error: DB closed

Describe the bug
When adding the sma-em it generates many warnings like:

  • warn: sma-em.0 (9264) get state error: DB closed or
  • warn: sma-em.0 (9264) get state error: Connection is closed.

The problem also occurrs when stopping or restarting the adapter via the Instance Tab.

To Reproduce
Steps to reproduce the behavior:

  1. delete sma-em (iobroker del sma-em or via Adapter Tab) - optional
  2. add sma-em (iobroker add sma-em or via Adapter Tab)
  3. configure the Adapter via Config Page
  4. alternatively stop or restart the adapter via the Instance Tab
  5. see error log below

Expected behavior
no warnings should be issued since this is a normal procedure

Screenshots & Logfiles
Log file see below

Versions:

  • Adapter version: <v0.6.4>
  • JS-Controller version: <4.0.8>
  • Node version: <12.19.0>
  • Operating system: <Windows 10>

Additional context

2022-02-13 10:25:49.942 - info: host.Jenss-Lifebook(SmartHome) iobroker add sma-em auto --host Jenss-Lifebook(SmartHome)
2022-02-13 10:25:56.671 - info: host.Jenss-Lifebook(SmartHome) iobroker NPM version: 6.14.8
2022-02-13 10:25:56.672 - info: host.Jenss-Lifebook(SmartHome) iobroker Installing [email protected]... (System call)
2022-02-13 10:26:21.247 - info: host.Jenss-Lifebook(SmartHome) iobroker + [email protected]
added 3 packages from 3 contributors and audited 1282 packages in 21.734s
2022-02-13 10:26:22.487 - info: host.Jenss-Lifebook(SmartHome) iobroker
51 packages are looking for funding
2022-02-13 10:26:22.488 - info: host.Jenss-Lifebook(SmartHome) iobroker run npm fund for details
2022-02-13 10:26:22.493 - info: host.Jenss-Lifebook(SmartHome) iobroker found 110 vulnerabilities (25 low, 36 moderate, 46 high, 3 critical)
run npm audit fix to fix them, or npm audit for details
2022-02-13 10:26:22.565 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) install adapter sma-em
2022-02-13 10:26:22.604 - info: host.Jenss-Lifebook(SmartHome) iobroker upload [4] sma-em.admin C:/Program Files/SmartHome5/node_modules/iobroker.sma-em/admin/admin.d.ts admin.d.ts video/mp2t
2022-02-13 10:26:22.695 - info: host.Jenss-Lifebook(SmartHome) iobroker upload [3] sma-em.admin C:/Program Files/SmartHome5/node_modules/iobroker.sma-em/admin/index_m.html index_m.html text/html
2022-02-13 10:26:22.706 - info: host.Jenss-Lifebook(SmartHome) iobroker upload [2] sma-em.admin C:/Program Files/SmartHome5/node_modules/iobroker.sma-em/admin/sma-em.png sma-em.png image/png
2022-02-13 10:26:22.723 - info: host.Jenss-Lifebook(SmartHome) iobroker upload [1] sma-em.admin C:/Program Files/SmartHome5/node_modules/iobroker.sma-em/admin/style.css style.css text/css
2022-02-13 10:26:22.734 - info: host.Jenss-Lifebook(SmartHome) iobroker upload [0] sma-em.admin C:/Program Files/SmartHome5/node_modules/iobroker.sma-em/admin/words.js words.js application/javascript
2022-02-13 10:26:22.761 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object system.adapter.sma-em created/updated
2022-02-13 10:26:22.884 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) create instance sma-em
2022-02-13 10:26:22.890 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object system.adapter.sma-em.0.alive created
2022-02-13 10:26:22.894 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object system.adapter.sma-em.0.connected created
2022-02-13 10:26:22.900 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object system.adapter.sma-em.0.compactMode created
2022-02-13 10:26:22.904 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object system.adapter.sma-em.0.cpu created
2022-02-13 10:26:22.909 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object system.adapter.sma-em.0.cputime created
2022-02-13 10:26:22.913 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object system.adapter.sma-em.0.memHeapUsed created
2022-02-13 10:26:22.918 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object system.adapter.sma-em.0.memHeapTotal created
2022-02-13 10:26:22.922 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object system.adapter.sma-em.0.memRss created
2022-02-13 10:26:22.928 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object system.adapter.sma-em.0.uptime created
2022-02-13 10:26:22.932 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object system.adapter.sma-em.0.inputCount created
2022-02-13 10:26:22.936 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object system.adapter.sma-em.0.outputCount created
2022-02-13 10:26:22.943 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object system.adapter.sma-em.0.eventLoopLag created
2022-02-13 10:26:22.947 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object system.adapter.sma-em.0.sigKill created
2022-02-13 10:26:22.951 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object system.adapter.sma-em.0.logLevel created
2022-02-13 10:26:22.954 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object sma-em.0.info created
2022-02-13 10:26:22.957 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object sma-em.0.info.connection created
2022-02-13 10:26:22.961 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) Set default value of sma-em.0.info.connection: false
2022-02-13 10:26:22.977 - info: host.Jenss-Lifebook(SmartHome) iobroker host.Jenss-Lifebook(SmartHome) object system.adapter.sma-em.0 created
2022-02-13 10:26:24.074 - info: host.Jenss-Lifebook(SmartHome) iobroker exit 0
2022-02-13 10:26:26.444 - info: host.Jenss-Lifebook(SmartHome) instance system.adapter.sma-em.0 started with pid 9264
2022-02-13 10:26:29.194 - info: sma-em.0 (9264) starting. Version 0.6.4 in C:/Program Files/SmartHome5/node_modules/iobroker.sma-em, node: v12.19.0, js-controller: 4.0.8
2022-02-13 10:26:29.244 - info: sma-em.0 (9264) Details L1 false Details L2 false Details L3 false Extended info false
2022-02-13 10:26:29.260 - info: sma-em.0 (9264) Listen via UDP on Device Ethernet with IP 192.168.1.102 on Port 9522 for Multicast IP 239.12.255.254
2022-02-13 10:26:45.548 - info: host.Jenss-Lifebook(SmartHome) stopInstance system.adapter.sma-em.0 (force=false, process=true)
2022-02-13 10:26:45.554 - info: sma-em.0 (9264) Got terminate signal TERMINATE_YOURSELF
2022-02-13 10:26:45.557 - info: sma-em.0 (9264) cleaned everything up...
2022-02-13 10:26:45.558 - info: sma-em.0 (9264) terminating
2022-02-13 10:26:45.560 - info: sma-em.0 (9264) Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason
2022-02-13 10:26:45.554 - info: host.Jenss-Lifebook(SmartHome) stopInstance system.adapter.sma-em.0 send kill signal
2022-02-13 10:26:46.112 - warn: sma-em.0 (9264) redis get sma-em.0.3009872298.sw_version_raw, error - Connection is closed.
2022-02-13 10:26:46.114 - warn: sma-em.0 (9264) get state error: Connection is closed.
2022-02-13 10:26:46.115 - warn: sma-em.0 (9264) get state error: DB closed
2022-02-13 10:26:46.116 - warn: sma-em.0 (9264) get state error: DB closed
2022-02-13 10:26:46.116 - warn: sma-em.0 (9264) get state error: DB closed
2022-02-13 10:26:46.117 - warn: sma-em.0 (9264) get state error: DB closed
2022-02-13 10:26:46.118 - warn: sma-em.0 (9264) get state error: DB closed
2022-02-13 10:26:46.118 - warn: sma-em.0 (9264) get state error: DB closed
2022-02-13 10:26:46.150 - warn: sma-em.0 (9264) redis get sma-em.0.1901426962.sw_version_raw, error - Connection is closed.
2022-02-13 10:26:46.206 - warn: sma-em.0 (9264) get state error: Connection is closed.
2022-02-13 10:26:46.208 - warn: sma-em.0 (9264) get state error: Connection is closed.
2022-02-13 10:26:46.209 - warn: sma-em.0 (9264) get state error: Connection is closed.
2022-02-13 10:26:46.211 - warn: sma-em.0 (9264) get state error: Connection is closed.
2022-02-13 10:26:46.212 - warn: sma-em.0 (9264) get state error: Connection is closed.
2022-02-13 10:26:46.213 - warn: sma-em.0 (9264) get state error: Connection is closed.
2022-02-13 10:26:46.214 - warn: sma-em.0 (9264) get state error: Connection is closed.
2022-02-13 10:26:46.216 - warn: sma-em.0 (9264) get state error: Connection is closed.
2022-02-13 10:26:46.216 - warn: sma-em.0 (9264) get state error: Connection is closed.
2022-02-13 10:26:46.217 - warn: sma-em.0 (9264) get state error: Connection is closed.
2022-02-13 10:26:46.218 - warn: sma-em.0 (9264) get state error: Connection is closed.
2022-02-13 10:26:46.218 - warn: sma-em.0 (9264) get state error: Connection is closed.
2022-02-13 10:26:46.219 - warn: sma-em.0 (9264) get state error: Connection is closed.
2022-02-13 10:26:46.219 - warn: sma-em.0 (9264) get state error: Connection is closed.
2022-02-13 10:26:46.222 - warn: sma-em.0 (9264) get state error: Connection is closed.
2022-02-13 10:26:46.277 - warn: sma-em.0 (9264) redis get sma-em.0.3009872298.sw_version_raw, error - Connection is closed.
2022-02-13 10:26:46.325 - warn: sma-em.0 (9264) get state error: Connection is closed.
2022-02-13 10:26:46.769 - info: host.Jenss-Lifebook(SmartHome) instance system.adapter.sma-em.0 terminated with code 11 (ADAPTER_REQUESTED_TERMINATION)
2022-02-13 10:26:48.657 - info: host.Jenss-Lifebook(SmartHome) instance system.adapter.sma-em.0 started with pid 10496
2022-02-13 10:26:52.565 - info: sma-em.0 (10496) starting. Version 0.6.4 in C:/Program Files/SmartHome5/node_modules/iobroker.sma-em, node: v12.19.0, js-controller: 4.0.8
2022-02-13 10:26:52.595 - info: sma-em.0 (10496) Details L1 false Details L2 false Details L3 false Extended info true
2022-02-13 10:26:52.602 - info: sma-em.0 (10496) Listen via UDP on Device Ethernet with IP 192.168.1.102 on Port 9522 for Multicast IP 239.12.255.254

Node.js v10

Hello after update on Node.js v10.16.3 the adapter does not start anymore.
Log:
log.txt

Explain the output values

Can you please explain each output value (auch gerne auf deutsch) and what is the different between L1, L2 and L3.

Are there values for generated electricity, purchased electricity, consumed electricity and electricity which is feed in?
And can I get these values on a weekly base?

admin.0 "Unsubscribe from all states, except system's..."

Describe the bug
If I choose all four options (L1, L2, L3, Extended Details) the iobroker admin reports: "Unsubscribe from all states, except system's, because over 3 seconds the number of events is over 200 (in last second 0)" when I have the Objects-Tab open. The update of the values in the objects-tab stalls in this case indefinitely long. If I don't have the Objects-Tab open, it does not unsubscribe and even re-subscribes all states automatically. If I choose no options or only extended Details, the admin does not unsubscribe states. Probably this is due to the fact that I have two Devices (SHM and SEM) and that they update all values by the second.

To Reproduce
Steps to reproduce the behavior:
See bug description

Expected behavior
The update rate of the values in the Objects tab should be throttled so that this behaviour can be avoided.
This could be implemented by a configurable debounce time between 1 and 60 sec to reduce system load
(by reducing the setstate load).
The debounce time should be configurable via the Config page. It should allow also the option to have no debounce
since in some cases the raw values are needed in realtime (i.e. update once per second as the datagrams arrive).
Some of the values fluctuate very much (e.g. the power values or frequency).
For power values the debounce values should be computed over the debounce time as a
mean value (=artithmentic average), for frequency median might be better.
For values which must not be averaged (like f.i. the Energy counters like pregardcounter),
only the last value in the last datagram of the debounce period should be written (setstate).
The debounce interval should be aligned with multiples of the datagram repetition time to avoid jitter.
F.i. if the required debounce time is 30 sec, then the average should span over 30 datagrams
(provided the datagram repetition time is 1 sec).

Screenshots & Logfiles
iobroker.2021-02-07.log.zip

Versions:

  • Adapter version: <0.6.3>
  • JS-Controller version: <3.1.6>
  • Node version: <v12.19.0>
  • Operating system: <Windows 10>

Additional context
None

Incorrect display of data points

In Version 0.5.6 the data points voltage and cosphi of the individual phases L1-L3 are shown interchanged and the ampere data points do not work. Has anyone observed the same problem? Greetz Jochen

Edit: Sorry, Issue already reported

This object will not be created in future versions. Please report this to the developer - Details L1 false Details L2 false Details L3 false

Hi there,
I get the following error message. Is the adapter still up-to-date and functional?

host.pi 2021-01-03 17:29:56.211 info Update repository "Stable (default)" under "http://download.iobroker.net/sources-dist.json"
sma-em.0 2021-01-03 17:28:01.488 warn (5740) This object will not be created in future versions. Please report this to the developer.
sma-em.0 2021-01-03 17:28:01.487 warn (5740) Object sma-em.0.1900204704.psurpluscounter is invalid: obj.common.type has an invalid value (state) but has to be one of number, string, boolean, array, object, mixed, file, json
sma-em.0 2021-01-03 17:28:01.477 warn (5740) This object will not be created in future versions. Please report this to the developer.
sma-em.0 2021-01-03 17:28:01.477 warn (5740) Object sma-em.0.1900204704.psurplus is invalid: obj.common.type has an invalid value (state) but has to be one of number, string, boolean, array, object, mixed, file, json
sma-em.0 2021-01-03 17:28:01.475 warn (5740) This object will not be created in future versions. Please report this to the developer.
sma-em.0 2021-01-03 17:28:01.474 warn (5740) Object sma-em.0.1900204704.pregardcounter is invalid: obj.common.type has an invalid value (state) but has to be one of number, string, boolean, array, object, mixed, file, json
sma-em.0 2021-01-03 17:28:01.473 warn (5740) This object will not be created in future versions. Please report this to the developer.
sma-em.0 2021-01-03 17:28:01.472 warn (5740) Object sma-em.0.1900204704.pregard is invalid: obj.common.type has an invalid value (state) but has to be one of number, string, boolean, array, object, mixed, file, json
sma-em.0 2021-01-03 17:28:01.470 warn (5740) This object will not be created in future versions. Please report this to the developer.
sma-em.0 2021-01-03 17:28:01.469 warn (5740) Object sma-em.0.1900204704.SMASerial is invalid: obj.common.type has an invalid value (state) but has to be one of number, string, boolean, array, object, mixed, file, json
sma-em.0 2021-01-03 17:28:01.463 warn (5740) This object will not be created in future versions. Please report this to the developer.
sma-em.0 2021-01-03 17:28:01.462 warn (5740) Object sma-em.0.1900204704 is invalid: obj.common.name has an invalid type! Expected "string" or "object", received "number"
sma-em.0 2021-01-03 17:28:00.689 info (5740) Details L1 false Details L2 false Details L3 false
sma-em.0 2021-01-03 17:28:00.688 info (5740) Listen via UDP on Port 9522 for Multicast IP 239.12.255.254
sma-em.0 2021-01-03 17:28:00.634 info (5740) starting. Version 0.5.7 in /opt/iobroker/node_modules/iobroker.sma-em, node: v10.23.0, js-controller: 3.1.6
host.pi 2021-01-03 17:27:59.008 info instance system.adapter.sma-em.0 started with pid 5740
host.pi 2021-01-03 17:27:56.998 info iobroker exit 0
host.pi 2021-01-03 17:27:55.981 info iobroker host.pi object system.adapter.sma-em.0 created

`
Pi 4 (4.1.11)

Connection lost

Describe the bug
I faced problem now three times that I don't get any updates from SMA EM. Unfortunately I see it only days after, so no log. Connected indicator stays true.

image

Are you aware of this issue?

warn: sma-em.0 (9509) State "sma-em.0.3009872298.pregard" has no existing object

Describe the bug
When the adapter is started, numerous warnings like:
"warn: sma-em.0 (9509) State "sma-em.0.3009872298.pregard" has no existing object, this might lead to an error in future versions"
appear in the iobroker log (see attached logfile).

To Reproduce
The warnings appear at each startup of the adapter. The js-controller version needs to be 3.2.x; the warnings do not appear with js-controller 3.1.x

Expected behavior
No warnings should appear, regardless of js-controller version.
It seems that a setState is done for non-existant states. A create state or extendObjectNotExists seems to be missing.

Screenshots & Logfiles
sma-em-063-errlog.txt

Versions:
Adapter version: <0.6.3>
JS-Controller version: <3.2.16>
Node version: <v12.21.0>
Operating system:

Additional context
None

Logfile Info to developer of JS-Controller 3.0.17

After upgrade of JS-Controller to version 3.0.17 and nodejs v12.16.2 i found this entry in the info Logfile.
Can you correct this please.
Thank you

--
sma-em.0 | 2020-04-23 08:53:34.302 | warn | (25365) This will be refused in future versions. Please report this to the developer.
sma-em.0 | 2020-04-23 08:53:34.302 | warn | (25365) The id 1900014133 has an invalid type!: Expected "string" or "object", received "number".
sma-em.0 | 2020-04-23 08:53:33.804 | warn | (25365) This will be refused in future versions. Please report this to the developer.
sma-em.0 | 2020-04-23 08:53:33.804 | warn | (25365) The id 1900014133 has an invalid type!: Expected "string" or "object", received "number".
sma-em.0 | 2020-04-23 08:53:33.300 | warn | (25365) This will be refused in future versions. Please report this to the developer.

Frequency

Is it also possible to include the datapoint of the mains frequency in the adapter? Thank you

Compatibility check to js-controller 3.3 and Admin5 React UI

Dear Adapter developer,

with js-controller 3.2 and js-controller 3.3 some additional checks were added to make sure that created objects match to the specifications and also written state values match to the object definition.

If something is not correct this is logged as 'warning' or 'info' log.

Please take the time to verify your adapter by ideally starting with a fresh instance and do some actions and verify the log. If you see a warn log there from these checks please adjust the adapter and fix the relevant cases.

For questions please refer to ioBroker/ioBroker.js-controller#1301

Additionally we are preparing Admin 5 which will have a completely rewritten UI. Please install Admin 5, activate that new UI and verify that the configuration of you adapter works as expected also there.

More informations on Admin 5 can be found in Forum https://forum.iobroker.net/topic/44282/test-adapter-admin-5-0-x-alpha-der-neuen-ui

Please close the issue after you checked it.

Thank you very much for your support!

Incorrect values on L1,L2,L3 for Sunny Home Manager 2.0

Describe the bug
L1: always show 5000 Watts
Regardcounters show silly values, sum values are correct

To Reproduce
use Adapter with Sunny Home Manager 2

Expected behavior
correct values also in single phases

Screenshots & Logfiles
If applicable, add screenshots and logfiles to help explain your problem.
image

Versions:

  • Adapter version: 0.5.7

Invalid value (state) is still ongoing :-(

Hi Guy's,
this is my first message in GitHub and also in thisn area :-).
I have installed the iobroker-adapter and it seems still an invalid state in the interface
Bye Arwed

To Reproduce
I have deleted all adapter and new installed. It seems to be reproduceable.

Expected behavior
Hopefully: a bugfixed release... :-)

Screenshots & Logfiles

sma-em.0 2020-05-27 11:43:27.873 warn (1886) This object will not be created in future versions. Please report this to the developer.
sma-em.0 2020-05-27 11:43:27.872 warn (1886) Object sma-em.0.3004911124.psurpluscounter is invalid: obj.common.type has an invalid value (state) but has to be one of number, string, boolean, array, object, mixed, file, json
sma-em.0 2020-05-27 11:43:27.862 warn (1886) This object will not be created in future versions. Please report this to the developer.
sma-em.0 2020-05-27 11:43:27.861 warn (1886) Object sma-em.0.3004911124.psurplus is invalid: obj.common.type has an invalid value (state) but has to be one of number, string, boolean, array, object, mixed, file, json
sma-em.0 2020-05-27 11:43:27.859 warn (1886) This object will not be created in future versions. Please report this to the developer.
sma-em.0 2020-05-27 11:43:27.858 warn (1886) Object sma-em.0.3004911124.pregardcounter is invalid: obj.common.type has an invalid value (state) but has to be one of number, string, boolean, array, object, mixed, file, json
sma-em.0 2020-05-27 11:43:27.857 warn (1886) This object will not be created in future versions. Please report this to the developer.
sma-em.0 2020-05-27 11:43:27.856 warn (1886) Object sma-em.0.3004911124.pregard is invalid: obj.common.type has an invalid value (state) but has to be one of number, string, boolean, array, object, mixed, file, json
sma-em.0 2020-05-27 11:43:27.854 warn (1886) This object will not be created in future versions. Please report this to the developer.
sma-em.0 2020-05-27 11:43:27.853 warn (1886) Object sma-em.0.3004911124.SMASerial is invalid: obj.common.type has an invalid value (state) but has to be one of number, string, boolean, array, object, mixed, file, json
sma-em.0 2020-05-27 11:43:27.849 warn (1886) This object will not be created in future versions. Please report this to the developer.
sma-em.0 2020-05-27 11:43:27.848 warn (1886) Object sma-em.0.3004911124 is invalid: obj.common.name has an invalid type! Expected "string" or "object", received "number"
sma-em.0 2020-05-27 11:43:27.471 info (1886) Details L1 false Details L2 false Details L3 false
sma-em.0 2020-05-27 11:43:27.470 info (1886) Listen via UDP on Port 9522 for Multicast IP 239.12.255.254
sma-em.0 2020-05-27 11:43:27.409 info (1886) starting. Version 0.5.7 in /opt/iobroker/node_modules/iobroker.sma-em, node: v10.20.1, js-controller: 3.1.4

Versions:
/node_modules/iobroker.sma-em, node: v10.20.1, js-controller: 3.1.4

  • Operating system: Raspberry Pi

Bedeutung der States

Kein wirkliches Issue, eher eine Frage: Wo kann man denn herausfinden, was die States bedeuten? Was bedeutet denn "pregard", "psurplus" usw.?

two objects generate log entry permanently

sma-em.0 2021-08-25 14:04:20.659 | info | State value to set for "sma-em.0.xxxxxxx.psurpluscounter" has to be type "state" but received type "number"

sma-em.0 | 2021-08-25 14:04:20.658 | info | State value to set for "sma-em.0.xxxxxx.psurplus" has to be type "state" but received type "number"

Unkown OBIS value

Hallo,

ich bekomme alle 30 Minuten folgende Warnung:

`

sma-em.0 2021-03-05 22:53:45.261 warn (5260) Unkown OBIS value 7401228 found in UDP packet. Skip it and going to the next OBIS value.
sma-em.0 2021-03-05 22:53:45.261 warn (5260) Unkown OBIS value 4194304 found in UDP packet. Skip it and going to the next OBIS value.
sma-em.0 2021-03-05 22:53:45.260 warn (5260) Unkown OBIS value 3195048 found in UDP packet. Skip it and going to the next OBIS value.
sma-em.0 2021-03-05 22:53:45.259 warn (5260) Unkown OBIS value 2097152 found in UDP packet. Skip it and going to the next OBIS value.
sma-em.0 2021-03-05 22:53:40.419 warn (5260) Unkown OBIS value 7401228 found in UDP packet. Skip it and going to the next OBIS value.
sma-em.0 2021-03-05 22:53:40.418 warn (5260) Unkown OBIS value 4194304 found in UDP packet. Skip it and going to the next OBIS value.
sma-em.0 2021-03-05 22:53:40.418 warn (5260) Unkown OBIS value 3195048 found in UDP packet. Skip it and going to the next OBIS value.
sma-em.0 2021-03-05 22:53:40.418 warn (5260) Unkown OBIS value 2097152 found in UDP packet. Skip it and going to the next OBIS value.
`

Was kann das sein?

Get consumer info

In the iOS app i have the information about the consumption of consumers. eg. my heat pump is listed as non-controllable consumer with consumption in Watt. Is there any chance to get thin information into ioBroker?

Parsing of Multicast fail

Hello see log:

sma-em.0 2018-07-23 12:30:58.258 info Details L1 true Details L2 true Details L3 true
sma-em.0 2018-07-23 12:30:58.258 info Listen via UDP on Port 9522 for Multicast IP 239.12.255.254
sma-em.0 2018-07-23 12:30:58.258 info starting. Version 0.5.3 in /home/bigfreak/node_modules/iobroker.sma-em, node: v10.7.0
host.fuigw 2018-07-23 12:30:58.042 info instance system.adapter.sma-em.0 started with pid 2178
host.fuigw 2018-07-23 12:30:28.037 info Restart adapter system.adapter.sma-em.0 because enabled
host.fuigw 2018-07-23 12:30:28.037 error instance system.adapter.sma-em.0 terminated with code 0 (OK)
host.fuigw 2018-07-23 12:30:28.037 error Caught by controller[0]: at UDP.onMessage [as onmessage] (dgram.js:673:8)
host.fuigw 2018-07-23 12:30:28.037 error Caught by controller[0]: at Socket.emit (events.js:182:13)
host.fuigw 2018-07-23 12:30:28.037 error Caught by controller[0]: at Socket. (/home/bigfreak/node_modules/iobroker.sma-em/main.js:69:35)
host.fuigw 2018-07-23 12:30:28.037 error Caught by controller[0]: at Uint8Array.readUIntBE (internal/buffer.js:162:3)
host.fuigw 2018-07-23 12:30:28.037 error Caught by controller[0]: at boundsError (internal/buffer.js:55:9)
host.fuigw 2018-07-23 12:30:28.037 error Caught by controller[0]: RangeError [ERR_OUT_OF_RANGE]: The value of "byteLength" is out of range. It must be >= 1 and <= 6. Received 8
sma-em.0 2018-07-23 12:30:28.030 error uncaught exception: The value of "byteLength" is out of range. It must be >= 1 and <= 6. Received 8

SMA-EM findet Multicast nicht: UDP Socket error: Error: bind EADDRINUSE 0.0.0.0:9522

Describe the bug
Adapter ist installiert, Multicast des Sunny Home Managers 2 wurde nicht gefunden, da bei 0.0.0.0:9522 gesucht wird. Die Original Adresse 239.12.255.254 wurde nicht verändert

To Reproduce
Einfach den Adapter starten, er wird dann automatisch mit dem Fehler UDP Socket error: Error: bind EADDRINUSE 0.0.0.0:9522 beendet. Ein iOS App auf meinem Display zeigt mir die Daten einwandfrei und ohne Verzögerung an.

Expected behavior
Gerät verbindet sich nicht mit dem Dienst

Screenshots & Logfiles
Wie oben geschrieben UDP Socket error: Error: bind EADDRINUSE 0.0.0.0:9
Versions:

  • Adapter version: <0.6.5>
  • JS-Controller version: 4.0.21
  • Node version: 14.19.1
  • Operating system:

Compatibility check to js-controller 4.0

Dear Adapter developer,

with js-controller 4.0 object definitions are now also checked that min/max in only provided for number/mixed objects and that the type of the default value matches to the object type.

If something is not correct this is logged as 'warning' or 'info' log.

Please also make sure to update to the lastest @iobroker/testing dependency 2.5.4 or to accept the PR from Apollon77 for legacy testing!

Please spent some time to verify your adapter by ideally starting with a fresh instance and do some actions and verify the log. If you see a warn or info log there from these checks please adjust the adapter and fix the relevant cases.

For questions please refer to ioBroker/ioBroker.js-controller#1749

Please close the issue after you checked it.

Thank you very much for your support to get the best experience for the growing numbers of ioBroker users!

Please check ioBroker.sma-em with js-controller 2.0

Hi,

the new js-controller 2.0 will come into latest repository in the next days and we want to make sure that all adapters are working well. We already did a 2 weeks Beta test and so some adapter were aleady checked and some needed slight adjustments.

You can find more information in ioBroker/ioBroker.js-controller#482 and in the ioBroker Forum. If you have more technical questions please write in the referenced issue or in the Developer thread please. General questions are best in the genral thread.

Please update your systems to js-controller 2.0 and check your adapter.

Please close this issue once you have checked your adapter or received successfull reports from users.

Thank you very much for your support. Please contact us in the other Threads or Forum on any question.

Latest SMA Update - Extended Data incorrect

Since the latest update dated 9.12 of the SMA energy meter, the extended or detailed data values become incorrect. It seems that they changed the interface specification.

Listen multicast on defined network interface

I have the experience, that the adapter is not working (receiving any multicast data) if more than one network interface is available on the host. Probably the socket select only one of them and chooses the wrong in my case.

Defining the target network fixes the issue:
client.addMembership(this.config.BIP, '<HOST-IP>');

Node.js Version 10 not working

sma-em.0 2018-08-09 13:03:11.016 error at UDP.onMessage [as onmessage] (dgram.js:643:8)
sma-em.0 2018-08-09 13:03:11.016 error at Socket.emit (events.js:182:13)
sma-em.0 2018-08-09 13:03:11.016 error at Socket. (/opt/iobroker/node_modules/iobroker.sma-em/main.js:69:35)
sma-em.0 2018-08-09 13:03:11.016 error at Uint8Array.readUIntBE (internal/buffer.js:162:3)
sma-em.0 2018-08-09 13:03:11.016 error at boundsError (internal/buffer.js:55:9)
sma-em.0 2018-08-09 13:03:11.016 error RangeError [ERR_OUT_OF_RANGE]: The value of "byteLength" is out of range. It must be >= 1 and <= 6. Received 8
sma-em.0 2018-08-09 13:03:11.015 error uncaught exception: The value of "byteLength" is out of range. It must be >= 1 and <= 6. Received 8
sma-em.0 2018-08-09 13:03:10.331 info Details L1 true Details L2 true Details L3 true
sma-em.0 2018-08-09 13:03:10.331 info Listen via UDP on Port 9522 for Multicast IP 239.12.255.254
sma-em.0 2018-08-09 13:03:10.325 info starting. Version 0.5.3 in /opt/iobroker/node_modules/iobroker.sma-em, node: v10.8.0

Calculation of Total Power Consumption

Dear all

I would like to calculate the total power consumption of the house with Node Red it is displayed in the SMA App on the lower right side.
Has anybody an idea what objects I need to consider in the calculation. I started a trial but it is quite try and error because the values in the app change as well as in the adapter.

Thanks!

Warning in log following latest HM FW Update

Since the latest Update of the FW on the HM there are several warning messages in the log:
The adapter itself still seems to work but is there an update possible to avoid these repeated log entries?

grafik

EV Charger without SHM

Hello,

is it possible to read objects from the Sma ev charger without the Sunny Home Manager?

Current Energy production

Hi,

do I see it correct, that there is no value for the current energy production in Watts?

I see current surplus (what I sell) and regard (what I buy) but not what I consume. And this value isn't calculatable as I don't see current production.

Think about to fix the issues found by adapter checker

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:

https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.sma-em

Thanks,
your automatic adapter checker.

Compatibility check and testing for Node.js 14 and 16

Dear Adapter develop,

Node.js 14 is now available for a year and Node.js 16 was release just some days ago and will become LTS by October 2021. We plan to update the ioBroker Node.js recommendation (currently 12.x) to 14.x later this year.

Please check your adapter with Node.js 14 especially, and ideally also directly with Node.js 16

Please add both versions to the adapter testing which is executed on commits.

If your adapter requires a certain minimum version of Node.js please set the 'engine' setting in package.json accordingly! Please also do this if the adapter is not able to work in certain Node.js versions, so that ioBroker can prevent users from installing te adapter if not compatible!

On questions please talk to us at ioBroker/ioBroker.js-controller#1138

Please close the issue after you checked it.

Thank you very much for your support!

no configuration possible, File index.html not found

Describe the bug
"Adapterkonfiguration: sma-em.0"
File index.html not found

i have installed the Adapter, but i can't reach the configuration.

Versions:

  • Adapter version: 0.6.1-beta.0
  • JS-Controller version: 3.1.6
  • Node version: v12.20.1
  • Operating system: ioBroker in Docker Synology DSM

Sunny Home Manager not found

Describe the bug
I set up the adapter with following parameters:
image

The adapter does not find our installed Sunny Home Manager 2.0:
image

To Reproduce
Steps to reproduce the behavior:

  1. Install adapter and run instance with default settings.

Expected behavior
SHM 2.0 should be found on IP 192.168.178.37. Objects should be added and filled with readout of the SHM.

Screenshots & Logfiles
image

I assume that I might need to activate some kind of API in the settings of the Sunny Home Manager?

Think about to fix the issues found by adapter checker

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:

https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.sma-em

  • [E154] common.dependencies must contain{"js-controller": ">=2.0.0"} or {"js-controller": ">=3.0.0"}
  • [E605] No actual year found in copyright. Please add "Copyright (c) 2022 Marcolotti [email protected]" at the end of README.md
  • [E701] No actual year found in LICENSE. Please add "Copyright (c) 2022 Marcolotti [email protected]" at the start of LICENSE

Thanks,
your automatic adapter checker.

EV Charger Data

Can you update the adapter, so that we can get valid data from the sma ev charger?
Right now the charger is recognized, but gets not all data obkects.

sma-em-ev-charger

Verify Compact mode for your adapter

We have detected that your adapter supports the compact mode. Please use the latest js-controller 2.0 and verify that everything works.

Some more information what is important to check can be found at ioBroker/ioBroker.js-controller#512

On questions please answer to the linked issue. Please close this issue after your test and add the version number that you have tested please as a comment.

Thank you for your support.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.