evok-to-mqtt 0.2.5 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 246aacbce4aaa03b18a041652d1cca20ad4d524e
4
- data.tar.gz: 70628368d20af13d098656213409e0d4a16e7e64
3
+ metadata.gz: 76908e85b9cfa3e7958aa803586bc4757397b31f
4
+ data.tar.gz: 8a17f15bba589e142eec7363e9e47aeceddcef88
5
5
  SHA512:
6
- metadata.gz: 02b653c812c9ca2b99abf0be094357c94ee8382d45f7d631c44344270aa9bad4ef18263570ca83dcd592ae91faf791ebbe972ce670c086f2096328b45d9d10a8
7
- data.tar.gz: c9b165fe0f01fa1b3b6744535c7e9b9adbff4909b4f9ab670bb6fff138956dbc8b333c991e511da6832903026a8353da53da0ff5ec0244e077539a979eb1a4aa
6
+ metadata.gz: 14dff4f3ed4ef92cf1c74a10e1837514d6a43b8a7a376612eae720c360e88168d4972bb760941178b484ac455cf4f6e543aca13ae0f4951dbb756f7e0cb82b79
7
+ data.tar.gz: e4422b827edee797d7b9c7bd41792d305b7b846367797f03fa0103714e25773e059416b621cfd913440977557580560382b8e3b2034205ddeae8770011a7a3bb
data/README.md CHANGED
@@ -4,11 +4,13 @@ A bridge between Unipi's EVOK and MQTT message bus. It uses websockets to connec
4
4
 
5
5
  ## Installation
6
6
 
7
+ ```bash
7
8
  $ gem install evok-to-mqtt
9
+ ```
8
10
 
9
11
  ## Usage
10
12
 
11
- Prepare mapping config file ```evok-to-mqtt-mapping.yml``` from [evok-to-mqtt-mapping.yml.example](https://raw.githubusercontent.com/aufi/evok-to-mqtt/master/evok-to-mqtt-mapping.yml.example).
13
+ Prepare mapping config file ```evok-to-mqtt-mapping.yml``` from [evok-to-mqtt-mapping.yml.example](https://raw.githubusercontent.com/aufi/evok-to-mqtt/master/evok-to-mqtt-mapping.yml.example) and run following:
12
14
 
13
15
  ```bash
14
16
  $ evok-to-mqtt <evok_hostname> <mqtt_host>
@@ -1,14 +1,11 @@
1
- # EXAMPLE
2
1
  #
3
- # mistnosti:
4
- # obyvak, kuchyn, dolni_chodba, horni_chodba, pracovna, dolni_koupelna, tech_mistnost, loznice, horni_koupelna, zachod, detsky_pokoj_2, detsky_pokoj_honza
2
+ # EXAMPLE
5
3
  #
6
-
7
4
  ---
8
5
  relay:
9
- 1_01: obyvak/svetlo
6
+ "1_01": diningroom/light
10
7
  input:
11
- 1_01: obyvak/tlacitko_dvere_l
12
- 1_02: obyvak/tlacitko_dvere_p
8
+ "1_01": diningroom/btn_door_left
9
+ "1_02": diningroom/btn_door_right
13
10
  ai:
14
- 1_01: dum/svetlo_venku
11
+ "1_01": house/light_outside
@@ -32,10 +32,10 @@ module EvokToMqtt
32
32
 
33
33
  def get_topic(dev, circuit)
34
34
  begin
35
- return @mapping[dev][circuit]
35
+ return @mapping[dev][circuit] || "neuron_raw/#{dev}/#{circuit}" # missing circuit
36
36
  rescue KeyError => ex
37
37
  puts "Warning: #{ex}, using raw topic"
38
- return "neuron_raw/#{dev}/#{circuit}"
38
+ return "neuron_raw/#{dev}/#{circuit}" # missing section (dev)
39
39
  end
40
40
  end
41
41
  end
@@ -1,3 +1,3 @@
1
1
  module EvokToMqtt
2
- VERSION = "0.2.5"
2
+ VERSION = "0.3.0"
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.2.5
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marek Aufart