Added OpenHab example Config

Jörg Ostertag 2018-07-28 23:47:01 +02:00
parent e1620e117a
commit 5ba4b1fef3
1 changed files with 26 additions and 1 deletions

@ -50,4 +50,29 @@ Connected?
Hold the little button pressed while connecting the USB cable to your Notebook, PC etc.
after ca. 2 sec. let go of the button.
It is now in flashing mode.
Follow the [Hardware Preparation](https://github.com/arendst/Sonoff-Tasmota/wiki/Hardware-Preparation) page for general instructions.
Follow the [Hardware Preparation](https://github.com/arendst/Sonoff-Tasmota/wiki/Hardware-Preparation) page for general instructions.
### OpenHab configuration
sonoff.items:
```
Switch S20_1 "Coffee S20-1 Powerplug" (LR,gLight)
{ mqtt=">[broker:cmnd/sonoff-S20-1/POWER:command:*:default],
<[broker:stat/sonoff-S20-1/POWER:state:default],
<[broker:stat/sonoff-S20-1/RESULT:state:JSONPATH($.POWER)],
<[broker:tele/sonoff-S20-1/STATE:state:JSONPATH($.POWER)]
"}
Switch S20_1_Reachable "S20-1 reachable" <contact> (gReachable)
{ mqtt="<[broker:tele/sonoff-S20-1/LWT:state:MAP(reachable.map)],
<[broker:stat/sonoff-S20-1/RESULT:state:ON],
<[broker:stat/sonoff-S20-1/POWER:state:ON],
<[broker:tele/sonoff-S20-1/STATE:state:ON]
" }
```
default.sitemap:
```
Switch item=S20_1 labelcolor=[S20_1_Reachable == "ON" = "green",S20_1_Reachable == "OFF" = "red"]
```