This adapter uses Sentry libraries to automatically report exceptions and code errors to me as the developer. More details see below!
This adapter for ioBroker allows the reading and parsing of smartmeter protocols that follow the OBIS number logic to make their data available.
The Adapter needs nodejs 8.x+ to work!
This Adapter needs to have git installed currently for installing!
ioBroker-Forum-Thread: http://forum.iobroker.net/viewtopic.php?f=23&t=5047&p=54973
Supported Protocols:
- Sml: SML (Smart Message Language) as binary format
- D0: D0 (based on IEC 62056-21:2002/IEC 61107/EN 61107) as ASCII format (binary protocol mode E not supported currently)
- Json-Efr: OBIS data from EFR Smart Grid Hub (JSON format)
- Serial Receiving: receive through serial push data (smartmeter send data without any request on regular intervals). Mostly used for SML
- Serial Bi-Directional Communication: D0 protocol in modes A, B, C and D (mode E curently NOT supported!) with Wakeup-, Signon-, pot. ACK- and Data-messages to read out data (programing/write mode not implemented so far)
- Http-Requests: Read data via HTTP by requesting an defined URL
- Local Files: Read data from a local file
Number of seconds to wait for next request or pause serial receiving, value 0 possible to restart directly after finishing one message,
Default: is 300 (=5 Minutes)
baudrate for initial serial connection, if not defined default values per Transport type are used (9600 for SerialResponseTransprt and 300 for SerialRequestResponseTransport)
Command for SignIn-Message, default "?" to query mandatory fields, other values depending on device. Example: The 2WR5 Heatmeter uses "#" to query a lot more data (optional fields together with all mandatory)
The Adapter tries to determine the D0 Protocol mode as defined in the specifications. There are some devices that do not comply to the specifications and so bring problems. Using this option you can overwrite the determined protocol mode.
- Mode A: no baudrate changeover, no Ack-Message
- Mode B: baudrate changeover, no Ack-Message
- Mode C: baudrate changeover and Ack-Message needed
- Mode D: No baudrate changeover, baudrate always 2400
- Mode E: baudrate changeover and Ack-Message needed, Custom protocols, not Supported currectly!! Contact me if you have such an smartmeter
The adapter tries to determine the Baudrate for the data messages as defined in the protocol specifications. But as with the Mode some smartmeter provide wrong data here. SO you can use this to overwrite the baudrate for the data message as needed. Leave empty to use the baudrate changeover as defined by the smart meter.
... at least:
- Hager eHz Energy Meter (multiple, e.g. eHZ-IW8E2A5L0EK2P, EHZ363W5, )
- EMH Energy Meter
- EFR SmartGridHub
- Siemens 2WR5 reader from an heat station
- Elster AS1440
- Iskraemeco MT174
- Iskraemeco MT175
- Itron EM214 Typ 720
- Landis & Gyr E220
- Dutch smart meter using DSRM protocol (use "Serial Device reading data only" and "D0" as protocol)
- DZG DWS7412.1T
- IMPORTANT: There seems to be a Firmware bug and sometimes the current energy consumptions becomes negative! Manual recalculation possible using formular from Apollon77/smartmeter-obis#75 (comment)* ... and many many more
Please send me an info on devices where you have used the library successfully and I will add it here.
It seems to be an error in the SML firmware sometimes and values are wrongly encoded in the SML message, but the message itself is valid. Solution is to post process the value using a Javascript. See Apollon77/smartmeter-obis#75 (comment)
Please use GitHub issues for this.
Best is to set the adapter to Debug log mode (Instances -> Expert mode -> Column Log level). Then please get the logfile from disk (subdirectory "log" in ioBroker installation directory and not from Admin because Admin cuts the lines). If you do not like providing it in GitHub issue you can also send it to me via email ([email protected]). Please add a reference to the relevant GitHub issue AND also describe what I see in the log at which time.
Sentry.io is a way for developers to get an overview about errors from their applications. And exactly this is implemented in this adapter.
When the adapter crashes or an other Code error happens, this error message that also appears in the ioBroker log is submitted to our own Sentry server hosted in germany. When you allowed iobroker GmbH to collect diagnostic data then also your installation ID (this is just a unique ID without any additional infos about you, email, name or such) is included. This allows Sentry to group errors and show how many unique users are affected by such an error. All of this helps me to provide error free adapters that basically never crashs.
- (Apollon77) Optimize for js-controller 3.3
- (Apollon77) Add new protocolSmlInputEncoding option for SML protocol. With this also ascii or base64 based encodings (e.g. with TCP transports) are possible.
- (Apollon77) optimize stop handling (Sentry IOBROKER-SMARTMETER-10)
- (Apollon77) prevent last warnings with js-controller 3.2
- (Apollon77) prevent warnings with js-controller 3.2
- (Apollon77) update js-controller dependency to at least require js-controller 2.0.0
- (Apollon77) update OpenSML lib to support Holley DTZ541 wrongly implemented CRC Algorithm
- (Apollon77) update dependencies to prevent some crash cases and optimize tcp mode
- (Apollon77) update dependencies to prevent some crash cases
- (Apollon77) catch errors when no memory is available anymore and stop processing
- (Apollon77) fix admin when switching to TCPTransport
- (Apollon77) bugfixes and optimizations
- (Apollon77) bugfixes and optimizations
- (Apollon77) experimental TCP support, please give feedback
- (Apollon77) make sure HTTP based smartmeters are also polled frequently when responses are invalid
- (Apollon77) other optimizations
- (Apollon77) Switch Sentry to iobroker own instance hosted in germany
- (Apollon77) errors prevented when stopping to process data
- (Apollon77) errors prevented when stopping to process data
- (Apollon77) serial port configuration further optimized
- (Apollon77) update smartmeter-obis lib to fix some edge case errors and serial close handling
- (Apollon77) serial port configuration further optimized
- (Apollon77) Fix use of "/dev/serial/by-id" paths on linux if available
- (Apollon77) BREAKING CHANGE: Supports nodejs 8.x+ only, up to 12.x
- (Apollon77) support compact mode
- (Apollon77) update to latest library versions to fix problems and add special handling for some smart meters with broken firmware
- (Apollon77) Use "/dev/serial/by-id" paths on linux if available; add port selection to Admin
- (Apollon77) Add Sentry for error reporting
- (Apollon77) BREAKING CHANGE: State names changed because * no longer supported. Is replaced by __ now because of possible collisions in state names with only one _
- Update smartmeter library, fix HTTP-JSON-Transport
- BREAKING CHANGE: State names changed because * no longer supported. Is replaced by _
- Fix Admin
- Add better support for devices with more then 16 values (OpenSML Library upgrade)
- Allow multiple queries for D0 and Serial-Bidirectional communication
- a lot of bugfixing and Optimizations
- Switch to Serialport 6.0.4 to hopefully get more stable (less/no SIGSEGV/SIGABRT ...)
- Update smartmeter library and fix some timing issues
- update SML library
- optimize D0 handling and add support for Dutch smartmeter using DSRM protocol.
- optimize Serial handling on Windows (because pause and resume are not supported there)
- update library
- improved baudrate-changeover logic for D0 protocol (now hopefully finally)
- enhanced D0 protocol support for multiple values
- maintenance update
- one last try to fix the crashes SIGABRT/SIGSEGV
- Fix potential hanging communication with D0 Serial
- Optimize for D0 Message handling and baudrate changeovers
- Optimize D0 protocol handling for mode E
- Finalize Adapter config and added some informations
- We now should be quiet stable
- Public release of Adapter after forum Tests
- remove all additional logging
- enhance Adapter config screenxw
- Add possibility to overwrite serial connections settings and also D0 Mode for devices that send a wrong identification
- update smartmeter-obis library for memory optimizations
- Update smartmeter-obis library to 0.2.5 to add Serial Timeout for Request/Response protocol
- Initial version for public testing
- Initial version for internal testing
The MIT License (MIT)
Copyright (c) 2017-2021 Apollon77 [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.