Assuming all programs are running on localhost
#Patchwork, NodeRed and MQTT
- install mosquitto, or run Mosquitto server.
- run patchwork by executing: bin/device-gateway (the binary which is in this package is for OSX)
- install nodejs and node red.
- for running sqlite REST server flow, please install sqlite3 via npm: npm install sqlite3
- install node-red sqlite wrapper: npm install node-red-node-sqlite
#UI
- change the WebSocket URL setting in: /static/js/kinect.js and /static/js/websocket.js
- UI: open with your websocket enable browser and visit this url (please also include the hashtag part) http://localhost:8080/static/ui/index.html#{"room":"cscw-bplus-04","user":1}
###/static/ui/index.html It is the dashboard html code. ###/static/ui/js/kinect.js It is a js file that contains code that reads kinect body node coordinates sent from Physical activity advisor ###/static/ui/js/websocket.js It is a js file that contains code that reads websocket feed of Air Quality, Coffee Intake, and Physical Activity Advisor
#Air Quality Advisor
-
open your favorite java IDE
-
create a new project and import the source code inside /IndoorAirQuality
-
add these reference to the project:
a. libraries under /IndoorAirQuality/*.jar
b. libraries under /websocket_server/websocket_component/lib/*.jar
c. codes under /websocket_server/websocket_component/src/*
-
compile and run the IndoorAirQuality.java
###/IndoorAirQuality/ contain components that form the flow. each explanations are written on each file. ###/IndoorAirQuality/IndoorAirQuality.java The network flow of Air Quality Advisor ###/websocket_server/websocket_component/src component that can instantiate a websocket server, and publish messages to its subscriber
#Coffee Intake Advisor
-
go to /coffee $ cd coffee
-
run coffee advisor node flow: $ sudo node coffee_red.js
###/coffee/coffee_red.js Contains flow of Coffee Intake Advisor Logic, and SQLite REST interface
#Physical Activity Advisor
-
open your favorite java IDE
-
create a new project and import the source code inside: /Movement/Movement/src/
-
add these reference to the project:
a. /MessageBoxComponent/MessageBoxComponent.java
b. libraries under /IndoorAirQuality/*.jar
c. libraries under /websocket_server/websocket_component/lib/*.jar
d. codes under /websocket_server/websocket_component/src/*
-
compile and run the MovementControl.java
-
To run the Kinect Component, you should have a Kinect device connected and OpenNI and Osceleton running on your system.
###The Package Movement/Movement/src/com/smartoffice/movement contains the network flow of the Physical Activity advisor application ###The Package Movement/Movement/src/com/smartoffice/movement/components contains the components used in the Physical Activity advisor flow ###The Package Movement/Movement/src/com/smartoffice/movement/library contains some library code for Physical Advisor Components ###/MessageBoxComponent/src component that can pop up a AWT message box