heedy / connectordb-android

The ConnectorDB android app
Apache License 2.0
8 stars 2 forks source link

Retrieve "sleep" data from GoogleFit #3

Closed proffalken closed 7 years ago

proffalken commented 7 years ago

This works really well on my android phone for steps/browsing habits etc, so thanks! :)

I use http://sleep.urbandroid.org/ to send my sleep data into GoogleFit, is there any way that I can have connectordb-android pull the sleep metrics out of GoogleFit and add it as a datastream in the same way that it does for Steps?

I've had a quick look at the source code, however as the only mention of the loggers described in the README are in the old directory, I'm guessing a pretty comprehensive rewrite is underway?

dkumor commented 7 years ago

Yes - the entire app is undergoing an overhaul. The new data-collection code should take shape in the next 2 weeks.

I will make sure to see whether further google fit data could be auto-gathered when upgrading google fit code.

dkumor commented 7 years ago

Logging from Sleep As Android is in testing channel.

proffalken commented 7 years ago

Awesome, thanks!

How do I get access to that testing channel? Is there somewhere I can subscribe to beta updates?

I'm doing a talk next week on QS and ConnectorDB is going to form the heart of it! :)

dkumor commented 7 years ago

https://play.google.com/apps/testing/com.connectordb_android

Testing channel available above!

PS: If doing a talk, you might want to update the frontend to the newest version too (git.1117), since it now offers a (very alpha) analysis tab, enabling you to correlate streams. You might need to clear your browser's service worker to see the new version.

proffalken commented 7 years ago

Brilliant, thanks, I'll update the app now and the Frontend later on tonight or tomorrow :)

proffalken commented 7 years ago

OK, app updated, re-compiled the server from latest git as I'm running on arm64 (https://www.pine64.org/) but the version is 0.3.0git1116 not 0.3.0git1117 as in the download.

Happy to log this as a different issue if you want?

UI is definitely more snappy in this release :)

dkumor commented 7 years ago

did you do a git pull? If you now have 2 new options (downlinks & analysis) in addition to Insert & Devices, and connectordb --version says

git: 4293b0c14e9570112a33b2697ede3ed3b947e141

or

git: 2111e074112e8d827172d3728c55bb310b39243f

then you are running the most recent release. I just fixed a tiny bug in the makefile that made versions not conform to semver, so you might have either version.

proffalken commented 7 years ago

OK, I've got the latter hash now, so at least I know it's the right commit, I still don't have the UI changes so I've done a "make clean" and now I'm re-running the build process, I'll get back to you with the results.

dkumor commented 7 years ago

I did not update the service worker. To get the UI changes, you will need to go to chrome developer settings -> Application -> Clear Site Data, which will unregister the old service worker. Supposedly, you can also do shift-reload, but I have not tried this personally.

You can also log out and log back in.

I will make the service worker auto-update on commit in the future.

proffalken commented 7 years ago

OK, all working again, had to copy over the bundle*.js files from the downloaded release however as make, make deps and npm run build didn't create them.

I'll log a new ticket for that against the server