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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4db3623100d5b5d6b072a87f6d963bb30fcf240
4
- data.tar.gz: 4611ae90eb9695db6082b23754883ac1dcc87b49
3
+ metadata.gz: 8d9663d0255628f4b6463e393ed6b8fbee01fc9e
4
+ data.tar.gz: 121f629c30806a6ea82c1a2dfcefb1e733cdabea
5
5
  SHA512:
6
- metadata.gz: bcbc08493c1a95264c157a98540b0e8393bf335eb1209d1fe7eaa9b03d9a7569c7b1edd92652e8218369ce6ee0a2a4ce46a89f2cd4b050a0ddf0bd84d557cd72
7
- data.tar.gz: f71b43e9f8af0c3a9850af23d62fc093a1537cef941c678810207e33938955d5584743a469ce7d4430eac2d3f5a72d59d1a33bbb174b30cbc49618144ce3638d
6
+ metadata.gz: d163460ad0b9261d868516b13ce50041f8f8cd19d944182ede347802989ab0ab08701d1fa011a08af09ff64c5e3a40a85500deca96d943cd25c967ff12da0f45
7
+ data.tar.gz: 31ef017bfc0bb79e48fb163751121a3fe68d99ae54cea76784d4ea4a467eceffd84cc65a863d5cd8c80ab28ed61fd8cc3cdc638a03f89ab62352b9f572d9fe24
data/.travis.yml CHANGED
@@ -10,3 +10,8 @@ deploy:
10
10
  gem: home_assistant-ble
11
11
  on:
12
12
  repo: kamaradclimber/home_assistant-ble
13
+ addons:
14
+ apt:
15
+ packages:
16
+ - libcap2-bin
17
+ - libcap2-dev
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
 
@@ -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
@@ -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.11
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: