purpleair 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/purpleair_mqtt_bridge +13 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f3d6dee601c1c13ccff9f49ca964e081b3f40b24851b3c2cabaa0f4224cf941
|
4
|
+
data.tar.gz: 99284c1bd6bdb66c21fb8acd241682d19fdacbbd6b790aa05cf104d9baafd770
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d587ef13d5d78fb56130facb45244e3d90d0e08b086dbafd6365470ed223d7ab65dd0876bba095396278342ac44f9af8ff49d34d827888a07504a21295fb657a
|
7
|
+
data.tar.gz: d37580e242f2726a0b42f76c83266f8c845993aed0c3b24ab8d64fe7b7bea0dfd852d4423161fd408d608508f2e6ef8631b705eae864314865263b046bd19b7f
|
data/exe/purpleair_mqtt_bridge
CHANGED
@@ -178,17 +178,19 @@ homie.publish
|
|
178
178
|
|
179
179
|
loop do
|
180
180
|
data = purple.get.body
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
181
|
+
homie.mqtt.batch_publish do
|
182
|
+
device["temperature"].value = data["current_temp_f"]
|
183
|
+
device["relative-humidity"].value = data["current_humidity"]
|
184
|
+
device["dewpoint"].value = data["current_dewpoint_f"]
|
185
|
+
device["pressure"].value = data["pressure"]
|
186
|
+
device["rssi"].value = data["rssi"]
|
187
|
+
|
188
|
+
CHANNELS.each do |channel_id|
|
189
|
+
fields = get_fields(data, channel_id)
|
190
|
+
channel = homie[channel_id]
|
191
|
+
FIELDS.each do |field|
|
192
|
+
channel[field.gsub(/[._]/, "-")].value = fields[field]
|
193
|
+
end
|
192
194
|
end
|
193
195
|
end
|
194
196
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: purpleair
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday_middleware
|