gom-sensor-ports 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/LICENSE +1 -1
- data/README.mkd +38 -2
- data/Rakefile +0 -62
- data/bin/gom-sensor-port +2 -2
- data/gom-sensor-ports.gemspec +8 -6
- data/lib/gom/sensor_ports/version.rb +1 -1
- data/spec/lib/gom/sensor_port_spec.rb +1 -1
- metadata +10 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee1db02028b2f3a6680c5506734a422474819222
|
4
|
+
data.tar.gz: 7c9de8f1cb14e2203c94d9734148fd5373df7094
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d74a600dfb0c35754bd4b78fce13568f5636e9fced0badf0c905495737a864f21802f31dcb76d244455ba4f082fbac7853981771a668b1696ebb5c60c062941
|
7
|
+
data.tar.gz: f9a2fcc28852b43cb5c28803521fcdce34df9119e3b192a1ef079139aceca3b6c1c929e86612968328ad8efc8be38d1110ecf8e5ec591181d658a4e5150a7676
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gom-sensor-ports (0.2.
|
4
|
+
gom-sensor-ports (0.2.4)
|
5
5
|
daemons
|
6
6
|
gom-core (~> 0.2.2)
|
7
7
|
gom-script (~> 0.2.2)
|
@@ -36,7 +36,7 @@ GEM
|
|
36
36
|
thor (>= 0.14.6)
|
37
37
|
guard-rspec (1.2.0)
|
38
38
|
guard (>= 1.1)
|
39
|
-
json (1.7.
|
39
|
+
json (1.7.7)
|
40
40
|
listen (0.4.7)
|
41
41
|
rb-fchange (~> 0.0.5)
|
42
42
|
rb-fsevent (~> 0.9.1)
|
@@ -44,7 +44,7 @@ GEM
|
|
44
44
|
mongrel (1.2.0.pre2)
|
45
45
|
daemons (~> 1.0.10)
|
46
46
|
gem_plugin (~> 0.2.3)
|
47
|
-
rack (1.
|
47
|
+
rack (1.5.2)
|
48
48
|
rb-fchange (0.0.5)
|
49
49
|
ffi
|
50
50
|
rb-fsevent (0.9.1)
|
data/LICENSE
CHANGED
data/README.mkd
CHANGED
@@ -1,9 +1,44 @@
|
|
1
1
|
# gom-sensor-ports
|
2
|
+
|
2
3
|
Easy UDP/TCP sensor data sending to a remote GOM node. This gem includes a GNP
|
3
4
|
callback server, support for automatic observer refreshments and command line
|
4
5
|
tools for reading, writing and observing GOM entries.
|
5
6
|
|
7
|
+
## Usage
|
8
|
+
|
9
|
+
The gem provides a daemon which connects your sensor to the GOM HTTP update
|
10
|
+
protocol. You can start the daemon from the command line with its GOM URL:
|
11
|
+
|
12
|
+
$ gom-sensor-port http://gom.dev.artcom.de/sensor
|
13
|
+
|
14
|
+
The sensor will load its configuration from that GOM node. The configuration
|
15
|
+
values and their defauls are:
|
16
|
+
|
17
|
+
interface: '0.0.0.0'
|
18
|
+
port: 44470
|
19
|
+
verbose: false
|
20
|
+
mode: :udp
|
21
|
+
|
22
|
+
(Note: only udp mode is currently implemented)
|
23
|
+
Any of these defaults can be change from the command line:
|
24
|
+
|
25
|
+
$ gom-sensor-port --interface=1.1.1.23 http://gom.dev.artcom.de/sensor
|
26
|
+
|
27
|
+
gom-sensor-port will than listen to incoming sensor packages and interpret the
|
28
|
+
incoming messages as simple key value pair which it writes to the GOM:
|
29
|
+
|
30
|
+
received from sensor:
|
31
|
+
|
32
|
+
foo:123
|
33
|
+
|
34
|
+
written to GOM:
|
35
|
+
|
36
|
+
/sensor:raw = 'foo:123'
|
37
|
+
/sensor/values:foo = '123'
|
38
|
+
|
39
|
+
|
6
40
|
## Install
|
41
|
+
|
7
42
|
use the bundler tasks:
|
8
43
|
|
9
44
|
$ rake build install
|
@@ -23,9 +58,10 @@ see Gemfile
|
|
23
58
|
* Add tests for it. This is important so I don't break it in a
|
24
59
|
future version unintentionally.
|
25
60
|
* Commit, do not mess with rakefile, version, or history.
|
26
|
-
(if you want to have your own version, that is fine but bump version in a
|
61
|
+
(if you want to have your own version, that is fine but bump version in a
|
62
|
+
commit by itself I can ignore when I pull)
|
27
63
|
* Send me a pull request. Bonus points for topic branches.
|
28
64
|
|
29
65
|
## Copyright
|
30
66
|
|
31
|
-
Copyright (c) 2010 art+com AG/dirk luesebrink. See LICENSE for details.
|
67
|
+
Copyright (c) 2010/13 art+com AG/dirk luesebrink. See LICENSE for details.
|
data/Rakefile
CHANGED
@@ -1,64 +1,2 @@
|
|
1
1
|
require 'bundler'
|
2
2
|
Bundler::GemHelper.install_tasks
|
3
|
-
|
4
|
-
__END__
|
5
|
-
|
6
|
-
begin
|
7
|
-
require 'jeweler'
|
8
|
-
Jeweler::Tasks.new do |gem|
|
9
|
-
gem.name = "gom-sensor-ports"
|
10
|
-
gem.summary = %Q{
|
11
|
-
gateway for barebone TCP/UDP reporting sensors to GOM/HTTP protocoll
|
12
|
-
}
|
13
|
-
gem.description = %Q{
|
14
|
-
This gems implements a gateway server to allow barebone basic sensor
|
15
|
-
components to report state change updates as simple protocol free udates
|
16
|
-
over TCP/UDP ports without the 'overhead' of the HTTP protocoll. For
|
17
|
-
example, a power sensor might just broadcast a four byte floating point
|
18
|
-
binary number once every second to an UCP port
|
19
|
-
}
|
20
|
-
gem.email = "dirk.luesebrink@gmail.com"
|
21
|
-
gem.homepage = "http://github.com/crux/gom-sensor-ports"
|
22
|
-
gem.authors = ["art+com AG/dirk luesebrink"]
|
23
|
-
|
24
|
-
gem.add_development_dependency "rspec", ">= 1.2.9"
|
25
|
-
gem.add_development_dependency "fakeweb"
|
26
|
-
|
27
|
-
gem.add_runtime_dependency "applix"
|
28
|
-
gem.add_runtime_dependency "gom-script"
|
29
|
-
gem.add_runtime_dependency "gom-core"
|
30
|
-
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
31
|
-
end
|
32
|
-
Jeweler::GemcutterTasks.new
|
33
|
-
rescue LoadError
|
34
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
35
|
-
end
|
36
|
-
|
37
|
-
#require 'spec/rake/spectask'
|
38
|
-
#Spec::Rake::SpecTask.new(:spec) do |spec|
|
39
|
-
# spec.libs << 'lib' << 'spec'
|
40
|
-
# spec.spec_files = FileList['spec/**/*_spec.rb']
|
41
|
-
#end
|
42
|
-
#Spec::Rake::SpecTask.new(:rcov) do |spec|
|
43
|
-
# spec.libs << 'lib' << 'spec'
|
44
|
-
# spec.pattern = 'spec/**/*_spec.rb'
|
45
|
-
# spec.rcov = true
|
46
|
-
#end
|
47
|
-
require 'rspec/core/rake_task'
|
48
|
-
RSpec::Core::RakeTask.new(:rcov) do |t|
|
49
|
-
t.rcov_opts = %q[--exclude "spec"]
|
50
|
-
end
|
51
|
-
|
52
|
-
task :spec => :check_dependencies
|
53
|
-
|
54
|
-
task :default => :spec
|
55
|
-
|
56
|
-
require 'rake/rdoctask'
|
57
|
-
Rake::RDocTask.new do |rdoc|
|
58
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
59
|
-
|
60
|
-
rdoc.rdoc_dir = 'rdoc'
|
61
|
-
rdoc.title = "gom-sensor-ports #{version}"
|
62
|
-
rdoc.rdoc_files.include('README*')
|
63
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
64
|
-
end
|
data/bin/gom-sensor-port
CHANGED
@@ -9,14 +9,14 @@ require 'gom/sensor_port'
|
|
9
9
|
Defaults = { :verbose => false }
|
10
10
|
|
11
11
|
def usage
|
12
|
-
puts "#{__FILE__} serve <
|
12
|
+
puts "#{__FILE__} serve <GOM URL, e.g: http://gom.dev.artcom.de/sensors/udp>"
|
13
13
|
end
|
14
14
|
|
15
15
|
Applix.main(ARGV, Defaults) do
|
16
16
|
|
17
17
|
any { usage }
|
18
18
|
|
19
|
-
# example: gom-sensor-port serve
|
19
|
+
# example: gom-sensor-port serve http://gom.dev.artcom.de/sensors/udp
|
20
20
|
handle(:serve) do |*args, options|
|
21
21
|
puts "args: #{args.inspect}"
|
22
22
|
puts "opts: #{options}"
|
data/gom-sensor-ports.gemspec
CHANGED
@@ -9,14 +9,16 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.email = ['dirk.luesebrink@artcom.de']
|
10
10
|
s.homepage = 'http://github.com/crux/gom-sensor-ports'
|
11
11
|
s.summary = %q{
|
12
|
-
gateway for barebone TCP/UCP reporting sensors to GOM/HTTP
|
12
|
+
gateway for barebone TCP/UCP reporting sensors to GOM/HTTP protocol
|
13
13
|
}
|
14
14
|
s.description = %q{
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
Implements a gateway server to allow barebone basic sensor components to
|
16
|
+
report state change updates as simple via TCP/UDP ports without the
|
17
|
+
'overhead' of the HTTP protocol. A power sensor for example might just
|
18
|
+
broadcast a four byte floating point binary number once every second to an
|
19
|
+
UDP port or an arduino board sends a UDP datagram whenever a button is
|
20
|
+
pushed. You get the idea, this is how to bring embedded devices into the
|
21
|
+
world of HTTP and Javascript...
|
20
22
|
}
|
21
23
|
|
22
24
|
s.add_dependency 'daemons'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gom-sensor-ports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- art+com/dirk luesebrink
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|
@@ -150,11 +150,13 @@ dependencies:
|
|
150
150
|
- - '>='
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
-
description: " \n
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
153
|
+
description: " \n Implements a gateway server to allow barebone basic sensor components
|
154
|
+
to\n report state change updates as simple via TCP/UDP ports without the\n 'overhead'
|
155
|
+
of the HTTP protocol. A power sensor for example might just\n broadcast a four
|
156
|
+
byte floating point binary number once every second to an\n UDP port or an arduino
|
157
|
+
board sends a UDP datagram whenever a button is\n pushed. You get the idea, this
|
158
|
+
is how to bring embedded devices into the\n world of HTTP and Javascript...\n
|
159
|
+
\ "
|
158
160
|
email:
|
159
161
|
- dirk.luesebrink@artcom.de
|
160
162
|
executables:
|
@@ -207,7 +209,7 @@ rubyforge_project:
|
|
207
209
|
rubygems_version: 2.0.3
|
208
210
|
signing_key:
|
209
211
|
specification_version: 4
|
210
|
-
summary: gateway for barebone TCP/UCP reporting sensors to GOM/HTTP
|
212
|
+
summary: gateway for barebone TCP/UCP reporting sensors to GOM/HTTP protocol
|
211
213
|
test_files:
|
212
214
|
- spec/lib/gom/sensor_port_spec.rb
|
213
215
|
- spec/lib/gom/sensor_ports_spec.rb
|