pebblewatch 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +3 -0
- data/LICENSE +20 -0
- data/README.md +50 -0
- data/Rakefile +17 -0
- data/lib/pebble/capabilities.rb +26 -0
- data/lib/pebble/endpoints.rb +24 -0
- data/lib/pebble/pebblewatch.rb +1 -0
- data/lib/pebble/protocol.rb +5 -0
- data/lib/pebble/system_messages.rb +10 -0
- data/lib/pebble/version.rb +3 -0
- data/lib/pebble/watch/event.rb +10 -0
- data/lib/pebble/watch/log_event.rb +7 -0
- data/lib/pebble/watch/media_control_event.rb +7 -0
- data/lib/pebble/watch.rb +7 -0
- data/lib/pebble.rb +6 -0
- metadata +99 -0
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2013 Douwe Maan
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# pebble-ruby
|
2
|
+
|
3
|
+
A Ruby library for communicating with your Pebble smartwatch.
|
4
|
+
|
5
|
+
The protocol implementation was based on the documentation at http://pebbledev.org/, the Python implementation at [Hexxeh/libpebble](https://github.com/Hexxeh/libpebble) and the .NET implementation at [barometz/flint](https://github.com/barometz/flint).
|
6
|
+
|
7
|
+
## To Do
|
8
|
+
|
9
|
+
- [ ] Basic protocol communication
|
10
|
+
- [ ] Sending of messages (notifications etc)
|
11
|
+
- [ ] Receiving of events (log, music control)
|
12
|
+
- [ ] Firmware/app uploading
|
13
|
+
- [ ] CLI
|
14
|
+
- [ ] REPL
|
15
|
+
|
16
|
+
## Installation
|
17
|
+
|
18
|
+
```sh
|
19
|
+
gem install pebble
|
20
|
+
```
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require "pebble"
|
26
|
+
|
27
|
+
# etc
|
28
|
+
```
|
29
|
+
|
30
|
+
## License
|
31
|
+
Copyright (c) 2013 Douwe Maan
|
32
|
+
|
33
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
34
|
+
a copy of this software and associated documentation files (the
|
35
|
+
"Software"), to deal in the Software without restriction, including
|
36
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
37
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
38
|
+
permit persons to whom the Software is furnished to do so, subject to
|
39
|
+
the following conditions:
|
40
|
+
|
41
|
+
The above copyright notice and this permission notice shall be
|
42
|
+
included in all copies or substantial portions of the Software.
|
43
|
+
|
44
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
45
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
46
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
47
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
48
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
49
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
50
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require "rspec/core/rake_task"
|
2
|
+
|
3
|
+
spec = Gem::Specification.load("pebblewatch.gemspec")
|
4
|
+
|
5
|
+
RSpec::Core::RakeTask.new(:spec)
|
6
|
+
|
7
|
+
task default: :spec
|
8
|
+
|
9
|
+
desc "Build the .gem file"
|
10
|
+
task :build do
|
11
|
+
system "gem build #{spec.name}.gemspec"
|
12
|
+
end
|
13
|
+
|
14
|
+
desc "Push the .gem file to rubygems.org"
|
15
|
+
task release: :build do
|
16
|
+
system "gem push #{spec.name}-#{spec.version}.gem"
|
17
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Pebble
|
2
|
+
module Capabilities
|
3
|
+
module Session
|
4
|
+
GAMMA_RAY = 0x80000000
|
5
|
+
end
|
6
|
+
|
7
|
+
module Client
|
8
|
+
UNKNOWN = 0
|
9
|
+
IOS = 1
|
10
|
+
ANDROID = 2
|
11
|
+
OSX = 3
|
12
|
+
LINUX = 4
|
13
|
+
WINDOWS = 5
|
14
|
+
|
15
|
+
TELEPHONY = 16
|
16
|
+
SMS = 32
|
17
|
+
GPS = 64
|
18
|
+
BTLE = 128
|
19
|
+
CAMERA_FRONT = 240 # No, that doesn't make sense, but it's apparently true.
|
20
|
+
CAMERA_REAR = 256
|
21
|
+
ACCEL = 512
|
22
|
+
GYRO = 1024
|
23
|
+
COMPASS = 2048
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Pebble
|
2
|
+
module Endpoints
|
3
|
+
FIRMWARE = 1
|
4
|
+
TIME = 11
|
5
|
+
VERSION = 16
|
6
|
+
PHONE_VERSION = 17
|
7
|
+
SYSTEM_MESSAGE = 18
|
8
|
+
MUSIC_CONTROL = 32
|
9
|
+
PHONE_CONTROL = 33
|
10
|
+
LOGS = 2000
|
11
|
+
PING = 2001
|
12
|
+
DRAW = 2002
|
13
|
+
RESET = 2003
|
14
|
+
APP = 2004
|
15
|
+
NOTIFICATION = 3000
|
16
|
+
RESOURCE = 4000
|
17
|
+
SYS_REG = 5000
|
18
|
+
FCT_REG = 5001
|
19
|
+
APP_INSTALL_MANAGER = 6000
|
20
|
+
RUNKEEPER = 7000
|
21
|
+
PUT_BYTES = 48879
|
22
|
+
MAX_ENDPOINT = 65535
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require "pebble"
|
data/lib/pebble/watch.rb
ADDED
data/lib/pebble.rb
ADDED
metadata
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: pebblewatch
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Douwe Maan
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-03-30 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: serialport
|
16
|
+
requirement: &70167654887920 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.1'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70167654887920
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rake
|
27
|
+
requirement: &70167654886380 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70167654886380
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rspec
|
38
|
+
requirement: &70167654884180 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70167654884180
|
47
|
+
description: A Ruby library for communicating with your Pebble smartwatch.
|
48
|
+
email: douwe@selenight.nl
|
49
|
+
executables: []
|
50
|
+
extensions: []
|
51
|
+
extra_rdoc_files: []
|
52
|
+
files:
|
53
|
+
- lib/pebble/capabilities.rb
|
54
|
+
- lib/pebble/endpoints.rb
|
55
|
+
- lib/pebble/pebblewatch.rb
|
56
|
+
- lib/pebble/protocol.rb
|
57
|
+
- lib/pebble/system_messages.rb
|
58
|
+
- lib/pebble/version.rb
|
59
|
+
- lib/pebble/watch/event.rb
|
60
|
+
- lib/pebble/watch/log_event.rb
|
61
|
+
- lib/pebble/watch/media_control_event.rb
|
62
|
+
- lib/pebble/watch.rb
|
63
|
+
- lib/pebble.rb
|
64
|
+
- LICENSE
|
65
|
+
- README.md
|
66
|
+
- Rakefile
|
67
|
+
- Gemfile
|
68
|
+
homepage: https://github.com/DouweM/pebblewatch
|
69
|
+
licenses:
|
70
|
+
- MIT
|
71
|
+
post_install_message:
|
72
|
+
rdoc_options: []
|
73
|
+
require_paths:
|
74
|
+
- lib
|
75
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
77
|
+
requirements:
|
78
|
+
- - ! '>='
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
segments:
|
82
|
+
- 0
|
83
|
+
hash: -921215416686416303
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
segments:
|
91
|
+
- 0
|
92
|
+
hash: -921215416686416303
|
93
|
+
requirements: []
|
94
|
+
rubyforge_project:
|
95
|
+
rubygems_version: 1.8.6
|
96
|
+
signing_key:
|
97
|
+
specification_version: 3
|
98
|
+
summary: Pebble communication library
|
99
|
+
test_files: []
|