m2x-mqtt 0.0.2 → 0.1.0
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.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/lib/m2x/mqtt.rb +6 -0
- data/lib/m2x/mqtt/version.rb +1 -1
- data/m2x-mqtt.gemspec +2 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b32c44de80c644544251f8503c5de3c44c58a32e
|
4
|
+
data.tar.gz: 5db185ffe40fe7ee3524474102ddee4eb508457d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a533bbe8ca5150fdcfaebb6d1cc5eb757374453165d4d2cc50b2eb26a325df4d1160a2d9a6d15253491dd34347a8f4cde34488c1fb2ad4a9df865b838c1a24f
|
7
|
+
data.tar.gz: 81e8bbe9f3161cd6e0da6a96c8f19325146f9b32dcbf9e786b5aa31fd46b2a3170828f260dbafc8aadefd5e5667c3acb1e11da2384ef232472f5feb86dc81002
|
data/README.md
CHANGED
@@ -46,6 +46,15 @@ This provides an interface to your data in M2X
|
|
46
46
|
|
47
47
|
Refer to the documentation on each class for further usage instructions.
|
48
48
|
|
49
|
+
## Time
|
50
|
+
|
51
|
+
For devices that do not have a Real Time Clock, M2X provides a set of endpoints that returns the server's time.
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
m2x.time
|
55
|
+
=> {"seconds"=>1435970368, "millis"=>1435970368451, "iso8601"=>"2015-07-04T00:39:28.451Z"}
|
56
|
+
```
|
57
|
+
|
49
58
|
## Example
|
50
59
|
|
51
60
|
In order to run this example, you will need a `Device ID` and `API Key`. If you don't have any, access your M2X account, create a new [Device](https://m2x.att.com/devices), and copy the `Device ID` and `API Key` values. The following script will send your CPU load average to three different streams named `load_1m`, `load_5m` and `load_15`. Check that there's no need to create a stream in order to write values into it.
|
data/lib/m2x/mqtt.rb
CHANGED
data/lib/m2x/mqtt/version.rb
CHANGED
data/m2x-mqtt.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: m2x-mqtt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leandro López
|
@@ -10,8 +10,22 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
14
|
-
dependencies:
|
13
|
+
date: 2015-07-04 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: mqtt
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - "~>"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - "~>"
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '0'
|
15
29
|
description: AT&T’s M2X is a cloud-based fully managed data storage service for network
|
16
30
|
connected machine-to-machine (M2M) devices. From trucks and turbines to vending
|
17
31
|
machines and freight containers, M2X enables the devices that power your business
|