iobroker.wireless-mbus
v0.9.4
Published
Receive data from Wireless Meter-Bus (wM-Bus) devices like gas or electricity meters
Downloads
483
Readme
ioBroker.wireless-mbus
This adapter allows to receive wireless M-Bus data from supported receivers. The extent of device implementation varies, but wMBus modes can be configured for all listed devices.
- Embit WMB modules
- Amber Wireless AMB8465 (Beware: Command mode (UART_CMD_Out_Enable) is enabled!)
- IMST iM871A
- CUL
The WMBUS stack has been "re-ported" from FHEM project and was extensively fixed and refactored. Testing was done with raw data picked up on the internet, OMS sample data and some test data from the jmbus library. Some edge cases are still untested.
The device creation, updating, etc is mostly based of Apollon77's M-Bus adapter (see below).
If the adapter receives encrypted telegrams the AES key configuration tab should list the device ID automatically.
If the parser fails the raw telegram data will be saved to the info.rawdata state.
Attention: The Amber receiver seems to crash after some time (or amount of received messages) in C mode? Hardware flaw?
IMST iM871A variant: There exists a "RWE Smart Home" USB receiver which is in principle a IMST iM871A, but the kernel will not automatically load the corresponding driver. This is a one-liner to create a udev rule to fix that:
sudo bash -c "echo \$'ACTION==\"add\", ATTRS{idVendor}==\"10c4\", ATTRS{idProduct}==\"87ed\", RUN+=\"/sbin/modprobe cp210x\" RUN+=\"/bin/sh -c \\'echo 10c4 87ed > /sys/bus/usb-serial/drivers/cp210x/new_id\\'\"' > /etc/udev/rules.d/99-imst.rules"
Links:
Initial setup
The initial setup requires to configure the basics (hardware connection to the wmbus receiver) and to setup AES keys for all encrypted wmbus nodes to be collected. The most tricky part are the AES keys.
Basic setup
This requires to select the appropriate USB device and the correct baud rate (usually for IMST: 57600 baud; Amber: 9600 baud; Embit: 9600 baud, CUL: 38400 or 9600 baud). Most meters will send in "T Mode".
From version 0.9.0 on, the adapter also supports to connect to serial devices reachable via a TCP socket. However, the admin interface does not really reflect that (for now) and you have to select "custom port" and enter the host as tcp://host:port
.
Other options
- Update unchanged states: When a telegram arrives all states will be updated, even if their value did not change. (default: on)
- Cache for compact frames support: To support compact telegrams (used by some (Kamstrup?) devices) the structure of all receveived telegrams is cached. This means usually only one cache entry per device. If you do not have any device which sends compact telegrams you can disable it to save a bit of performance and memory. (default: off)
- Force energy units to kWh: All energy units (Wh and J) will be converted to kWh. (default: off)
- Temporarily block device after consecutive failures: If 10 consecutive telegrams of the same device are not parsed successfully the device will be ignored until adapter restart (default: on)
AES keys
The device identifier is a combination of the manufacturer code and the device ID (e.g. AAA-12345678). The key can be entered either as a plain-text key with 16 characters or as a hex string with 32 characters (16 bytes).
The easiest way to setup the keys is to start the adapter without any key setup and to wait for an encrypted telegram, after which an entry with "UNKNOWN" key is generated by the adapter. Then you can fill in the corresponding key and save the settings. If you see devices you don't know or just want to get rid of (e.g. devices from neighbours), you can enter them in the blocked devices tab (see below).
Blocking unwanted devices
The "blocked devices" tab allows you to complete stop the adapter from handling telegrams from unwanted devices.
You only need to enter the device ID (e.g. AAA-12345678), which you can get from the object tree after a telegram has been received and parsed or from the (debug) log.
Afterwards, when you delete the device from the object tree, the adapter will not recreate it again.
ToDo
- sending telegrams for S mode receivers?
- handling meters with "multiple telegrams"
Changelog
0.9.3
- (ChL) Fix handling of 64bit integer DIFs
0.9.2
- (ChL) Fix handling of frame type B without CRC
0.9.1
- (ChL) Fix custom port display in admin page if SerialPort returns no ports
0.9.0
- (ChL/kubax) Experimental! Enable serial over raw TCP socket for all devices - use
tcp://host:port
as custom serial port - serialport is upgraded to v11 - this finally breaks node v12 support!
0.8.10
- (ChL) Use compact frame cache independently from manufacturer code
0.8.9
- (ChL) Fix display of non-default settings in admin page
0.8.8
- (ChL) Add datetime type I handling
0.8.7
- (ChL) Slightly improve handling of LVAR DIF values
0.8.3 / 0.8.4 / 0.8.5 / 0.8.6
- (ChL) Update dev dependencies - Attention CI test will no longer support <= NodeJS 12
- (ChL) Minor logging changes
0.8.2
- (ChL) C-mode support for CUL
0.8.1
- (ChL) Fix connection state
- (ChL) Re-add serial logging
0.8.0
- (ChL) Complete rewrite of serial communication - now includes unit tested device classes
- (ChL) Upgrade to SerialPort 10.x and dependency clean up
- (ChL) Improve PRIOS decoder
0.7.9
- (ChL) Add debug logging to all serial devices
0.7.8
- (ChL) Improve logging from receiver modules
- (ChL) fix rawdata state
0.7.7
- (ChL) Add support for Diehl PRIOS encoded telegrams (ported from wmbusmeters)
0.7.5 / 0.7.6
- (ChL) Fix timeout handling - if no problems occur this will be republished as 1.0.0
0.7.3 / 0.7.4
- (ChL) Try to improve CUL support
0.7.1 / 0.7.2
- (ChL) Rename to ioBroker.wireless-mbus to be able to publish to npm
- (ChL) Fix block list, admin page logo and repo url in package.json
0.7.0
- (ChL) Change main adapter code to class
- (ChL) Include actual (machine) translations besides English and German
- (ChL) Upgrade denpendencies
- (ChL) Add test for wmbus decoder
- (ChL) Add integration tests
- (ChL) Add github workflow
0.6.2
- (ChL) Improve admin page to handle custom serialport path
- (ChL) Add option to turn automatic blocking of devices off
- (ChL) Add "Simple Hexstring" receiver for testing purposes
- (ChL) Internal refactoring
0.6.0 / 0.6.1
- (ChL) Upgrade of serialport library to 9.2.0
- (ChL) experimental CUL support
0.5.2
- (ChL) fix for connection indicator with js-controller 2.x
0.5.1
- (ChL) Small fixes
- (ChL) Internal telegram parser now supports wired M-Bus frames (not used - for testing / developing purpose)
- (D Glaser) Added timestamp of last update to device info
- (D Glaser/ChL) Added some setup documentation to README
0.5.0
- (ChL) Basic support for Techem devices
- (ChL) Option to force energy units (Wh and J) to kWh - BEWARE this is not really backwards compatible. Old states will keep their "old" unit, but display the adjusted value!
0.4.7
- (ChL) Block devices after 10 consecutive failed parse attempts until adapter restart
- (ChL) Assign roles derived from units (as does the mbus adapter)
0.4.6
- (ChL) Support for (Kamstrup?) compact frames through data record cache (pre-defined frames have been removed!)
0.4.5
- (ChL) Append device ids with key "UNKNOWN" at startup to needskey
0.4.2 / 0.4.3 / 0.4.4
- (ChL) Small fixes
0.4.1
- (ChL) basic IMST iM871A support
0.4.0
- (ChL) better Amber Stick support
- (ChL) Compact mode?
- (ChL) Nicer state names
- (ChL) wMBus mode partially selectable
0.3.0
- (ChL) Implemented all VIF types from MBus doc
- (ChL) VIF extensions are handled better (again)
- (ChL) reorganised VIF info
- (ChL) reorganised receiver handling
- (ChL) blocking of devices possible
0.2.0 (not tagged)
- (ChL) Dramatically improved parser: support for security mode 7, frame type B, many small fixes
- (ChL) VIF extensions are handled better, but correct handling is still not fully clear
- (ChL) CRCs are checked and removed if still present
- (ChL) raw data is saved if parser fails
0.1.0
- (ChL) initial release
License
Copyright (c) 2019 ISFH - Institute for Solar Energy Research www.isfh.de Copyright (c) 2021 - 2024 Christian Landvogt