sldm
(Didier)
March 11, 2019, 10:50am
1
I’m using the sonoff basic with tasmota 6.4.1 for some reason only some of the sonoff are showing the ON/OFF STATE. all configs are the same.
This is my things:
Bridge mqtt:broker:myMQTTBroker "Mosquitto" [ host="localhost", port=1883, secure=false, username="openhabian", password="xxxxxxxx", clientID="myMQTTClient" ]
{
//Veranda Light
Thing mqtt:topic:veranda01 "Veranda Light" @ "MQTT" {
Channels:
Type switch : switch "Power Switch" [ stateTopic="stat/veranda01/POWER", commandTopic="cmnd/veranda01/POWER", on="ON", off="OFF" ] ]
Type string : state01 "Switch State 01" [ stateTopic="stat/veranda01/RESULT", transformationPattern="JSONPATH:$.POWER", on="ON", off="OFF" ]
}
//Outdoor Bedroom Light
Thing mqtt:topic:OtdoorBRL "Outdoor Bedroom Light" @ "MQTT" {
Channels:
Type switch : switch "Power Switch" [ stateTopic="stat/OtdoorBRL/POWER", commandTopic="cmnd/OtdoorBRL/POWER", on="ON", off="OFF" ]
Type string : state01 "Switch State 01" [ stateTopic="stat/OtdoorBRL/RESULT", transformationPattern="JSONPATH:$.POWER", on="ON", off="OFF" ]
}
}
items
//Veranda Light
Switch veranda01_Switch "Veranda Light" (Lights) [ "Switchable" ] { channel="mqtt:topic:myMQTTBroker:veranda01:PowerSwitch", autoupdate="false" }
Switch veranda01_State "Veranda State" { channel="mqtt:topic:myMQTTBroker:veranda01:state01" }
//Outdoor Bedroom Light
Switch OtdoorBRL_Switch "Outdoor Bedroom Light" (Lights) [ "Switchable" ] { channel="mqtt:topic:myMQTTBroker:OtdoorBRL:PowerSwitch", autoupdate="false" }
Switch OtdoorBRL_State "Outdoor Bedroom State" { channel="mqtt:topic:myMQTTBroker:OtdoorBRL:state01"}
I checked the doc but could not find an entry for autoupdate. Try to enable autoupdate
autoupdate="true"
sldm
(Didier)
March 11, 2019, 10:58am
3
I just added autoupdate=“false” even without it doesn’t work.
But did you try with autoupdate=“true”? I don’t know the default, maybe it’s default false.
Also, are you sure your STATE topic is correct? I use this topic for my basic.
stat/sonoff-977686/POWER
sldm
(Didier)
March 11, 2019, 11:10am
5
autoupdate=“true” update the switch properly ON/OFF ON Basic UI is gone.
STATE topic is fine.
I will do more test and see now.
Wait what?
So this worked? But now it’s missing on the Basic UI ?
opus
(Jürgen Baginski)
March 11, 2019, 11:20am
7
I so “sense” a missunderstanding.
As far as I understood the OP the display and log-display of the textual "ON "or “OFF” is in question and not the missing update of the device state (by the text and by the icon).
IMHO this textual display can be configured in the sitemap file which is not shown.
sldm
(Didier)
March 11, 2019, 11:53am
8
the autoupdate=“true” updates the switch icon properly but still missing the “ON” or “OFF” for some of the switch.
sldm
(Didier)
March 11, 2019, 11:55am
9
All configs are the same. do you have an example on how to do it?
opus
(Jürgen Baginski)
March 11, 2019, 12:16pm
10
In the sitemap file use empty brackets after the Label, like “MyLabel []”. That way the “ON” or “OFF” will not be shown.
sldm
(Didier)
March 11, 2019, 12:19pm
11
opus:
That is for label what about switch?
opus
(Jürgen Baginski)
March 11, 2019, 12:22pm
12
No, that is also for the label of a Switch!
See this thread.
sldm
(Didier)
March 11, 2019, 12:31pm
13
doesn’t work for me.
switch item=LivingRML0_Switch[]
opus
(Jürgen Baginski)
March 11, 2019, 12:36pm
14
The correct syntax would be:
Switch item=LivingRML0_Switch label=“MyLabel[]”
sldm
(Didier)
March 11, 2019, 1:03pm
15
opus:
Switch item
This is what works for me.
Switch item=LivingRML0_Switch label="Kitchen Sink Light [%s]"
Thanks
opus
(Jürgen Baginski)
March 11, 2019, 1:11pm
16
That Syntax should Show the ON/OFF, mine should not!
If your question is resolved, please mark this thread as resovled by selecting square checkmark Icon on the lower end of any reply.