xbmq is a NodeJs XBee-to-MQTT gateway. It allows two-way communication with
XBee networks through MQTT messages and aims to do as little processing as
possible, allowing it to run reliably and on low-power / embedded devices.
Install xbmq via
npm install xbmq.
Configure the local XBee:
Configure xbmq with your mqtt and serial port settings using command-line arguments. The arguments and their default values are:
Alternatively, use a config file instead. Copy or rename
config.json. Note: Command-line arguments override config.json.
All MQTT messages (to and from the XBee network) are published to subtopics of
rootTopic is configured as above
gatewayIdentifier is the NI value of the local XBee. If NI is not set, the
radio's 64-bit address will be used instead.
xbee-api frames received from the XBee network will be converted to JSON and published to the broker, but there are a few shortcuts and things to keep in mind when building xbee-api frames to send via mqtt:
idshould be decimal numbers or hedecimal strings (ie. 16, "0x10"),
xbmq-js is intended to run on single board computers, OpenWrt routers,
and other devices with limited resources that either can't access npm repositories,
don't have native compilers, or just take forever to run
This is why dependencies without native components have been bundled with the
serialport is listed as an optional dependency because
installing it involves native compiling, which typically can't be done on these
xbmq is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
xbmq is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with xbmq. If not, see http://www.gnu.org/licenses/.