All Projects → fredkelly → Sense Client

fredkelly / Sense Client

Licence: mit
Quick and dirty Ruby client for the Hello Sense sleep tracker. Based on http://jeffhuang.com/extracting_my_data_from_the_hello_sense.html

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Sense Client

Php Curl Class
PHP Curl Class makes it easy to send HTTP requests and integrate with web APIs
Stars: ✭ 2,903 (+14415%)
Mutual labels:  api-client, json
Httpie
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie
Stars: ✭ 53,052 (+265160%)
Mutual labels:  api-client, json
Html Pdf Service
LGPL V3. Java Spring Boot microservice with RESTful webconsole and service endpoints that convert HTML to PDF, optionally styling with CSS and templating with JSON using Flying Saucer, PDF Box and Jackson libraries. Available on Docker Hub.
Stars: ✭ 12 (-40%)
Mutual labels:  json
Nba api
An API Client package to access the APIs for NBA.com
Stars: ✭ 881 (+4305%)
Mutual labels:  api-client
Rest Api Examples
Test and Prototype with Fake Online REST/OAuth 2 APIs Examples
Stars: ✭ 13 (-35%)
Mutual labels:  json
Geochile
Esta es una api de Geocodificación, para que, con las coordenadas Latitud y Longitud se entregue una lista de ciudades cercanas.
Stars: ✭ 13 (-35%)
Mutual labels:  json
Spectral
A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v2 & v3.
Stars: ✭ 876 (+4280%)
Mutual labels:  json
Lib
single header libraries for C/C++
Stars: ✭ 866 (+4230%)
Mutual labels:  json
Knockout.merge
Adds basic merging functionality into knockout js mapping namespace
Stars: ✭ 15 (-25%)
Mutual labels:  json
Xml Js
Converter utility between XML text and Javascript object / JSON text.
Stars: ✭ 874 (+4270%)
Mutual labels:  json
Supervisord
Async first supervisord HTTP API Client for PHP 7
Stars: ✭ 14 (-30%)
Mutual labels:  api-client
Clientserverproject
一个C-S模版,该模版由三部分的程序组成,一个服务端运行的程序,一个客户端运行的程序,还有一个公共的组件,实现了基础的账户管理功能,版本控制,软件升级,公告管理,消息群发,共享文件上传下载,批量文件传送功能。具体的操作方法见演示就行。本项目的一个目标是:提供一个基础的中小型系统的C-S框架,客户端有三种模式,无缝集成访问,winform版本,wpf版本,asp.net mvc版本,方便企业进行中小型系统的二次开发和个人学习。同时网络组件方便的支持读写三菱和西门子PLC的数据,详细见Readme
Stars: ✭ 873 (+4265%)
Mutual labels:  json
Jquery.json Editor
A json editor based on jquery.json-viewer.
Stars: ✭ 13 (-35%)
Mutual labels:  json
Curlie
The power of curl, the ease of use of httpie.
Stars: ✭ 877 (+4285%)
Mutual labels:  api-client
Jogo
JSON o Golang | Forget static types, No more complex structure definitions, Focus on code. Go Reflect!
Stars: ✭ 13 (-35%)
Mutual labels:  json
Spimedb
EXPLORE & EDIT REALITY
Stars: ✭ 14 (-30%)
Mutual labels:  json
Node Api.ai
[DEPRECATED] Ultimate Node.JS SDK for api.ai
Stars: ✭ 12 (-40%)
Mutual labels:  api-client
Kubernetes Client
Simplified Kubernetes API client for Node.js.
Stars: ✭ 874 (+4270%)
Mutual labels:  api-client
Bootstrap
Open Source JS plugins
Stars: ✭ 13 (-35%)
Mutual labels:  json
Subdue
The Subdue graph miner discovers highly-compressing patterns in an input graph.
Stars: ✭ 20 (+0%)
Mutual labels:  json

sense-client

Quick and dirty Ruby client for the Hello Sense sleep tracker.

Usage

Logging in:

client = Sense::Client.new
client.login MY_USERNAME, MY_PASSWORD

Room conditions

