ruby_home 0.2.1 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/tests.yml +41 -0
- data/.gitignore +2 -2
- data/.rubocop.yml +2 -9
- data/.standard.yml +3 -0
- data/CHANGELOG.md +18 -0
- data/Gemfile +2 -2
- data/README.md +40 -77
- data/Rakefile +4 -4
- data/examples/air_purifier.rb +66 -0
- data/examples/air_quality_sensor.rb +119 -0
- data/examples/battery_service.rb +58 -0
- data/examples/carbon_dioxide_sensor.rb +78 -0
- data/examples/carbon_monoxide_sensor.rb +78 -0
- data/examples/contact_sensor.rb +66 -0
- data/examples/door.rb +48 -0
- data/examples/fan.rb +30 -0
- data/examples/fan_v2.rb +68 -0
- data/examples/garage_door_opener.rb +71 -0
- data/examples/heater_cooler.rb +92 -0
- data/examples/humidifier_dehumidifier.rb +88 -0
- data/examples/humidity_sensor.rb +62 -0
- data/examples/leak_sensor.rb +66 -0
- data/examples/light_sensor.rb +64 -0
- data/examples/lightbulb.rb +31 -0
- data/examples/lock_mechanism.rb +34 -0
- data/examples/motion_sensor.rb +66 -0
- data/examples/occupancy_sensor.rb +66 -0
- data/examples/outlet.rb +29 -0
- data/examples/security_system.rb +53 -0
- data/examples/smoke_sensor.rb +66 -0
- data/examples/switch.rb +16 -0
- data/examples/television.rb +73 -0
- data/examples/temperature_sensor.rb +62 -0
- data/examples/thermostat.rb +113 -0
- data/examples/window.rb +48 -0
- data/examples/window_covering.rb +72 -0
- data/lib/ruby_home.rb +21 -22
- data/lib/ruby_home/accessory.rb +1 -1
- data/lib/ruby_home/accessory_collection.rb +6 -6
- data/lib/ruby_home/accessory_info.rb +18 -18
- data/lib/ruby_home/characteristic.rb +13 -7
- data/lib/ruby_home/characteristic_collection.rb +13 -13
- data/lib/ruby_home/config/categories.yml +39 -0
- data/lib/ruby_home/config/characteristics.yml +190 -319
- data/lib/ruby_home/config/manual_characteristics.yml +278 -0
- data/lib/ruby_home/config/manual_services.yml +45 -0
- data/lib/ruby_home/config/services.yml +338 -304
- data/lib/ruby_home/configuration.rb +21 -2
- data/lib/ruby_home/device_id.rb +3 -3
- data/lib/ruby_home/dns/service.rb +4 -6
- data/lib/ruby_home/dns/text_record.rb +10 -10
- data/lib/ruby_home/errors.rb +1 -0
- data/lib/ruby_home/factories/characteristic_factory.rb +38 -37
- data/lib/ruby_home/factories/service_factory.rb +72 -72
- data/lib/ruby_home/factories/templates/characteristic_template.rb +6 -6
- data/lib/ruby_home/factories/templates/service_template.rb +12 -11
- data/lib/ruby_home/hap/crypto/chacha20poly1305.rb +2 -2
- data/lib/ruby_home/hap/crypto/hkdf.rb +4 -4
- data/lib/ruby_home/hap/crypto/session_key.rb +7 -7
- data/lib/ruby_home/hap/decrypter.rb +8 -8
- data/lib/ruby_home/hap/encrypter.rb +5 -6
- data/lib/ruby_home/hap/ev_response.rb +17 -17
- data/lib/ruby_home/hap/hap_request.rb +1 -1
- data/lib/ruby_home/hap/server.rb +4 -4
- data/lib/ruby_home/hap/server_handler.rb +8 -10
- data/lib/ruby_home/hap/session.rb +22 -22
- data/lib/ruby_home/hap/values/base_value.rb +3 -3
- data/lib/ruby_home/hap/values/bool_value.rb +4 -4
- data/lib/ruby_home/hap/values/float_value.rb +4 -4
- data/lib/ruby_home/hap/values/identify_value.rb +1 -1
- data/lib/ruby_home/hap/values/int32_value.rb +4 -4
- data/lib/ruby_home/hap/values/null_value.rb +1 -1
- data/lib/ruby_home/hap/values/string_value.rb +11 -11
- data/lib/ruby_home/hap/values/uint32_value.rb +5 -5
- data/lib/ruby_home/hap/values/uint8_value.rb +14 -14
- data/lib/ruby_home/hex_helper.rb +3 -3
- data/lib/ruby_home/http/application.rb +7 -7
- data/lib/ruby_home/http/controllers/accessories_controller.rb +3 -3
- data/lib/ruby_home/http/controllers/application_controller.rb +6 -6
- data/lib/ruby_home/http/controllers/characteristics_controller.rb +29 -29
- data/lib/ruby_home/http/controllers/identify_controller.rb +10 -10
- data/lib/ruby_home/http/controllers/pair_setups_controller.rb +19 -19
- data/lib/ruby_home/http/controllers/pair_verifies_controller.rb +9 -9
- data/lib/ruby_home/http/controllers/pairings_controller.rb +6 -6
- data/lib/ruby_home/http/serializers/accessory_serializer.rb +5 -5
- data/lib/ruby_home/http/serializers/characteristic_serializer.rb +27 -19
- data/lib/ruby_home/http/serializers/characteristic_value_serializer.rb +5 -5
- data/lib/ruby_home/http/serializers/object_serializer.rb +1 -1
- data/lib/ruby_home/http/serializers/service_serializer.rb +19 -9
- data/lib/ruby_home/http/serializers/uuid_helper.rb +2 -2
- data/lib/ruby_home/http/services/session_notifier.rb +8 -8
- data/lib/ruby_home/http/services/start_srp_service.rb +3 -3
- data/lib/ruby_home/http/services/verify_finish_service.rb +22 -22
- data/lib/ruby_home/http/services/verify_srp_service.rb +22 -22
- data/lib/ruby_home/identifier_cache.rb +4 -5
- data/lib/ruby_home/password.rb +14 -14
- data/lib/ruby_home/persistable.rb +19 -12
- data/lib/ruby_home/service.rb +5 -2
- data/lib/ruby_home/service_collection.rb +1 -1
- data/lib/ruby_home/version.rb +1 -1
- data/rubyhome.gemspec +31 -31
- data/sbin/characteristic_generator.rb +22 -24
- data/sbin/service_generator.rb +38 -19
- metadata +85 -44
- data/.travis.yml +0 -31
@@ -1,16 +1,17 @@
|
|
1
|
-
require
|
1
|
+
require "facets/cattr"
|
2
2
|
|
3
3
|
module RubyHome
|
4
4
|
module Persistable
|
5
5
|
def self.included(base)
|
6
6
|
base.send(:cattr_accessor, :source)
|
7
|
+
base.send(:cattr_accessor, :cache)
|
7
8
|
base.extend(ClassMethods)
|
8
9
|
end
|
9
10
|
|
10
11
|
module ClassMethods
|
11
12
|
def persisted
|
12
|
-
if yaml = read
|
13
|
-
new(yaml)
|
13
|
+
if (yaml = read)
|
14
|
+
new(**yaml)
|
14
15
|
end
|
15
16
|
end
|
16
17
|
|
@@ -19,23 +20,29 @@ module RubyHome
|
|
19
20
|
end
|
20
21
|
|
21
22
|
def write(collection)
|
22
|
-
|
23
|
+
self.cache = collection
|
24
|
+
persist
|
25
|
+
|
26
|
+
true
|
23
27
|
end
|
24
28
|
|
25
|
-
def
|
26
|
-
|
29
|
+
def persist
|
30
|
+
File.write(source, cache.to_yaml)
|
31
|
+
end
|
27
32
|
|
33
|
+
def read_persisted
|
28
34
|
YAML.load_file(source)
|
35
|
+
rescue Errno::ENOENT
|
36
|
+
false
|
29
37
|
end
|
30
38
|
|
31
|
-
def
|
32
|
-
|
33
|
-
|
34
|
-
File.truncate(source, 0)
|
39
|
+
def read
|
40
|
+
self.cache ||= read_persisted
|
35
41
|
end
|
36
42
|
|
37
|
-
def
|
38
|
-
|
43
|
+
def reset
|
44
|
+
self.cache = nil
|
45
|
+
persist
|
39
46
|
end
|
40
47
|
end
|
41
48
|
|
data/lib/ruby_home/service.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
require_relative
|
1
|
+
require_relative "service_collection"
|
2
2
|
|
3
3
|
module RubyHome
|
4
4
|
class DuplicateServiceError < StandardError; end
|
5
5
|
|
6
6
|
class Service
|
7
|
-
def initialize(accessory
|
7
|
+
def initialize(accessory:, name:, description:, uuid:, primary: false, hidden: false)
|
8
8
|
@accessory = accessory
|
9
9
|
@primary = primary
|
10
10
|
@hidden = hidden
|
@@ -12,6 +12,7 @@ module RubyHome
|
|
12
12
|
@description = description
|
13
13
|
@uuid = uuid
|
14
14
|
@characteristics = CharacteristicCollection.new
|
15
|
+
@linked = []
|
15
16
|
end
|
16
17
|
|
17
18
|
attr_reader(
|
@@ -25,6 +26,8 @@ module RubyHome
|
|
25
26
|
:instance_id
|
26
27
|
)
|
27
28
|
|
29
|
+
attr_accessor :linked
|
30
|
+
|
28
31
|
def instance_id=(new_id)
|
29
32
|
raise DuplicateServiceError if accessory.contains_instance_id?(new_id)
|
30
33
|
|
data/lib/ruby_home/version.rb
CHANGED
data/rubyhome.gemspec
CHANGED
@@ -1,45 +1,45 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
3
|
+
require "ruby_home/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name
|
8
|
-
spec.version
|
9
|
-
spec.authors
|
10
|
-
spec.email
|
11
|
-
spec.summary
|
12
|
-
spec.description
|
6
|
+
spec.name = "ruby_home"
|
7
|
+
spec.version = RubyHome::VERSION
|
8
|
+
spec.authors = ["Karl Entwistle"]
|
9
|
+
spec.email = ["karl@entwistle.com"]
|
10
|
+
spec.summary = "Ruby HomeKit support"
|
11
|
+
spec.description = <<~DESCRIPTION
|
13
12
|
RubyHome is a lightweight service you can run on your home network that
|
14
13
|
emulates the iOS HomeKit API. It supports community contributed plugins, which
|
15
14
|
are modules that provide a bridge from HomeKit to various 3rd-party APIs
|
16
15
|
provided by manufacturers of smart home devices.
|
17
16
|
DESCRIPTION
|
18
|
-
spec.homepage
|
19
|
-
spec.license
|
17
|
+
spec.homepage = "https://github.com/karlentwistle/ruby_home"
|
18
|
+
spec.license = "MIT"
|
20
19
|
|
21
|
-
spec.files
|
20
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
22
21
|
f.match(%r{^(test|spec|features)/})
|
23
22
|
end
|
24
|
-
spec.bindir
|
25
|
-
spec.executables
|
26
|
-
spec.require_paths = [
|
27
|
-
spec.required_ruby_version =
|
23
|
+
spec.bindir = "bin"
|
24
|
+
spec.executables = ["ruby_home"]
|
25
|
+
spec.require_paths = ["lib"]
|
26
|
+
spec.required_ruby_version = ">= 2.5.0"
|
28
27
|
|
29
|
-
spec.add_dependency
|
30
|
-
spec.add_dependency
|
31
|
-
spec.add_dependency
|
32
|
-
spec.add_dependency
|
33
|
-
spec.add_dependency
|
34
|
-
spec.add_dependency
|
35
|
-
spec.add_dependency
|
36
|
-
spec.add_dependency
|
37
|
-
spec.add_dependency
|
38
|
-
spec.add_dependency
|
28
|
+
spec.add_dependency "dnssd", "~> 3.0"
|
29
|
+
spec.add_dependency "facets", "~> 3.1"
|
30
|
+
spec.add_dependency "hkdf", "~> 1.0.0"
|
31
|
+
spec.add_dependency "oj", "~> 3.10"
|
32
|
+
spec.add_dependency "rbnacl", "~> 7.0"
|
33
|
+
spec.add_dependency "ruby_home-srp", "~> 1.3"
|
34
|
+
spec.add_dependency "ruby_home-tlv", "~> 0.1"
|
35
|
+
spec.add_dependency "sinatra", "~> 2.0"
|
36
|
+
spec.add_dependency "webrick", "~> 1.7"
|
37
|
+
spec.add_dependency "wisper", "~> 2.0"
|
39
38
|
|
40
|
-
spec.add_development_dependency
|
41
|
-
spec.add_development_dependency
|
42
|
-
spec.add_development_dependency
|
43
|
-
spec.add_development_dependency
|
44
|
-
spec.add_development_dependency
|
39
|
+
spec.add_development_dependency "byebug", "~> 11.0"
|
40
|
+
spec.add_development_dependency "plist", "~> 3.4"
|
41
|
+
spec.add_development_dependency "rack-test", "~> 1.1.0"
|
42
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
43
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
44
|
+
spec.add_development_dependency "standard", "~> 1.0"
|
45
45
|
end
|
@@ -1,39 +1,39 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
3
|
+
require "byebug"
|
4
|
+
require "plist"
|
5
|
+
require "yaml"
|
6
6
|
|
7
7
|
module RubyHome
|
8
8
|
class CharacteristicGenerator
|
9
9
|
class << self
|
10
10
|
def run
|
11
11
|
convert_binary_plist
|
12
|
-
File.open(file_path,
|
12
|
+
File.open(file_path, "w") do |file|
|
13
13
|
file.write generate_characteristics.to_yaml
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
17
|
def generate_characteristics
|
18
|
-
parsed_xml[
|
18
|
+
parsed_xml["Characteristics"].map do |characteristics_xml|
|
19
19
|
new(characteristics_xml).generate_characteristic_hash
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
23
|
def convert_binary_plist
|
24
24
|
system([
|
25
|
-
|
26
|
-
|
25
|
+
"plutil -convert xml1 -o",
|
26
|
+
"/tmp/Accessory.xml",
|
27
27
|
"\'/Applications/Utilities/HomeKit\ Accessory\ Simulator.app/Contents/Frameworks/HAPAccessoryKit.framework/Versions/A/Resources/default.metadata.plist\'"
|
28
|
-
].join(
|
28
|
+
].join(" "))
|
29
29
|
end
|
30
30
|
|
31
31
|
def parsed_xml
|
32
|
-
Plist.parse_xml(
|
32
|
+
Plist.parse_xml("/tmp/Accessory.xml")
|
33
33
|
end
|
34
34
|
|
35
35
|
def file_path
|
36
|
-
File.dirname(__FILE__) +
|
36
|
+
File.dirname(__FILE__) + "/../lib/ruby_home/config/characteristics.yml"
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
@@ -41,7 +41,6 @@ module RubyHome
|
|
41
41
|
@constraints = xml["Constraints"]
|
42
42
|
@format = xml["Format"]
|
43
43
|
@name = xml["Name"]
|
44
|
-
@permissions = xml["Permissions"]
|
45
44
|
@properties = xml["Properties"]
|
46
45
|
@uuid = xml["UUID"]
|
47
46
|
@unit = xml["Unit"]
|
@@ -54,29 +53,28 @@ module RubyHome
|
|
54
53
|
uuid: uuid,
|
55
54
|
format: format,
|
56
55
|
unit: sanitized_unit,
|
57
|
-
permissions: permissions,
|
58
56
|
properties: properties,
|
59
|
-
constraints: constraints
|
57
|
+
constraints: constraints
|
60
58
|
}
|
61
59
|
end
|
62
60
|
|
63
61
|
private
|
64
62
|
|
65
|
-
|
66
|
-
|
67
|
-
|
63
|
+
def sanitized_name
|
64
|
+
name.downcase.tr(" ", "_").tr(".", "_")
|
65
|
+
end
|
68
66
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
end
|
67
|
+
def sanitized_unit
|
68
|
+
if unit
|
69
|
+
"\"#{unit}\""
|
70
|
+
else
|
71
|
+
"nil"
|
75
72
|
end
|
73
|
+
end
|
76
74
|
|
77
|
-
|
75
|
+
private
|
78
76
|
|
79
|
-
|
77
|
+
attr_reader :constraints, :format, :name, :properties, :uuid, :unit
|
80
78
|
end
|
81
79
|
end
|
82
80
|
|
data/sbin/service_generator.rb
CHANGED
@@ -1,46 +1,47 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
3
|
+
require "byebug"
|
4
|
+
require "plist"
|
5
|
+
require "yaml"
|
6
|
+
require_relative "../lib/ruby_home"
|
6
7
|
|
7
8
|
module RubyHome
|
8
9
|
class ServiceGenerator
|
9
10
|
class << self
|
10
11
|
def run
|
11
12
|
convert_binary_plist
|
12
|
-
File.open(file_path,
|
13
|
+
File.open(file_path, "w") do |file|
|
13
14
|
file.write generate_services.to_yaml
|
14
15
|
end
|
15
16
|
end
|
16
17
|
|
17
18
|
def generate_services
|
18
|
-
parsed_xml[
|
19
|
+
parsed_xml["Services"].map do |services_xml|
|
19
20
|
new(services_xml).generate_service_hash
|
20
21
|
end
|
21
22
|
end
|
22
23
|
|
23
24
|
def convert_binary_plist
|
24
25
|
system([
|
25
|
-
|
26
|
-
|
26
|
+
"plutil -convert xml1 -o",
|
27
|
+
"/tmp/Accessory.xml",
|
27
28
|
"\'/Applications/Utilities/HomeKit\ Accessory\ Simulator.app/Contents/Frameworks/HAPAccessoryKit.framework/Versions/A/Resources/default.metadata.plist\'"
|
28
|
-
].join(
|
29
|
+
].join(" "))
|
29
30
|
end
|
30
31
|
|
31
32
|
def parsed_xml
|
32
|
-
Plist.parse_xml(
|
33
|
+
Plist.parse_xml("/tmp/Accessory.xml")
|
33
34
|
end
|
34
35
|
|
35
36
|
def file_path
|
36
|
-
File.dirname(__FILE__) +
|
37
|
+
File.dirname(__FILE__) + "/../lib/ruby_home/config/services.yml"
|
37
38
|
end
|
38
39
|
end
|
39
40
|
|
40
41
|
def initialize(xml)
|
41
42
|
@name = xml["Name"]
|
42
|
-
@
|
43
|
-
@
|
43
|
+
@optional_characteristic_uuids = xml["OptionalCharacteristics"]
|
44
|
+
@required_characteristic_uuids = xml["RequiredCharacteristics"]
|
44
45
|
@uuid = xml["UUID"]
|
45
46
|
end
|
46
47
|
|
@@ -49,20 +50,38 @@ module RubyHome
|
|
49
50
|
name: sanitized_name.to_sym,
|
50
51
|
description: name,
|
51
52
|
uuid: uuid,
|
52
|
-
|
53
|
-
|
53
|
+
optional_characteristic_names: optional_characteristic_names.sort,
|
54
|
+
required_characteristic_names: required_characteristic_names.sort
|
54
55
|
}
|
55
56
|
end
|
56
57
|
|
57
58
|
private
|
58
59
|
|
59
|
-
|
60
|
-
|
61
|
-
|
60
|
+
def sanitized_name
|
61
|
+
name.downcase.tr(" ", "_")
|
62
|
+
end
|
63
|
+
|
64
|
+
def optional_characteristic_names
|
65
|
+
optional_characteristic_uuids.map do |uuid|
|
66
|
+
RubyHome::CharacteristicTemplate.find_by(uuid: uuid).name
|
67
|
+
end + additional_optional_characteristic_names
|
68
|
+
end
|
69
|
+
|
70
|
+
ADDITIONAL_OPTIONAL_CHARACTERISTIC_NAMES = {
|
71
|
+
"lightbulb" => [:color_temperature]
|
72
|
+
}.freeze
|
62
73
|
|
63
|
-
|
74
|
+
def additional_optional_characteristic_names
|
75
|
+
ADDITIONAL_OPTIONAL_CHARACTERISTIC_NAMES.fetch(sanitized_name, [])
|
76
|
+
end
|
77
|
+
|
78
|
+
def required_characteristic_names
|
79
|
+
required_characteristic_uuids.map do |uuid|
|
80
|
+
RubyHome::CharacteristicTemplate.find_by(uuid: uuid).name
|
81
|
+
end
|
82
|
+
end
|
64
83
|
|
65
|
-
|
84
|
+
attr_reader :name, :required_characteristic_uuids, :optional_characteristic_uuids, :uuid
|
66
85
|
end
|
67
86
|
end
|
68
87
|
|
metadata
CHANGED
@@ -1,35 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_home
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karl Entwistle
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: bindata
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '2.4'
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 2.4.3
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
requirements:
|
27
|
-
- - "~>"
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '2.4'
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 2.4.3
|
33
13
|
- !ruby/object:Gem::Dependency
|
34
14
|
name: dnssd
|
35
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,42 +44,42 @@ dependencies:
|
|
64
44
|
requirements:
|
65
45
|
- - "~>"
|
66
46
|
- !ruby/object:Gem::Version
|
67
|
-
version: 0.
|
47
|
+
version: 1.0.0
|
68
48
|
type: :runtime
|
69
49
|
prerelease: false
|
70
50
|
version_requirements: !ruby/object:Gem::Requirement
|
71
51
|
requirements:
|
72
52
|
- - "~>"
|
73
53
|
- !ruby/object:Gem::Version
|
74
|
-
version: 0.
|
54
|
+
version: 1.0.0
|
75
55
|
- !ruby/object:Gem::Dependency
|
76
56
|
name: oj
|
77
57
|
requirement: !ruby/object:Gem::Requirement
|
78
58
|
requirements:
|
79
|
-
- -
|
59
|
+
- - "~>"
|
80
60
|
- !ruby/object:Gem::Version
|
81
|
-
version: 3.
|
61
|
+
version: '3.10'
|
82
62
|
type: :runtime
|
83
63
|
prerelease: false
|
84
64
|
version_requirements: !ruby/object:Gem::Requirement
|
85
65
|
requirements:
|
86
|
-
- -
|
66
|
+
- - "~>"
|
87
67
|
- !ruby/object:Gem::Version
|
88
|
-
version: 3.
|
68
|
+
version: '3.10'
|
89
69
|
- !ruby/object:Gem::Dependency
|
90
70
|
name: rbnacl
|
91
71
|
requirement: !ruby/object:Gem::Requirement
|
92
72
|
requirements:
|
93
73
|
- - "~>"
|
94
74
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
75
|
+
version: '7.0'
|
96
76
|
type: :runtime
|
97
77
|
prerelease: false
|
98
78
|
version_requirements: !ruby/object:Gem::Requirement
|
99
79
|
requirements:
|
100
80
|
- - "~>"
|
101
81
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
82
|
+
version: '7.0'
|
103
83
|
- !ruby/object:Gem::Dependency
|
104
84
|
name: ruby_home-srp
|
105
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,28 +100,42 @@ dependencies:
|
|
120
100
|
requirements:
|
121
101
|
- - "~>"
|
122
102
|
- !ruby/object:Gem::Version
|
123
|
-
version: 0.1
|
103
|
+
version: '0.1'
|
124
104
|
type: :runtime
|
125
105
|
prerelease: false
|
126
106
|
version_requirements: !ruby/object:Gem::Requirement
|
127
107
|
requirements:
|
128
108
|
- - "~>"
|
129
109
|
- !ruby/object:Gem::Version
|
130
|
-
version: 0.1
|
110
|
+
version: '0.1'
|
131
111
|
- !ruby/object:Gem::Dependency
|
132
112
|
name: sinatra
|
133
113
|
requirement: !ruby/object:Gem::Requirement
|
134
114
|
requirements:
|
135
|
-
- -
|
115
|
+
- - "~>"
|
136
116
|
- !ruby/object:Gem::Version
|
137
|
-
version: 2.0
|
117
|
+
version: '2.0'
|
138
118
|
type: :runtime
|
139
119
|
prerelease: false
|
140
120
|
version_requirements: !ruby/object:Gem::Requirement
|
141
121
|
requirements:
|
142
|
-
- -
|
122
|
+
- - "~>"
|
143
123
|
- !ruby/object:Gem::Version
|
144
|
-
version: 2.0
|
124
|
+
version: '2.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: webrick
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.7'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.7'
|
145
139
|
- !ruby/object:Gem::Dependency
|
146
140
|
name: wisper
|
147
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -204,14 +198,14 @@ dependencies:
|
|
204
198
|
requirements:
|
205
199
|
- - "~>"
|
206
200
|
- !ruby/object:Gem::Version
|
207
|
-
version: '
|
201
|
+
version: '13.0'
|
208
202
|
type: :development
|
209
203
|
prerelease: false
|
210
204
|
version_requirements: !ruby/object:Gem::Requirement
|
211
205
|
requirements:
|
212
206
|
- - "~>"
|
213
207
|
- !ruby/object:Gem::Version
|
214
|
-
version: '
|
208
|
+
version: '13.0'
|
215
209
|
- !ruby/object:Gem::Dependency
|
216
210
|
name: rspec
|
217
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -226,6 +220,20 @@ dependencies:
|
|
226
220
|
- - "~>"
|
227
221
|
- !ruby/object:Gem::Version
|
228
222
|
version: '3.0'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: standard
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - "~>"
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '1.0'
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - "~>"
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '1.0'
|
229
237
|
description: |
|
230
238
|
RubyHome is a lightweight service you can run on your home network that
|
231
239
|
emulates the iOS HomeKit API. It supports community contributed plugins, which
|
@@ -238,11 +246,13 @@ executables:
|
|
238
246
|
extensions: []
|
239
247
|
extra_rdoc_files: []
|
240
248
|
files:
|
249
|
+
- ".github/workflows/tests.yml"
|
241
250
|
- ".gitignore"
|
242
251
|
- ".hound.yml"
|
243
252
|
- ".rspec"
|
244
253
|
- ".rubocop.yml"
|
245
|
-
- ".
|
254
|
+
- ".standard.yml"
|
255
|
+
- CHANGELOG.md
|
246
256
|
- Gemfile
|
247
257
|
- LICENSE
|
248
258
|
- README.md
|
@@ -250,13 +260,44 @@ files:
|
|
250
260
|
- bin/console
|
251
261
|
- bin/ruby_home
|
252
262
|
- bin/setup
|
263
|
+
- examples/air_purifier.rb
|
264
|
+
- examples/air_quality_sensor.rb
|
265
|
+
- examples/battery_service.rb
|
266
|
+
- examples/carbon_dioxide_sensor.rb
|
267
|
+
- examples/carbon_monoxide_sensor.rb
|
268
|
+
- examples/contact_sensor.rb
|
269
|
+
- examples/door.rb
|
270
|
+
- examples/fan.rb
|
271
|
+
- examples/fan_v2.rb
|
272
|
+
- examples/garage_door_opener.rb
|
273
|
+
- examples/heater_cooler.rb
|
274
|
+
- examples/humidifier_dehumidifier.rb
|
275
|
+
- examples/humidity_sensor.rb
|
276
|
+
- examples/leak_sensor.rb
|
277
|
+
- examples/light_sensor.rb
|
278
|
+
- examples/lightbulb.rb
|
279
|
+
- examples/lock_mechanism.rb
|
280
|
+
- examples/motion_sensor.rb
|
281
|
+
- examples/occupancy_sensor.rb
|
282
|
+
- examples/outlet.rb
|
283
|
+
- examples/security_system.rb
|
284
|
+
- examples/smoke_sensor.rb
|
285
|
+
- examples/switch.rb
|
286
|
+
- examples/television.rb
|
287
|
+
- examples/temperature_sensor.rb
|
288
|
+
- examples/thermostat.rb
|
289
|
+
- examples/window.rb
|
290
|
+
- examples/window_covering.rb
|
253
291
|
- lib/ruby_home.rb
|
254
292
|
- lib/ruby_home/accessory.rb
|
255
293
|
- lib/ruby_home/accessory_collection.rb
|
256
294
|
- lib/ruby_home/accessory_info.rb
|
257
295
|
- lib/ruby_home/characteristic.rb
|
258
296
|
- lib/ruby_home/characteristic_collection.rb
|
297
|
+
- lib/ruby_home/config/categories.yml
|
259
298
|
- lib/ruby_home/config/characteristics.yml
|
299
|
+
- lib/ruby_home/config/manual_characteristics.yml
|
300
|
+
- lib/ruby_home/config/manual_services.yml
|
260
301
|
- lib/ruby_home/config/services.yml
|
261
302
|
- lib/ruby_home/configuration.rb
|
262
303
|
- lib/ruby_home/device_id.rb
|
@@ -320,7 +361,7 @@ homepage: https://github.com/karlentwistle/ruby_home
|
|
320
361
|
licenses:
|
321
362
|
- MIT
|
322
363
|
metadata: {}
|
323
|
-
post_install_message:
|
364
|
+
post_install_message:
|
324
365
|
rdoc_options: []
|
325
366
|
require_paths:
|
326
367
|
- lib
|
@@ -328,15 +369,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
328
369
|
requirements:
|
329
370
|
- - ">="
|
330
371
|
- !ruby/object:Gem::Version
|
331
|
-
version: 2.
|
372
|
+
version: 2.5.0
|
332
373
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
333
374
|
requirements:
|
334
375
|
- - ">="
|
335
376
|
- !ruby/object:Gem::Version
|
336
377
|
version: '0'
|
337
378
|
requirements: []
|
338
|
-
rubygems_version: 3.
|
339
|
-
signing_key:
|
379
|
+
rubygems_version: 3.2.15
|
380
|
+
signing_key:
|
340
381
|
specification_version: 4
|
341
382
|
summary: Ruby HomeKit support
|
342
383
|
test_files: []
|