The new MQTT Binding supports auto-discovery via the Homie 3.x convention and via the HomeAssistant MQTT specification. Of the 2 options, the Homie convention is better for use with OpenHAB as it allows for full device capabilities to be auto-discovered.
Theo Arends’ wonderful Tasmota firmware - latest version is 6.4.1.1 - does not currently support the Homie MQTT convention. Hopefully that will change in the future. Tasmota does support HomeAssistant auto-discovery, if that meets your requirements. For now though, I just wanted to update my Tasmota items files to work with the new MQTT Binding. (I know that MQTT Things can now be configured using the GUI but, color me old-fashioned, I still prefer configuration files.)
Here is my working solution. It uses the Mosquitto broker that had already been installed before the recent update, not the new embedded one.
Take a look at your old mqtt.cfg. These settings will be used again when creating a new broker Thing:
broker.url=tcp://localhost:1883
broker.user=USERNAME
broker.pwd=PASSWORD
Now let’s say you have a sonoff.items file with contents like this:
Group GF_Sonoff_S20 "Sonoff S20" <sonoff_s20_uk> (Sonoff_S20)
String GF_Sonoff_S20_Reachable "Reachable: [%s]" <contactable> (GF_Sonoff_S20) {mqtt="<[broker:tele/sonoff-s20/LWT:state:default]" }
Switch GF_Sonoff_S20_Power "Power" <sonoff_s20_uk> (GF_Sonoff_S20) {mqtt=">[broker:cmnd/sonoff-s20/POWER:command:*:default], <[broker:stat/sonoff-s20/POWER:state:default]"}
Number GF_Sonoff_S20_RSSI "WiFi Signal Strength [%d %%]" <wifi> (GF_Sonoff_S20) {mqtt="<[broker:tele/sonoff-s20/STATE:state:JSONPATH($.Wifi.RSSI)]" }
Group FF_Sonoff_B1 "Sonoff B1" <sonoff_b1> (Sonoff_B1)
String FF_Sonoff_B1_Reachable "Reachable: [%s]" <contactable> (FF_Sonoff_B1) {mqtt="<[broker:tele/sonoff-b1/LWT:state:default]" }
Switch FF_Sonoff_B1_Power "Power" <light> (FF_Sonoff_B1) {mqtt=">[broker:cmnd/sonoff-b1/POWER:command:*:default], <[broker:stat/sonoff-b1/RESULT:state:JSONPATH($.POWER)]"}
Switch FF_Sonoff_B1_Fade "Fade: [%s]" <fade_out> (FF_Sonoff_B1) {mqtt=">[broker:cmnd/sonoff-b1/FADE:command:*:default], <[broker:stat/sonoff-b1/RESULT:state:JSONPATH($.Fade)]"}
Dimmer FF_Sonoff_B1_Dimmer "Dimmer" <brightness> (FF_Sonoff_B1) {mqtt=">[broker:cmnd/sonoff-b1/DIMMER:command:*:default], <[broker:stat/sonoff-b1/RESULT:state:JSONPATH($.Dimmer)]"}
String FF_Sonoff_B1_Mode "Mode: [MAP(spotlightmode.map):%s]" <colorlight> (FF_Sonoff_B1) {mqtt=">[broker:cmnd/sonoff-b1/SCHEME:command:*:default], <[broker:stat/sonoff-b1/RESULT:state:JSONPATH($.Scheme)]"}
Color FF_Sonoff_B1_ColorHSB "Colour [%s]" <colorlight> (FF_Sonoff_B1) {mqtt=">[broker:cmnd/sonoff-b1/HSBColor:command:*:default], <[broker:stat/sonoff-b1/RESULT:state:JSONPATH($.HSBColor)]"}
Number FF_Sonoff_B1_RSSI "WiFi Signal Strength [%d %%]" <wifi> (FF_Sonoff_B1) {mqtt="<[broker:tele/sonoff-b1/STATE:state:JSONPATH($.Wifi.RSSI)]" }
Group FF_Sonoff_POW "Sonoff POW" <sonoff_pow> (Sonoff_POW)
String FF_Sonoff_POW_Reachable "Reachable: [%s]" <contactable> (FF_Sonoff_POW) {mqtt="<[broker:tele/sonoff-pow/LWT:state:default]" }
Switch FF_Sonoff_POW_Power "Power []" <sonoff_pow> (FF_Sonoff_POW) {mqtt=">[broker:cmnd/sonoff-pow/POWER:command:*:default], <[broker:stat/sonoff-pow/POWER:state:default]" }
Number FF_Sonoff_POW_Power "Power load [%.1f W]" <voltage> (FF_Sonoff_POW) {mqtt="<[broker:tele/sonoff-pow/SENSOR:state:JSONPATH($.ENERGY.Power)]" }
Number FF_Sonoff_POW_Voltage "Line voltage [%.1f V]" <voltage> (FF_Sonoff_POW) {mqtt="<[broker:tele/sonoff-pow/SENSOR:state:JSONPATH($.ENERGY.Voltage)]" }
Number FF_Sonoff_POW_Current "Line current [%.3f A]" <current> (FF_Sonoff_POW) {mqtt="<[broker:tele/sonoff-pow/SENSOR:state:JSONPATH($.ENERGY.Current)]" }
Number FF_Sonoff_POW_Today "Total energy today [%.3f kWh]" <total_energy> (FF_Sonoff_POW) {mqtt="<[broker:tele/sonoff-pow/SENSOR:state:JSONPATH($.ENERGY.Today)]" }
Number FF_Sonoff_POW_Yesterday "Total energy yesterday [%.3f kWh]" <total_energy> (FF_Sonoff_POW) {mqtt="<[broker:tele/sonoff-pow/SENSOR:state:JSONPATH($.ENERGY.Yesterday)]" }
Number FF_Sonoff_POW_RSSI "WiFi Signal Strength [%d %%]" <wifi> (FF_Sonoff_POW) {mqtt="<[broker:tele/sonoff-pow/STATE:state:JSONPATH($.Wifi.RSSI)]" }
Group GF_Sonoff_SC "Sonoff SC" <sonoff_sc> (Sonoff_SC)
String GF_Sonoff_SC_Reachable "Reachable: [%s]" <contactable> (GF_Sonoff_SC) {mqtt="<[broker:tele/sonoff-sc/LWT:state:default]" }
Number GF_Sonoff_SC_Temperature "Temperature [%d °C]" <temp> (GF_Sonoff_SC) {mqtt="<[broker:tele/sonoff-sc/SENSOR:state:JSONPATH($.SonoffSC.Temperature)]" }
Number GF_Sonoff_SC_Humidity "Humidity [%d %%]" <humidity> (GF_Sonoff_SC) {mqtt="<[broker:tele/sonoff-sc/SENSOR:state:JSONPATH($.SonoffSC.Humidity)]" }
Number GF_Sonoff_SC_Light "Light [%d %%]" <light> (GF_Sonoff_SC) {mqtt="<[broker:tele/sonoff-sc/SENSOR:state:JSONPATH($.SonoffSC.Light)]" }
Number GF_Sonoff_SC_Noise "Noise [%d %%]" <microphone> (GF_Sonoff_SC) {mqtt="<[broker:tele/sonoff-sc/SENSOR:state:JSONPATH($.SonoffSC.Noise)]" }
Number GF_Sonoff_SC_AirQuality "Air Quality [%d %%]" <air_quality> (GF_Sonoff_SC) {mqtt="<[broker:tele/sonoff-sc/SENSOR:state:JSONPATH($.SonoffSC.AirQuality)]" }
Number GF_Sonoff_SC_RSSI "WiFi Signal Strength [%d %%]" <wifi> (GF_Sonoff_SC) {mqtt="<[broker:tele/sonoff-sc/STATE:state:JSONPATH($.Wifi.RSSI)]" }
Group GF_Sonoff_RF "RF Bridge" c<sonoff_rf> (Sonoff_RF)
String GF_Sonoff_RF_Reachable "Reachable: [%s]" <contactable> (GF_Sonoff_RF) {mqtt="<[broker:tele/sonoff-rf/LWT:state:default]" }
String GF_Sonoff_RF_Received_Data "Received Data: [%s]" <none> (GF_Sonoff_RF) {mqtt="<[broker:tele/sonoff-rf/RESULT:state:JSONPATH($.RfReceived.Data)]"}
String GF_Sonoff_RF_Received_Sync "Received Sync: [%s]" <none> (GF_Sonoff_RF) {mqtt="<[broker:tele/sonoff-rf/RESULT:state:JSONPATH($.RfReceived.Sync)]"}
String GF_Sonoff_RF_Received_Low "Received Low: [%s]" <none> (GF_Sonoff_RF) {mqtt="<[broker:tele/sonoff-rf/RESULT:state:JSONPATH($.RfReceived.Low)]"}
String GF_Sonoff_RF_Received_High "Received High: [%s]" <none> (GF_Sonoff_RF) {mqtt="<[broker:tele/sonoff-rf/RESULT:state:JSONPATH($.RfReceived.High)]"}
String GF_Sonoff_RF_Received_RfKey "Received RfKey: [%s]" <none> (GF_Sonoff_RF) {mqtt="<[broker:tele/sonoff-rf/RESULT:state:JSONPATH($.RfReceived.RfKey)]"}
Switch GF_Sonoff_RF_Button_1 "Button 1" <none> (GF_Sonoff_RF) {mqtt=">[broker:cmnd/sonoff-rf/RFKEY1:command:*:default], <[broker:stat/sonoff-rf/RESULT:state:JSONPATH($.RfKey1)]", autoupdate="false"}
...
Switch GF_Sonoff_RF_Button_16 "Button 16: [%s]" <none> (GF_Sonoff_RF) {mqtt=">[broker:cmnd/sonoff-rf/RFKEY16:command:*:default], <[broker:stat/sonoff-rf/RESULT:state:JSONPATH($.RfKey16)]", autoupdate="false"}
Number GF_Sonoff_RF_RSSI "WiFi Signal Strength [%d %%]" <wifi> (GF_Sonoff_RF) {mqtt="<[broker:tele/sonoff-rf/STATE:state:JSONPATH($.Wifi.RSSI)]" }
You will use those old MQTT commands again when defining new Things.
Now create a file in your things folder, let’s call it mqtt.things. This is where you will define an MQTT broker Thing using the details from your old mqtt.cfg. You will also be defining all of the Things that will communicate with this broker and their channels using those existing MQTT commands. Here is an example mqtt.things:
Bridge mqtt:broker:mosquitto "Mosquitto" [ host="localhost", port=1883, secure=false, username="USERNAME", password="PASSWORD", clientID="openHAB2" ]
{
// Sonoffs
Thing topic sonoffs20 "Sonoff S20" @ "Some Room" {
Channels:
Type string : reachable "Reachable" [ stateTopic="tele/sonoff-s20/LWT" ]
Type switch : power "Power" [ stateTopic="stat/sonoff-s20/POWER", commandTopic="cmnd/sonoff-s20/POWER" ]
Type number : rssi "WiFi Signal Strength" [ stateTopic="tele/sonoff-s20/STATE", transformationPattern="JSONPATH:$.Wifi.RSSI"]
}
Thing topic sonoffb1 "Sonoff B1" @ "Some Room" {
Channels:
Type string : reachable "Reachable" [ stateTopic="tele/sonoff-b1/LWT" ]
Type switch : power "Power" [ stateTopic="stat/sonoff-b1/POWER", commandTopic="cmnd/sonoff-b1/POWER" ]
Type switch : fade "Fade" [ stateTopic="tele/sonoff-b1/STATE", commandTopic="cmnd/sonoff-b1/FADE", transformationPattern="JSONPATH:$.Fade" ]
Type dimmer : dimmer "Dimmer" [ stateTopic="tele/sonoff-b1/STATE", commandTopic="cmnd/sonoff-b1/DIMMER", transformationPattern="JSONPATH:$.Dimmer" ]
Type string : mode "Mode" [ stateTopic="tele/sonoff-b1/STATE", commandTopic="cmnd/sonoff-b1/SCHEME", transformationPattern="JSONPATH:$.Scheme" ]
Type colorHSB : colour "Colour" [ stateTopic="tele/sonoff-b1/STATE", commandTopic="cmnd/sonoff-b1/HSBColor", transformationPattern="JSONPATH:$.HSBColor" ]
Type number : rssi "WiFi Signal Strength" [ stateTopic="tele/sonoff-b1/STATE", transformationPattern="JSONPATH:$.Wifi.RSSI"]
}
Thing topic sonoffpow "Sonoff POW" @ "Some Other Room" {
Channels:
Type string : reachable "Reachable" [ stateTopic="tele/sonoff-pow/LWT" ]
Type switch : power "Power" [ stateTopic="stat/sonoff-pow/POWER", commandTopic="cmnd/sonoff-pow/POWER" ]
Type number : powerload "Power load" [ stateTopic="tele/sonoff-pow/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Power"]
Type number : voltage "Line voltage" [ stateTopic="tele/sonoff-pow/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Voltage"]
Type number : current "Line current" [ stateTopic="tele/sonoff-pow/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Current"]
Type number : total "Total energy today" [ stateTopic="tele/sonoff-pow/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Today"]
Type number : totalyest "Total energy yesterday" [ stateTopic="tele/sonoff-pow/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Yesterday"]
Type number : rssi "WiFi Signal Strength" [ stateTopic="tele/sonoff-pow/STATE", transformationPattern="JSONPATH:$.Wifi.RSSI"]
}
Thing topic sonoffsc "Sonoff SC" @ "Another Room" {
Channels:
Type string : reachable "Reachable" [ stateTopic="tele/sonoff-sc/LWT" ]
Type number : temperature "Temperature" [ stateTopic="tele/sonoff-sc/SENSOR", transformationPattern="JSONPATH:$.SonoffSC.Temperature"]
Type number : humidity "Humidity" [ stateTopic="tele/sonoff-sc/SENSOR", transformationPattern="JSONPATH:$.SonoffSC.Humidity"]
Type number : light "Light" [ stateTopic="tele/sonoff-sc/SENSOR", transformationPattern="JSONPATH:$.SonoffSC.Light"]
Type number : noise "Noise" [ stateTopic="tele/sonoff-sc/SENSOR", transformationPattern="JSONPATH:$.SonoffSC.Noise"]
Type number : airquality "Air Quality" [ stateTopic="tele/sonoff-sc/SENSOR", transformationPattern="JSONPATH:$.SonoffSC.AirQuality"]
Type number : rssi "WiFi Signal Strength" [ stateTopic="tele/sonoff-sc/STATE", transformationPattern="JSONPATH:$.Wifi.RSSI"]
}
Thing topic sonoffrf "RF Bridge" @ "Yet Another Room" {
Type string : reachable "Reachable" [ stateTopic="tele/sonoff-rf/LWT" ]
Type string : recieveddata "Received Data" [ stateTopic="tele/sonoff-rf/RESULT", transformationPattern="JSONPATH:$.RfReceived.Data"]
Type string : recievedsync "Received Sync" [ stateTopic="tele/sonoff-rf/RESULT", transformationPattern="JSONPATH:$.RfReceived.Sync"]
Type string : recievedlow "Received Low" [ stateTopic="tele/sonoff-rf/RESULT", transformationPattern="JSONPATH:$.RfReceived.Low"]
Type string : recievedhigh "Received High" [ stateTopic="tele/sonoff-rf/RESULT", transformationPattern="JSONPATH:$.RfReceived.High"]
Type string : recievedrfkey "Received RfKey" [ stateTopic="tele/sonoff-rf/RESULT", transformationPattern="JSONPATH:$.RfReceived.RfKey"]
Type switch : button1 "Button 1" [ stateTopic="stat/sonoff-rf/RESULT", commandTopic="cmnd/sonoff-rf/RFKEY1", transformationPattern="JSONPATH:$.RfKey1" ]
...
Type switch : button16 "Button 16" [ stateTopic="stat/sonoff-rf/RESULT", commandTopic="cmnd/sonoff-rf/RFKEY16", transformationPattern="JSONPATH:$.RfKey16" ]
Type number : rssi "WiFi Signal Strength" [ stateTopic="tele/sonoff-rf/STATE", transformationPattern="JSONPATH:$.Wifi.RSSI"]
}
}
Next thing to do is revisit your sonoff.items file and update the old MQTT commands so that they use the newly created channels instead. Using the previous sonoff.items as an example, the updated content should resemble this:
Group GF_Sonoff_S20 "Sonoff S20" <sonoff_s20_uk> (Sonoff_S20)
String GF_Sonoff_S20_Reachable "Reachable: [%s]" <contactable> (GF_Sonoff_S20) { channel="mqtt:topic:mosquitto:sonoffs20:reachable" }
Switch GF_Sonoff_S20_Power "Power" <sonoff_s20_uk> (GF_Sonoff_S20) { channel="mqtt:topic:mosquitto:sonoffs20:power" }
Number GF_Sonoff_S20_RSSI "WiFi Signal Strength [%d %%]" <wifi> (GF_Sonoff_S20) { channel="mqtt:topic:mosquitto:sonoffs20:rssi" }
Group FF_Sonoff_B1 "Sonoff B1" <sonoff_b1> (Sonoff_B1)
String FF_Sonoff_B1_Reachable "Reachable: [%s]" <contactable> (FF_Sonoff_B1) { channel="mqtt:topic:mosquitto:sonoffb1:reachable" }
Switch FF_Sonoff_B1_Power "Power" <light> (FF_Sonoff_B1) { channel="mqtt:topic:mosquitto:sonoffb1:power" }
Switch FF_Sonoff_B1_Fade "Fade: [%s]" <fade_out> (FF_Sonoff_B1) { channel="mqtt:topic:mosquitto:sonoffb1:fade" }
Dimmer FF_Sonoff_B1_Dimmer "Dimmer" <brightness> (FF_Sonoff_B1) { channel="mqtt:topic:mosquitto:sonoffb1:dimmer" }
String FF_Sonoff_B1_Mode "Mode: [MAP(spotlightmode.map):%s]" <colorlight> (FF_Sonoff_B1) { channel="mqtt:topic:mosquitto:sonoffb1:mode" }
Color FF_Sonoff_B1_ColorHSB "Colour [%s]" <colorlight> (FF_Sonoff_B1) { channel="mqtt:topic:mosquitto:sonoffb1:colour" }
Number FF_Sonoff_B1_RSSI "WiFi Signal Strength [%d %%]" <wifi> (FF_Sonoff_B1) { channel="mqtt:topic:mosquitto:sonoffb1:rssi" }
Group FF_Sonoff_POW "Sonoff POW" <sonoff_pow> (Sonoff_POW)
String FF_Sonoff_POW_Reachable "Reachable: [%s]" <contactable> (FF_Sonoff_POW) { channel="mqtt:topic:mosquitto:sonoffpow:reachable" }
Switch FF_Sonoff_POW_Power "Power []" <sonoff_pow> (FF_Sonoff_POW) { channel="mqtt:topic:mosquitto:sonoffpow:power" }
Number FF_Sonoff_POW_Load "Power load [%.1f W]" <voltage> (FF_Sonoff_POW) { channel="mqtt:topic:mosquitto:sonoffpow:powerload" }
Number FF_Sonoff_POW_Voltage "Line voltage [%.1f V]" <voltage> (FF_Sonoff_POW) { channel="mqtt:topic:mosquitto:sonoffpow:voltage" }
Number FF_Sonoff_POW_Current "Line current [%.3f A]" <current> (FF_Sonoff_POW) { channel="mqtt:topic:mosquitto:sonoffpow:current" }
Number FF_Sonoff_POW_Today "Total energy today [%.3f kWh]" <total_energy> (FF_Sonoff_POW) { channel="mqtt:topic:mosquitto:sonoffpow:total" }
Number FF_Sonoff_POW_Yesterday "Total energy yesterday [%.3f kWh]" <total_energy> (FF_Sonoff_POW) { channel="mqtt:topic:mosquitto:sonoffpow:totalyest" }
Number FF_Sonoff_POW_RSSI "WiFi Signal Strength [%d %%]" <wifi> (FF_Sonoff_POW) { channel="mqtt:topic:mosquitto:sonoffpow:rssi" }
Group GF_Sonoff_SC "Sonoff SC" <sonoff_sc> (Sonoff_SC)
String GF_Sonoff_SC_Reachable "Reachable: [%s]" <contactable> (GF_Sonoff_SC) { channel="mqtt:topic:mosquitto:sonoffsc:reachable" }
Number GF_Sonoff_SC_Temperature "Temperature [%d °C]" <temp> (GF_Sonoff_SC) { channel="mqtt:topic:mosquitto:sonoffsc:temperature" }
Number GF_Sonoff_SC_Humidity "Humidity [%d %%]" <humidity> (GF_Sonoff_SC) { channel="mqtt:topic:mosquitto:sonoffsc:humidity" }
Number GF_Sonoff_SC_Light "Light [%d %%]" <light> (GF_Sonoff_SC) { channel="mqtt:topic:mosquitto:sonoffsc:light" }
Number GF_Sonoff_SC_Noise "Noise [%d %%]" <microphone> (GF_Sonoff_SC) { channel="mqtt:topic:mosquitto:sonoffsc:noise" }
Number GF_Sonoff_SC_AirQuality "Air Quality [%d %%]" <air_quality> (GF_Sonoff_SC) { channel="mqtt:topic:mosquitto:sonoffsc:airquality" }
Number GF_Sonoff_SC_RSSI "WiFi Signal Strength [%d %%]" <wifi> (GF_Sonoff_SC) { channel="mqtt:topic:mosquitto:sonoffsc:rssi" }
Group GF_Sonoff_RF "RF Bridge" <sonoff_rf> (Sonoff_RF)
String GF_Sonoff_RF_Reachable "Reachable: [%s]" <contactable> (GF_Sonoff_RF) { channel="mqtt:topic:mosquitto:sonoffrf:reachable" }
String GF_Sonoff_RF_Received_Data "Received Data: [%s]" <none> (GF_Sonoff_RF) { channel="mqtt:topic:mosquitto:sonoffrf:recieveddata" }
String GF_Sonoff_RF_Received_Sync "Received Sync: [%s]" <none> (GF_Sonoff_RF) { channel="mqtt:topic:mosquitto:sonoffrf:recievedsync" }
String GF_Sonoff_RF_Received_Low "Received Low: [%s]" <none> (GF_Sonoff_RF) { channel="mqtt:topic:mosquitto:sonoffrf:recievedlow" }
String GF_Sonoff_RF_Received_High "Received High: [%s]" <none> (GF_Sonoff_RF) { channel="mqtt:topic:mosquitto:sonoffrf:recievedhigh" }
String GF_Sonoff_RF_Received_RfKey "Received RfKey: [%s]" <none> (GF_Sonoff_RF) { channel="mqtt:topic:mosquitto:sonoffrf:recievedrfkey" }
Switch GF_Sonoff_RF_Button_1 "Button 1" <none> (GF_Sonoff_RF) { channel="mqtt:topic:mosquitto:sonoffrf:button1", autoupdate="false"}
...
Switch GF_Sonoff_RF_Button_16 "Button 16: [%s]" <none> (GF_Sonoff_RF) { channel="mqtt:topic:mosquitto:sonoffrf:button16", autoupdate="false"}
Number GF_Sonoff_RF_RSSI "WiFi Signal Strength [%d %%]" <wifi> (GF_Sonoff_RF) { channel="mqtt:topic:mosquitto:sonoffrf:rssi" }
Lastly, go through your rules files and replace any of these:
publish("broker", "topic", "payload")
With these:
val mqttActions = getActions("mqtt", "mqtt:broker:mosquitto")
mqttActions.publishMQTT("topic", "payload")
Done.
Don’t forget to keep an eye on the OpenHAB logs to see if any of your old transformations no longer work.
Edit: Here is an example .sitemap using the items defined above:
sitemap default label="Some Place" {
Frame label="Ground Floor" icon="groundfloor" {
Group item=GF_Sonoff_S20 label="Some Adapter"
Group item=GF_Sonoff_SC label="Some Sensors" {
Text item=GF_Sonoff_SC_Reachable label="Status [%s]"
Text item=GF_Sonoff_SC_Temperature label="Temperature [%d °C]"
Text item=GF_Sonoff_SC_Humidity label="Humidity [%d %%]"
Text item=GF_Sonoff_SC_Light label="Light [%d %%]"
Text item=GF_Sonoff_SC_Noise label="Noise [%d %%]"
Text item=GF_Sonoff_SC_AirQuality label="Air Quality [%d %%]"
Text item=GF_Sonoff_SC_RSSI label="WiFi Signal Strength [%d %%]"
}
Group item=GF_Sonoff_RF {
Text item=GF_Sonoff_RF_Reachable label="Status [%s]"
Text item=GF_Sonoff_RF_Received_Data label="Data [%s]"
Text item=GF_Sonoff_RF_Received_Sync label="Sync [%s]"
Text item=GF_Sonoff_RF_Received_Low label="Low [%s]"
Text item=GF_Sonoff_RF_Received_High label="High [%s]"
Text item=GF_Sonoff_RF_Received_RfKey label="RfKey [%s]"
Switch item=GF_Sonoff_RF_Button_1 label="RfKey1" mappings=[ON="Key 1"]
...
Switch item=GF_Sonoff_RF_Button_16 label="RfKey16" mappings=[ON="Key 16"]
Text item=GF_Sonoff_RF_RSSI label="WiFi Signal Strength [%d %%]"
}
}
Frame label="First Floor" icon="firstfloor" {
Group item=FF_Sonoff_B1 label="Some Light" {
Text item=FF_Sonoff_B1_Reachable label="Status [%s]"
Switch item=FF_Sonoff_B1_Power label="Power"
Switch item=FF_Sonoff_B1_Fade label="Fade"
Slider item=FF_Sonoff_B1_Dimmer label="Brightness [%d]"
Selection item=FF_Sonoff_B1_Mode label="Color Mode" mappings=["0"="Single Color", "1"="Wake up", "2"="Slow Cycle", "3"="Fast Cycle", "4"="Disco"]
Colorpicker item=FF_Sonoff_B1_ColorHSB label="Colour"
Text item=FF_Sonoff_B1_RSSI label="WiFi Signal Strength [%d %%]"
}
Group item=FF_Sonoff_POW {
Text item=FF_Sonoff_POW_Reachable label="Status [%s]"
Switch item=FF_Sonoff_POW_Power label="Power []"
Text item=FF_Sonoff_POW_Load label="Power load [%.1f W]"
Text item=FF_Sonoff_POW_Voltage label="Line voltage [%.1f V]"
Text item=FF_Sonoff_POW_Current label="Line current [%.3f A]"
Text item=FF_Sonoff_POW_Today label="Total energy today [%.3f kWh]"
Text item=FF_Sonoff_POW_Yesterday label="Total energy yesterday [%.3f kWh]"
Text item=FF_Sonoff_POW_RSSI label="WiFi Signal Strength [%d %%]"
}
}
}