Tag: IoT
もっともMQTTという名前自体には大した意味はありません。それどころかMQTTにはメッセージをためる(Queue)機能はなく、 MQTTという名前は“名が体を表していない”という妙なことになっています。
$ vim /usr/local/etc/mosquitto/mosquitto.conf ... log_timestamp true log_timestamp_format %Y-%m-%dT%H:%M:%S ... $ mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf 2020-05-01T16:03:44: mosquitto version 1.6.9 starting 2020-05-01T16:03:44: Config loaded from /usr/local/etc/mosquitto/mosquitto.conf. 2020-05-01T16:03:44: Opening websockets listen socket on port 9090. 2020-05-01T16:03:44: Opening ipv6 listen socket on port 1883. 2020-05-01T16:03:44: Opening ipv4 listen socket on port 1883.
For those who are looking for /usr/local/sbin is not writable error: $ cd /usr/local $ sudo mkdir sbin $ sudo chown -R $(whoami) $(brew --prefix)/* $ brew link yourPackageName
Warning: Homebrew's sbin was not found in your PATH but you have installed formulae that put executables in /usr/local/sbin. Consider setting the PATH for example like so: echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc
ログ出力先は log_dest で指定します。
The MQTT client for Node.js and the browser
MQTT.js は、MQTT クライアントのためのライブラリです。Node.js およびブラウザの JavaScript で使用できます。
This project is UNMAINTAINED. Please move to Aedes
Webサーバー(のフレームワーク)としてexpress、Brokerサーバーとしてmoscaを利用します。
listener 9090 protocol websockets
AWSIoTとラズパイ間の通信をMQTTでつなぎ、送受信する手順を紹介します