An Angular app to run as a COBI module (Bosch eBike motors) sending data to Bucket.
Available on GitHub Pages: https://datacentricdesign.github.io/cobi-app
Requirements: NodeJS
Fork and clone this repository on your machine, and open the folder in an IDE such as VS Code. In the IDE, open a Terminal Window and type in:
npm install
npm start
Go to http://localhost:4200/cobi-app to see the app in action.
This repo contains an Angular skeleton for a Bucket Web application.
-
Top structure: generic app component / routes / module / service (include service for the settings and token for the oauth2 'code' flow)
-
landing-page component: Public part of the web app (including landing page with login button)
-
myapp module: Private part of the web app (including Dashboard as a logged-in home page)
- Bucket service to access Bucket resources
-
shared module: the auth guard to ensure private pages remain private, and some UI components provided with the template
-
Theme by Creative Tim: Paper Dashboard Angular - v2.1.0 ([https://www.creative-tim.com/product/paper-dashboard-angular](Theme Page))
Last tested with cobi,js v0.59.0
- Better (?) UI
- Created a grid to make the ui more friendly - DONE
- Visual Indication for the button press - DONE
- More paramenters
- Bike Bell -
Working on the similator, not tested on the bikeNot able to push data to bucket- cancelled as the current bike donesn't support logging this data
- GPS Telemetry -
Working on the similator, not tested on the bike- DONENot able to push data to bucket
- Ambient Light State -
- The system returns a non number value for ambient light
- Commented out for now
- Bike Bell -
- Emotional state
- A emoji style grid to evalute liking/disliking(x axis) and intensity(y axis)
- Preliminary Stages
- A emoji style grid to evalute liking/disliking(x axis) and intensity(y axis)
graph LR
A[Apple Watch] -- Bluetooth --> B[iPhone] -- WiFi --> C[Android]
C[Android] -- 4G Sim --> D[Cloud]
D[Cloud] --> E[dwd bucket]
D[Cloud] --> F[Wigle Server]
E[dwd bucket] --> G[Grafana]
F[Wigle Server] --> H[KML File]
H[KML File] --> i[Google Earth]
- Apple Watch with the Cobi app installed
- Iphone with the cobi app + logged in with cobi developer account
- 360 Camera
- Android Phone with WiGLE App installed
- Simcard with data
- Pair the iphone with the bike using the cobi app.
- Open the cobi app and the ride should start automatically, if not you can manaully trigger it
- Navigate to ,,My Module''
- Depending upon the requirement you may have to point it to the right webpage.
- Note: Its usually the gh page website
- If you see the bucket login screen you are done.
- Install the WiGLE App on the android phone
- Make and account on the WiGle.net and then sign into the account.
- Scan and test if the app is able to log the wifi,bluetooth and ble networks.
- Note: Some andorid phones may throttle WiFi scanning, this can be disabled in settings.
- On the GoPro make sure that the video mode is set to 5,6k and 30FPS.
- Connect the iPhone to the internet by setting up a portable WiFi hotspot on the android phone.
- Note: This can reversed too, but Rohan is not sure about the powersaving or availability of hotspot in certrain iphones
- Mount the iphone on the bike securely and connect the lightning cable
- Open the Cobi.Bike app, the ride should start automatically.
- Navigate to the ,,My Module''
- Enter the login details provided; after allowing the permission to collect data you should be greeted by the dashboard.
- On the android phone, open wigle app and start scanning.
- Secure the android phone on the bike
- Mount the GoPro on the bike
- Make sure that the iPhone is connecting to the hotpot.
- Make sure GPS and Heart Rate data is shown on the dashboard.
- Press the the ,i' on the bike once, this can used to sync the video and the cobi data.
- Begin ride!
- At the end of the ride, press the ,i' again to signal the end of the ride.
- Start the hotspot on the android and connect it to the iPhone.
- Open the cobi app on the apple watch.
- Mount the iPhone on the bike and start the cobi app, load the module and login to open the dashboard.
- Mount the android to the bike and start the wigle app.
- You can now call the participant
- Make sure the participant has signed all the ,consent' documents as required by the TU
- Make sure the particiapnts understands what data is being collected and how it is being processed.
- Hand over the apple watch to the participant
- Note the energy and the mood of the participant (recommended to make an online form)
- Energy is characterised by: Tired (-ve) - Decent (0) - Energetic (+ve)
- Mood is charcterised by: Bad (-ve) - Fine (0) - Happy (+ve)
- Explain the participant about the bike controls-
- Brakes
- The ,i' button to signal an intresting event (optional)
- The + and - buttons to select the assitance level
- Bell
- The bike seat might be adjusted depending upon the participant.
- Once comfortable, assign the participant a known destination (ideal, as wandering is not very useful)
- When the particiapnt is ready, start the GoPro Video --> Start scanning on the Wigle app (android) --> Press the button ,i' button
- WE RIDE!
- At the end of the ride, Press the ,i' button --> Stop scanning on Wigle app (android) and press upload --> stop the video.
- Remove the SD card from the camera and copy the video to a seperate folder.
- Note: The camera only captures 8min videos, so each ride may have multiple videos
- A post ride survey is recommended, the question might be but not limited to- (Ideally on the same online form as before)
- A general feedback on the ride
- Did the bike affect the ride in any way?
- Any accidents?
- Any fustrations?
- Any situations of interest?
- Any conflicts?
- Download the KML file from the Wigle website and save it in the same folder as the videos. (Can be done in parallel with the previous step)
- Reseat the SDcard in the camera
- Goto 5.
Once you have played around and taken your mark, you must request a client app by email at lab@datacentricdesign.org. (You will not be able to deploy your app with the example client). Your request should include the following information:
- App Name
- App description
- App URI
- App logo URI
- Owner name (or person or organisation) and email address
- Link to Privacy Policy
- Link to Terms of Services
We will send back to you a setting to update src/config.json. You might also search and replace 'myapp' with a more fitting name for your web application.
npm run build:gh
npm run ngh
- Install Docker and Docker compose on your server
- Clone your app repository on your server
- Create a .env file in the root folder (on the server) and adapt the example.env file to your need
Once your setting is ready, run the docker-compose command:
docker-compose up
Note that this setting does not include any SSL support. We expect you to deploy this service behind a reverse proxy dealing with SSL (among other things) for all your server applications.