serial2mqtt is kind of adapter. This adapter receives Serial port data and sends to MQTT, vice versa
Extract downloaded bundle where exactly do you want to run. Configuration files located in serial2mqtt/conf
File: serial2mqtt.properties
Message queue size
serial2mqtt.message.queue.size=1000 #(1)
Internal message queue size. Messages will be processed immediately. However, if the serial port or MQTT broker goes down in that time messages will be stored in the message queue.
Network type
serial2mqtt.network.type=MY_SENSORS #(1)
For now, this adapter supports only for MySensors
Serial port settings
serial.driver=AUTO #(1) serial.port=/dev/ttyUSB0 #(2) serial.baud.rate=115200 #(3) serial.connection.retry=60 #(4)
This adapter uses a different type of internal driver to communicate with the serial port. Always goes with AUTO
, if you do not have any specific requirement. Supported driver options: AUTO
, JSERIALCOMM
Serial port name/id
Bud rate of the serial port
When there is a connection failed on the serial port, after this delay will do retry to connect again. values in seconds
MQTT client settings
mqtt.qos=0 #(1) mqtt.broker=tcp://localhost:1883 #(2) mqtt.client.id=serial2mqtt-adapter #(3) mqtt.topic.publish=mygateway-out #(4) mqtt.topic.subscribe=mygateway-in #(5) mqtt.username= #(6) mqtt.password= #(7) mqtt.connection.retry=60 #(8)
QoS of this MQTT client
broker host URL in the form of tcp://<ip>:<port>
Client id, can be named without space
where to publish serial port data on MQTT topic
subscribe topic, do not include /#
on the end. Received data will be published on Serial port
Username of the MQTT broker, if Anonymous
access disabled on MQTT broker
Password of the MQTT broker
When there is a failed on connection, retry after this seconds.
Logger configuration
Configuration File Name: logback.xml
Default log file location: logs/mycontroller.log
Executable scripts are located in serial2mqtt/bin/
Linux
Start : ./start.sh
Stop : ./stop.sh
Windows
Start : Double click on start.bat
Stop : Ctrl+C
Other Platforms
java -Xms4m -Xmx4m -Dlogback.configurationFile=../conf/logback.xml -Dserial2mqtt.conf.file=../conf/serial2mqtt.properties -cp "../lib/*" org.mycontroller.serial2mqtt.StartService
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。