Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 1.22 KB

jsot.md

File metadata and controls

17 lines (12 loc) · 1.22 KB

JavaScript on Things Meetup - MQTT Talk

MQTT re: IoT wrt JS

Here are the slides for a talk I gave at the Portland JavaScript on Things Meetup

Run the demo

  1. Get an MQTT server running. I used Ponte for the backend. It runs on Port 3000.
  2. Open the demo web page on your local machine: open web/index.html
  3. Verify things are working by using mosquitto. mosquitto_pub -t meetup/jsot/mosquitto-test -m "Just testing". Your message should show up on that web page.
  4. Load Espruino JavaScript runtime on your device. I flashed my ESP8266 (witty) with Flasher.js
  5. Modify ./mqtt-esp8266-witty/config.json to be your settings
  6. I used the thingsSDK CLI to generate the project in mqtt-esp8266-witty, so you can just npm run push
  7. Push the button on your witty and it will publish to your server and the WebSockets on the static html page will update the page.