mqtt-mode provides a major mode for interaction with MQTT servers.
This mode makes use of mosquitto_pub and mosquitto_sub from the
Mosquitto MQTT server. Therefore mosquitto must be installed. The
binaries are sometimes distributed as separate package.
Debian:
apt install mosquitto-clientsGentoo:
emerge mosquittoTo install this mode, add the repository to your load path and load it:
(add-to-list 'load-path "~/path/to/mqtt-mode/")
(require 'mqtt-mode)For configuration options, please look at the customization group
mqtt. Most importantly, you should probably configure
mqtt-host— host name of MQTT servermqtt-port— port of MQTT servermqtt-username— username for MQTT servermqtt-password— password for MQTT servermqtt-subscribe-topicandmqtt-publish-topic— topics to subscribe and publish to
You can either run the consumer with mqtt-start-consumer or run the
comint based client with mqtt-run. Messages can be sent with
mqtt-publish-message and mqtt-publish-region.