mirror of https://github.com/arendst/Tasmota.git
Updated openHAB (markdown)
parent
4f246b4c6e
commit
71c5482c3c
28
openHAB.md
28
openHAB.md
|
@ -35,38 +35,40 @@ It is furthermore recommended, to add the following status items for every Sonof
|
||||||
|
|
||||||
**sonoff.items:**
|
**sonoff.items:**
|
||||||
```java
|
```java
|
||||||
|
// A switch being 'ON' as long as the device is reachable
|
||||||
|
Switch LivingRoom_Light_Reachable "Living Room Light: reachable" (gReachable)
|
||||||
|
{ mqtt="<[broker:tele/sonoff-A00F9D/LWT:state:MAP(reachable.map)]" }
|
||||||
|
|
||||||
// Wifi Signal Strength in Percent
|
// Wifi Signal Strength in Percent
|
||||||
Number LivingRoom_Light_RSSI "Living Room Light: RSSI [%d %%]" (gRSSI)
|
Number LivingRoom_Light_RSSI "Living Room Light: RSSI [%d %%]" (gRSSI)
|
||||||
{ mqtt="<[broker:tele/sonoff-A00F9D/STATE:state:JSONPATH($.Wifi.RSSI)]" }
|
{ mqtt="<[broker:tele/sonoff-A00F9D/STATE:state:JSONPATH($.Wifi.RSSI)]" }
|
||||||
|
|
||||||
// A switch turning ON if the device is unreachable
|
|
||||||
Switch LivingRoom_Light_Unreach "Living Room Light: unreachable" (gUnreach)
|
|
||||||
{ mqtt="<[broker:tele/sonoff-A00F9D/LWT:state:MAP(unreach.map)]" }
|
|
||||||
|
|
||||||
// Optional! A collection of return messages by the Sonoff module
|
// Optional! A collection of return messages by the Sonoff module
|
||||||
// Recommended: Define specific items for what you really need on a regular basis, use standalone MQTT client otherwise
|
// Recommended: Define specific items for what you really need on a regular basis,
|
||||||
|
// use standalone MQTT client for troubleshooting
|
||||||
String LivingRoom_Light_Verbose "Living Room Light: MQTT return message [%s]"
|
String LivingRoom_Light_Verbose "Living Room Light: MQTT return message [%s]"
|
||||||
{ mqtt="<[broker:tele/sonoff-A00F9D/INFO1:state:default],
|
{ mqtt="<[broker:tele/sonoff-A00F9D/INFO1:state:default],
|
||||||
<[broker:stat/sonoff-A00F9D/STATUS2:state:default],
|
<[broker:stat/sonoff-A00F9D/STATUS2:state:default],
|
||||||
<[broker:stat/sonoff-A00F9D/RESULT:state:default]" }
|
<[broker:stat/sonoff-A00F9D/RESULT:state:default]" }
|
||||||
```
|
```
|
||||||
|
|
||||||
The "LWT" topic ("Last Will and Testament") will receive regular "Online" messages by the module and an "Offline" message a short time after the module is disconnected. These messages are transformed to a valid `ON`/`OFF` state by the MAP transformation. The following transformation file is needed.
|
The "LWT" topic (["Last Will and Testament"](http://www.hivemq.com/blog/mqtt-essentials-part-9-last-will-and-testament)) will receive regular "Online" messages by the module and an "Offline" message a short time after the module is disconnected, generated by the MQTT broker. These messages are transformed to a valid `ON`/`OFF` state by the MAP transformation. The following transformation file is needed.
|
||||||
|
|
||||||
**unreach.map:**
|
**reachable.map:**
|
||||||
```java
|
```java
|
||||||
Online=OFF
|
Online=ON
|
||||||
Offline=ON
|
Offline=OFF
|
||||||
```
|
```
|
||||||
|
|
||||||
Of course you can define `Reachable` instead of `Unreachable` if you prefer.
|
Of course you can implement `Unreachable` instead of `Reachable` if you prefer.
|
||||||
|
|
||||||
## Maintenance Actions
|
## Maintenance Actions
|
||||||
|
|
||||||
A home automation system setup would not be complete without a certain maintenance automation.
|
A home automation system setup would not be complete without a certain maintenance automation!
|
||||||
Add the following elements to your openHAB setup to be able to perform certain actions on your Sonoff modules by the press of a simple sitemap button.
|
|
||||||
|
|
||||||
The example below includes upgrading the firmwares of all modules. A shoutout to @evilgreen for the idea and a big thanks to @smadds for [providing](https://github.com/arendst/Sonoff-Tasmota/issues/19) the public firmware server used.
|
Add the following elements to your openHAB setup to be able to perform actions on your Sonoff modules by the press of a simple sitemap button.
|
||||||
|
|
||||||
|
The example below includes upgrading the firmware of all modules. A shoutout to @evilgreen for the idea and a big thanks to @smadds for [providing](https://github.com/arendst/Sonoff-Tasmota/issues/19) the public firmware server used in the example.
|
||||||
|
|
||||||
![Sonoff Maintenance Actions](https://community-openhab-org.s3-eu-central-1.amazonaws.com/original/2X/9/97f0bdf6a81ffe94068e596804adf94839a5580b.png)
|
![Sonoff Maintenance Actions](https://community-openhab-org.s3-eu-central-1.amazonaws.com/original/2X/9/97f0bdf6a81ffe94068e596804adf94839a5580b.png)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue