Category «MQTT»

How to subscribe MQTT message in mac

Mosquitto can be installed from the homebrew project. See brew.sh and then use brew install mosquitto $ mosquitto_sub -h 10.0.2.1 -t “#” -d Client mosqsub|xx-mac received PUBLISH (d0, q0, r1, m0, ‘line-1/xx/topicname’, … (216 bytes)) {“xx”: {“xx”: “xx”, “xx”: 1, “xx”: 1, “xx”: “xxweigh-scale”}, “xx”: 820, “xx”: “235325”, “timestamp”: “2018-08-30T19:42:19.296591”, “xx”: true}

Connect to MQTT server with WILL via PHP

In MQTT, you use the Last Will and Testament (LWT) feature to notify other clients about an ungracefully disconnected client. Each client can specify its last will message when it connects to a broker. The last will message is a normal MQTT message with a topic, retained message flag, QoS, and payload. The broker stores …