For slides and example code, see lesson 7
Note: Do not work on this repository right away.
Check existing forks to find the specific repository for your class.
- Install the mqtt CLI tool on the Raspberry Pi.
- Connect to the broker test.mosquitto.org
- Subscribe to the topic fhnw-iot/names
- Send your name to the same topic.
(Open a second terminal)
- Install the mqtt Node.js library on the Raspberry Pi.
- Run the previous MQTT pub/sub client examples.
- Use the .js link on each page or check the main repo.
- To run a Node.js program my.js, type:
$ node my.js
- Install and run the mosquitto broker on Raspberry Pi:
$ sudo apt-get update $ sudo apt-get install mosquitto # port 1883
- Test with the ESP8266 publisher/subscriber clients.
- Check
$SYS/broker/clients/connected
on the Pi. - Which use cases would profit from a local broker?
- Choose one of the Grove sensors listed in the Wiki.
- Define a suitable JSON format to transmit its data.
- Translate the format into a Protobuf .proto file.
- Done? Build the parser for Node.js or Arduino.