Node-RED flow that contains functionality for figuring out where a patient is located, and dispatching ambulances to the location by sending navigation details to ambulance drivers via Google Glass
- A cellphone with internet access
- A pair of Google Glasses
- (Handled by course instructors) The user account connected to the Glasses must be signed in at http://glassproxy.mybluemix.net/auth
- (Handled by course instructors) The userID of the account must be inserted into the URL of all HTTP requests made to glassproxy in the Node-RED flow.
- E.g. http://glassproxy.mybluemix.net/timeline/117059099648984892989
- Check out this video to find out what your Google userID is: https://www.youtube.com/watch?v=dkPHxRDp9wY#t=47
- Register for a trial account at http://bluemix.net (IBM's new PaaS offering, launched in July 2014)
- Log in
- Click on CREATE AN APP
- Choose the Boilerplate Node-RED Starter
- Give your app a name and click Create
- After a few minutes your app will be running (App Health: Your app is running)
- Go to https://<your_app_name>.mybluemix.net
- Click on Go to your Node-RED flow editor
- Copy the text in exercise1.flow
- In your Node-RED flow editor click on the menu button (top right)
- Choose Import From - Clipboard
- Paste the text your copied in 9.
- Click Deploy
- Open a browser and go to https://<your_app_name>.mybluemix.net/map
- Some firewalls block websocket packets. It is recommended to use HTTPS in the URL to avoid this
- Open a browser on your cellphone and go to http://<your_app_name>.mybluemix.net/client/<your_phone_number>
- OR register for a trial account at http://www.twilio.com and insert your Twilio API key and your phone number into the SMS node. Update the URL in Send SMS to patient and click the Inject-button to send an SMS
- In /client/<your_phone_number> enter the patient's name and click Start tracking
- View the patient's position in /map
- Click the marker of the patient to dispatch an ambulance (Google Glass notification)
- It is easy to simulate the position of the patient with Google Chrome on a desktop in Developer Tools.