home_assistant-ble 1.0.0.pre.alpha.pre.11 → 1.0.0.pre.alpha.pre.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -0
- data/README.md +1 -0
- data/home_assistant-ble.gemspec +3 -0
- data/lib/home_assistant/ble.rb +4 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d9663d0255628f4b6463e393ed6b8fbee01fc9e
|
4
|
+
data.tar.gz: 121f629c30806a6ea82c1a2dfcefb1e733cdabea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d163460ad0b9261d868516b13ce50041f8f8cd19d944182ede347802989ab0ab08701d1fa011a08af09ff64c5e3a40a85500deca96d943cd25c967ff12da0f45
|
7
|
+
data.tar.gz: 31ef017bfc0bb79e48fb163751121a3fe68d99ae54cea76784d4ea4a467eceffd84cc65a863d5cd8c80ab28ed61fd8cc3cdc638a03f89ab62352b9f572d9fe24
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -24,6 +24,7 @@ To be able to run with a non-root user, read http://unix.stackexchange.com/quest
|
|
24
24
|
sudo apt install libcap2-bin
|
25
25
|
sudo setcap 'cap_net_raw,cap_net_admin+eip' `readlink -f \`which ruby\``
|
26
26
|
```
|
27
|
+
**Note**: these instructions are probably not sufficient, see https://github.com/kamaradclimber/home_assistant-ble/issues/1
|
27
28
|
|
28
29
|
## Configuration
|
29
30
|
|
data/home_assistant-ble.gemspec
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# coding: utf-8
|
2
|
+
|
2
3
|
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
|
3
5
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
6
|
require 'home_assistant/ble/version'
|
5
7
|
|
@@ -28,4 +30,5 @@ Gem::Specification.new do |spec|
|
|
28
30
|
|
29
31
|
spec.add_runtime_dependency 'ble'
|
30
32
|
spec.add_runtime_dependency 'mash'
|
33
|
+
spec.add_runtime_dependency 'cap2'
|
31
34
|
end
|
data/lib/home_assistant/ble.rb
CHANGED
@@ -4,6 +4,7 @@ require 'mash'
|
|
4
4
|
require 'net/http'
|
5
5
|
require 'uri'
|
6
6
|
require 'json'
|
7
|
+
require 'cap2'
|
7
8
|
|
8
9
|
module HomeAssistant
|
9
10
|
module Ble
|
@@ -123,6 +124,9 @@ module HomeAssistant
|
|
123
124
|
rescue DBus::Error => e
|
124
125
|
raise unless e.message =~ /DBus.Error.AccessDenied/
|
125
126
|
log 'Not enough rights to use bluetooth device, read https://github.com/kamaradclimber/home_assistant-ble'
|
127
|
+
log 'See also https://github.com/kamaradclimber/home_assistant-ble/issues/1'
|
128
|
+
log 'Current capabilities:'
|
129
|
+
log Cap2.process.inspect
|
126
130
|
exit 1
|
127
131
|
end
|
128
132
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: home_assistant-ble
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.pre.alpha.pre.
|
4
|
+
version: 1.0.0.pre.alpha.pre.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grégoire Seux
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: cap2
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
description: home-assistant does not cope well with bluetooth on raspberry pi. This
|
84
98
|
gem sends event to HA.
|
85
99
|
email:
|