-
Notifications
You must be signed in to change notification settings - Fork 13
Cozie Development Guide
https://www.youtube.com/playlist?list=PLkQs5WJXVHbiBDjmv-1tBYNUQOkmNCctA
https://www.youtube.com/watch?v=oLrP8FDAQd8&list=PLkQs5WJXVHbiBDjmv-1tBYNUQOkmNCctA&index=2&t=0s
Make sure you have npm, and node installed on your system
- Node: https://nodejs.org/en/download/
- npm: https://www.npmjs.com/get-npm
- fitbit cli: https://dev.fitbit.com/build/guides/command-line-interface/
- Fitbit OS Simulator: https://dev.fitbit.com/getting-started/
git init
git clone git@github.com:buds-lab/cozie.git
cd cozie
npm install
npx fitbit
Once successful you can open the Fitbit OS Simulator, run build
, and then install
to launch the project
https://www.youtube.com/watch?v=Hys7XBrEMdg&list=PLkQs5WJXVHbiBDjmv-1tBYNUQOkmNCctA&index=2
Based off this design https://github.com/gedankenstuecke/Minimal-Clock
Generally, you should just make a pull request and PJ will update the app on the store. However if you would like to create a completely new clone then this tutorial explains how
https://www.youtube.com/watch?v=5JaCrZBZbt0&list=PLkQs5WJXVHbiBDjmv-1tBYNUQOkmNCctA&index=3
https://www.youtube.com/watch?v=PapzIbgKyIQ&list=PLkQs5WJXVHbiBDjmv-1tBYNUQOkmNCctA&index=4
This is done using the following methods, and is a bit of a headache
- Peersocket connections Device: https://dev.fitbit.com/build/reference/device-api/messaging/ Companion: https://dev.fitbit.com/build/reference/companion-api/messaging/
- File Transfer Device: https://dev.fitbit.com/build/reference/device-api/file-transfer/ Companion: https://dev.fitbit.com/build/reference/companion-api/file-transfer/
filesystem: https://dev.fitbit.com/build/reference/device-api/fs/
Also the same methods as in Section 4
https://www.youtube.com/watch?v=4Vj2H2CcgHc&list=PLkQs5WJXVHbiBDjmv-1tBYNUQOkmNCctA&index=5
https://www.youtube.com/watch?v=HIwnjRJzFJA&list=PLkQs5WJXVHbiBDjmv-1tBYNUQOkmNCctA&index=6
https://www.youtube.com/watch?v=Ue8fATt4EHc&list=PLkQs5WJXVHbiBDjmv-1tBYNUQOkmNCctA&index=7
This is done through an Amazon API Gateway. See https://github.com/buds-lab/cozie-gateway for the source AWS API Code.
let url = `https://ay1bwnlt74.execute-api.us-east-1.amazonaws.com/test`
fetch(url, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify(data) // data here is the cozie feedback data object
})
.then(res => {
console.log(JSON.stringify(res))
})
.catch(function(error) {
console.log('There has been a problem with your fetch operation: ', error.message);
});
https://www.youtube.com/watch?v=qsJHL0tsaBc&list=PLkQs5WJXVHbiBDjmv-1tBYNUQOkmNCctA&index=8