Fullstack

From Wiki2
Revision as of 15:15, 23 February 2016 by Tim (talk | contribs)

test stacks

mqtt

now in

wamp/www/node/sb/mqtt/mqttMck/

iot

esp8266/mqttMck/mqtt/Mck.ino

server

server/node server3
Express server listening on port 3332
MQTT broker operating on port 1883
WebClient server MQTT through WS on port 3333

webclient

webclient/index2.html
  • uses IOT device, mqtt broker and web client
  • front end implemented in vanilla js, rxjs, angular-jxjs, react-redux, angular-redux

IOT esp8266

The IOT esp8266 Wemos device is a data creator sending out temperatures whenever they change. There should be more than one channel to send info on. The device also responds to messages from users telling it to turn on or off the light. The pub-sub client listening on the mgtt port 1883 sets a callback function whenever a message arrives. The data changes over time since the temperature sensor is leaning on the light bulb which gets hot when on.

The device has web configuration that stores the last used ssid/pwd. If that wifi exists and connects it goes into station mode acting as a client talking to the broker. If not it goes into access point mode becoming a wifi network with a server that puts out a page listing the local wifis and asking for an ssid/pwd that it stores in eeprom. You reboot and it goes online.

server

The server is actually a regular express server, an mqtt broker and a websocket that lets mqtt run on it to the client. At minimum, it doesn't need the express server.

client

The client comes in multiple flavors. The first version

websockets

socketio