client.room
=> {"temperature"=>
  {"value"=>18.53,
   "message"=>"The temperature is **just right**.",
   "ideal_conditions"=>
    "People tend to sleep best when temperature is between **15°C** and **20°C**.",
   "condition"=>"IDEAL",
   "last_updated_utc"=>1494705420000,
   "unit"=>"c"},
 "humidity"=>
  {"value"=>41.526333,
   "message"=>"The humidity is **just right**.",
   "ideal_conditions"=>
    "People tend to sleep best when humidity is between **30%** and **60%**.",
   "condition"=>"IDEAL",
   "last_updated_utc"=>1494705420000,
   "unit"=>"%"},
 "light"=>
  {"value"=>0.91552734,
   "message"=>"The light level is **just right**.",
   "ideal_conditions"=>
    "For ideal sleep, your bedroom should be as dark as possible, which is below **2lux**.",
   "condition"=>"IDEAL",
   "last_updated_utc"=>1494705420000,
   "unit"=>"lux"},
 "sound"=>
  {"value"=>35.0,
   "message"=>"The noise level is **just right**.",
   "ideal_conditions"=>
    "For ideal sleep, your bedroom should be as quiet as possible, which is usually below **40dB**.",
   "condition"=>"IDEAL",
   "last_updated_utc"=>1494705420000,
   "unit"=>"dB"},
 "particulates"=>
  {"value"=>54.477455,
   "message"=>"The air quality is **just right**.",
   "ideal_conditions"=>
    "For the best sleep, the air in your bedroom should be as clean as possible. Ideally, it should be below **80µg/m³**.",
   "condition"=>"IDEAL",
   "last_updated_utc"=>1494705420000,
   "unit"=>"AQI"}}

Timeline

client.timeline Date.new(2017,5,12)
=>{"score"=>69,
 "score_condition"=>"WARNING",
 "message"=>
  "You were asleep for **6.1 hours**, and sleeping soundly for 5.7 hours.",
 "date"=>"2017-05-12",
 "sleep_periods"=>["NIGHT"],
 "events"=>
  [{"timestamp"=>1494634620000,
    "timezone_offset"=>3600000,
    "duration_millis"=>60000,
    "message"=>"You went to bed.",
    "sleep_depth"=>0,
    "sleep_state"=>"AWAKE",
    "event_type"=>"GOT_IN_BED",
    "sleep_period"=>"NIGHT",
    "valid_actions"=>["ADJUST_TIME", "VERIFY", "INCORRECT"]},
    # ...
   {"timestamp"=>1494664800000,
    "timezone_offset"=>3600000,
    "duration_millis"=>60000,
    "message"=>"You got out of bed.",
    "sleep_depth"=>0,
    "sleep_state"=>"AWAKE",
    "event_type"=>"GOT_OUT_OF_BED",
    "sleep_period"=>"NIGHT",
    "valid_actions"=>["ADJUST_TIME", "VERIFY", "INCORRECT"]}],
 "metrics"=>
  [{"name"=>"total_sleep",
    "value"=>368,
    "unit"=>"MINUTES",
    "condition"=>"IDEAL"},
   {"name"=>"sound_sleep",
    "value"=>211,
    "unit"=>"MINUTES",
    "condition"=>"IDEAL"},
   {"name"=>"time_to_sleep",
    "value"=>5,
    "unit"=>"MINUTES",
    "condition"=>"IDEAL"},
   {"name"=>"times_awake",
    "value"=>1,
    "unit"=>"QUANTITY",
    "condition"=>"IDEAL"},
   {"name"=>"fell_asleep",
    "value"=>1494634920000,
    "unit"=>"TIMESTAMP",
    "condition"=>"IDEAL"},
   {"name"=>"woke_up",
    "value"=>1494657000000,
    "unit"=>"TIMESTAMP",
    "condition"=>"IDEAL"},
   {"name"=>"temperature",
    "value"=>nil,
    "unit"=>"CONDITION",
    "condition"=>"IDEAL"},
   {"name"=>"humidity",
    "value"=>nil,
    "unit"=>"CONDITION",
    "condition"=>"IDEAL"},
   {"name"=>"particulates",
    "value"=>nil,
    "unit"=>"CONDITION",
    "condition"=>"IDEAL"},
   {"name"=>"light", "value"=>nil, "unit"=>"CONDITION", "condition"=>"IDEAL"},
   {"name"=>"sound", "value"=>nil, "unit"=>"CONDITION", "condition"=>"IDEAL"}],
 "locked_down"=>true}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].