Thin clojure wrapper around JMbus for communicating with Meter-Bus slave devices.
Supports a (very) wide variety of platforms.
This library needs jRxTx for using serial ports. For instructions, you can also refer to helins/rxtx, our own clojure wrapper.
This is just a very brief overview.
The full API is available on Cljdoc.
In short :
(require '[helins.mbus :as mbus]
'[helins.mbus.wired :as mbus.wired])
(with-open [connection (mbus.wired/serial-connection "/dev/ttyUSB0"
{:mbus/timeout 1000
:mbus/baud-rate 2400})]
;; Request user data (ie. a variable data structure) from slave 0
(mbus.wired/req-ud2 connection
0))
For the time being, if you need wireless M-Bus, you need to interop with JMbus.
Copyright © 2018 Adam Helinski
Licensed under the term of the Mozilla Public License 2.0, see LICENSE.