Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fitbit node. #28

Merged
merged 1 commit into from
Oct 21, 2014
Merged

Fitbit node. #28

merged 1 commit into from
Oct 21, 2014

Conversation

hindessm
Copy link
Contributor

A useful first node. With an example flow included below.
-Mark

[{"id":"89a44cf.f765bb","type":"function","name":"","func":"var sleep = msg.payload;\nif (sleep.duration < 6.5*60*60*1000) {\n   msg.payload = \"Grumpy due to insufficient sleep!\";\n} else if (sleep.efficiency < 95) {\n   msg.payload = \"Grumpy due to restless sleep!\";\n} else {\n   msg.payload = \"Cynical and sarcastic despite good sleep.\";\n}\n\nreturn msg;","outputs":1,"x":434,"y":154,"z":"fc90eb46.036f18","wires":[["84542d26.7babd"]]},{"id":"84542d26.7babd","type":"debug","name":"","active":true,"console":"false","complete":"false","x":653,"y":156,"z":"fc90eb46.036f18","wires":[]},{"id":"9736069d.68c9f8","type":"inject","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":103,"y":194,"z":"fc90eb46.036f18","wires":[["83eebb92.7c1148"]]},{"id":"83eebb92.7c1148","type":"fitbit","fitbit":"","name":"","dataType":"sleep","x":269,"y":188,"z":"fc90eb46.036f18","wires":[["89a44cf.f765bb"]]}]

@hindessm hindessm changed the title Fitbit node. [wip] Fitbit node. Oct 1, 2014
@hindessm hindessm force-pushed the fitbit branch 3 times, most recently from 25763d1 to 06d7fcf Compare October 1, 2014 13:38
@hindessm hindessm changed the title [wip] Fitbit node. Fitbit node. Oct 1, 2014
@hindessm
Copy link
Contributor Author

hindessm commented Oct 1, 2014

I think this is ready to be merged.
-Mark

@coveralls
Copy link

Coverage Status

Coverage increased (+5.28%) when pulling 88df7db on hindessm:fitbit into 472167c on node-red:master.

@hindessm
Copy link
Contributor Author

hindessm commented Oct 7, 2014

I've changed the sleep response to return the "main sleep" in msg.payload and the full record in msg.data. I've updated the tests and example flow above to reflect this.

@coveralls
Copy link

Coverage Status

Coverage increased (+25.27%) when pulling 2c5c56f on hindessm:fitbit into 2d18c37 on node-red:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+11.33%) when pulling 6902e6f on hindessm:fitbit into 8098f7b on node-red:master.

knolleary added a commit that referenced this pull request Oct 21, 2014
@knolleary knolleary merged commit d7953ed into node-red:master Oct 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants