evok-to-mqtt 0.3.0 → 0.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76908e85b9cfa3e7958aa803586bc4757397b31f
4
- data.tar.gz: 8a17f15bba589e142eec7363e9e47aeceddcef88
3
+ metadata.gz: 8ab7e7ef98dfeb4999c89bb0a839984b137dd459
4
+ data.tar.gz: dcb6014d18c1ccfc4924a612efe3b97ade10873c
5
5
  SHA512:
6
- metadata.gz: 14dff4f3ed4ef92cf1c74a10e1837514d6a43b8a7a376612eae720c360e88168d4972bb760941178b484ac455cf4f6e543aca13ae0f4951dbb756f7e0cb82b79
7
- data.tar.gz: e4422b827edee797d7b9c7bd41792d305b7b846367797f03fa0103714e25773e059416b621cfd913440977557580560382b8e3b2034205ddeae8770011a7a3bb
6
+ metadata.gz: 638cf1617141c77ea75f850aafe2d8b7a2e95745852f85efb17a0a99fa4e5439d8cdb8cbff186c695680660500ed8f327fce1a382e78a004d1af71311c0a0aaf
7
+ data.tar.gz: b643ea4a47cbedda5622218fb538ebe91122a14fbc13456080d97a22d9bb0b0822abf5a21bc55328c6926aa99891d37d0dc866456a877091e1326446846298a8
@@ -11,6 +11,8 @@ module EvokToMqtt
11
11
  now = Time.now
12
12
  payload = evok_event
13
13
 
14
+ puts "Target topic: #{id}"
15
+
14
16
  # Neuron input is assumed for now
15
17
  if @statuses[id]
16
18
  if @statuses[id][:value] == 0 && evok_event['value'] == 1
@@ -32,10 +34,10 @@ module EvokToMqtt
32
34
 
33
35
  def get_topic(dev, circuit)
34
36
  begin
35
- return @mapping[dev][circuit] || "neuron_raw/#{dev}/#{circuit}" # missing circuit
36
- rescue KeyError => ex
37
+ return @mapping[dev][circuit] || "evok_raw/#{dev}/#{circuit}" # missing circuit
38
+ rescue => ex
37
39
  puts "Warning: #{ex}, using raw topic"
38
- return "neuron_raw/#{dev}/#{circuit}" # missing section (dev)
40
+ return "evok_raw/#{dev}/#{circuit}" # missing section (dev)
39
41
  end
40
42
  end
41
43
  end
@@ -1,3 +1,3 @@
1
1
  module EvokToMqtt
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evok-to-mqtt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marek Aufart