Node MQTT Subscribe

Node.js Open Kit Simulator ↗ All recipes
Tip: Ctrl+↵ to run
Node.js code runs server-side, not in the browser. Click Download .js, then on your Pi or server run: npm install <packages> && node filename.js

About this recipe

mqtt-bridge.js

Libraries / imports

mqtt

Hardware / pins

MQTT

Key API calls

require() console.log() setInterval()

How to run

Download .jsnpm installnode file.js.
Editor javascript edits auto-save
Output ready
Output will appear here after you click Run.