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, refer to Clotty, our own clojure wrapper.
Then, simply add the following dependency to your project :
Read the full API.
In short :
(require '[dvlopt.mbus       :as mbus]
         '[dvlopt.mbus.wired :as mbus.wired])
;; Open a connection on the serial port.
(def connection
     (::mbus.wired/connection (mbus.wired/open-serial "/dev/ttyUSB0"
                                                      {::mbus/timeout   1000
                                                       ::mbus/baud-rate 2400})))
;; Request user data from slave 0
(mbus.wired/req-ud2 connection
                    0)
If you need wireless M-Bus, you need to interop with JMbus. We will write a wrapper as soon as we have the relevant hardware to test it.
Copyright © 2017-2018 Adam Helinski
Distributed under the Mozilla Public License version 2.0.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |