Here are the slides for a talk I gave at the Portland JavaScript on Things Meetup
- Get an MQTT server running. I used Ponte for the backend. It runs on Port 3000.
- Open the demo web page on your local machine:
open web/index.html
- 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. - Load Espruino JavaScript runtime on your device. I flashed my ESP8266 (witty) with Flasher.js
- Modify
./mqtt-esp8266-witty/config.json
to be your settings - I used the thingsSDK CLI to generate the project in mqtt-esp8266-witty, so you can just
npm run push
- 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.