How to use MQTT command backlog in oH2.5

Hi there,

I run oH2.5 on a Raspi3 with MQTT binding.
I’m just wondering how can one use the tasmota backlog command in order to switch the LED on and after some time off …

Like in tasmota console with:

Backlog power on; delay 200; power off
// things

Thing topic h801_XXXX "LED H801 #2 (sonoff-XXXX-h801)" @ "MQTT" {
        Type switch : h801_XXXX_switch			"LED H801 #1: Power Switch"             	[ stateTopic="tasmota/sonoff-XXXX-h801/stat/POWER", commandTopic="tasmota/sonoff-XXXX-h801/cmnd/POWER", on="ON", off="OFF" ]
        Type colorHSB : h801_XXXX_color 		"LED H801 #1: Farbe"              			[ stateTopic="tasmota/sonoff-XXXX-h801/stat/RESULT/HSBColor", commandTopic="tasmota/sonoff-XXXX-h801/cmnd/HSBColor" ]
		Type number : h801_XXXX_tasmocolor      "LED H801 #1: Switch RGB" 					[ commandTopic="tasmota/sonoff-XXXX-h801/cmnd/color", formatBeforePublish="%d" ]
		Type dimmer : h801_XXXX_dimmer      	"LED H801 #1: Dimmer" 						[ commandTopic="tasmota/sonoff-XXXX-h801/cmnd/dimmer" ]
		Type number : h801_XXXX_scheme      	"LED H801 #1: Scheme" 						[ commandTopic="tasmota/sonoff-XXXX-h801/cmnd/scheme", formatBeforePublish="%d" ]
		Type switch : h801_XXXX_wakeup      	"LED H801 #1: Wakeup" 						[ commandTopic="tasmota/sonoff-XXXX-h801/cmnd/wakeup" ]
		Type number : h801_XXXX_wakeupd      	"LED H801 #1: Wakeup duration"				[ commandTopic="tasmota/sonoff-XXXX-h801/cmnd/wakeupduration", formatBeforePublish="%d" ]
		Type string : h801_XXXX_reachable  		"LED H801 #1: Reachable"          			[ stateTopic="tasmota/sonoff-XXXX-h801/tele/LWT" ]
		Type number : h801_XXXX_rssi       		"LED H801 #1: Empfang RSSI" 				[ stateTopic="tasmota/sonoff-XXXX-h801/stat/STATE", transformationPattern="JSONPATH:$.Wifi.RSSI" ]

Type string : h801_XXXX_command       	"LED H801 #2: Command"             			[ commandTopic="cmnd/sonoff-XXXX-h801/Backlog" ]

// items
String OG_sz_l_led1_command  "BLINK" <light> (gM,gR,Glicht) { channel="mqtt:topic:mosquitto:h801_XXXX:h801_XXXX_command" }
rule "SZ Schrank-LED Licht 20sec schalten"
    Channel "mihome:sensor_switch:XXX:YYY:button" triggered DOUBLE_PRESSED  
    OG_sz_l_led1_command.sendCommand("Backlog power on; delay 200; power off")

The outcome is as follows:

[vent.ChannelTriggeredEvent] - mihome:sensor_switch:XXX:YYY:button triggered DOUBLE_PRESSED
[ome.event.ItemCommandEvent] - Item 'OG_sz_l_led1_command' received command Backlog power on; delay 200; power off
[nt.ItemStatePredictedEvent] - OG_sz_l_led1_command predicted to become Backlog power on; delay 200; power off

… so nothing happens with the LED :frowning:

Never tried this but what happens if you change the item from string to switch and try controlling it via BasicUI?

This will lead to an error:

Tried to set invalid state Backlog power on; delay 200; power off (StringType) on item OG_sz_l_led1_command of type SwitchItem, ignoring it

I think you need to ask on or look in the Tasmota site to see what topic and what the message needs to be in order to issue that command. What you enter on the console bears little resemblance to the MQTT messages it receives.

1 Like

Is that the status LED?

Do you mean the LED on the H801 controller? No - I would like to switch the connected LED stripe.

You Ulsan have to easy tasmota docs burn I believe you can create a virtual switch’s and use a rule.

I don’t think backlog can be sent over mqtt

1 Like

Maybe with a rule inside tasmota that changes backlog so it can be sent via mqtt? I think tasmota allows rules??? I know ESP_Easy does.