Added OpenHab example Config

Jörg Ostertag 2018-07-28 23:38:03 +02:00
parent 7d3a87f92e
commit e1620e117a
1 changed files with 32 additions and 1 deletions

@ -15,3 +15,34 @@ In the Configuration -> Configure Module page, select the following:
After reboot of the device the temperature and humidity are displayed. After reboot of the device the temperature and humidity are displayed.
<img src="https://github.com/arendst/arendst.github.io/blob/master/media/wemos/wemos_dht11_main_marked.jpg"/> <img src="https://github.com/arendst/arendst.github.io/blob/master/media/wemos/wemos_dht11_main_marked.jpg"/>
### OpenHab configuration
sonoff.items:
```
// DHT-6
Number DHT6_Temp "Bathroom DHT-6 [%.1f °C]"
<temperature> (gTemperature,gTemperatureRoom)
{ mqtt="<[broker:tele/sonoff-dht-6/SENSOR:state:JSONPATH($.DHT11.Temperature)]" }
Number DHT6_Humidity "Bathroom DHT-6 [%.1f %%]"
<humidity> (gHumidity)
{ mqtt="<[broker:tele/sonoff-dht-6/SENSOR:state:JSONPATH($.DHT11.Humidity)]" }
Switch DHT6_Reachable "DHT-6 reachable"
<contact> (gReachable)
{ mqtt="<[broker:tele/sonoff-dht-6/LWT:state:MAP(reachable.map)]" }
Number DHT6_RSSI "DHT-6 RSSI [%d %%]"
<qualityofservice> (gRSSI)
{ mqtt="<[broker:tele/sonoff-dht-6/STATE:state:JSONPATH($.Wifi.RSSI)]" }
```
sonoff.sitemap
```
Frame {
Text item=DHT6_Temp labelcolor=[DHT6_Reachable == "ON" = "green",DHT6_Reachable == "OFF" = "red"] {
Text item=DHT6_Temp
Text item=DHT6_Humidity
Text item=DHT6_Reachable
Text item=DHT6_RSSI
}
}
```