HTTP-Binding / accessing Tasmota by URL

Hi there,

I’m trying to access my tasmota device by http call. The correct url is:

http://192.168.178.94/cm?cmnd=Power%20ON

I’m trying to change the state by accessing it with the http-binding in the item declaration.

Switch Switch_Tasmota_W1 “Fan 1” (Tasmota,myopenHab) [“Switchable”] { http=“>[ON:GET:http://192.168.178.94/cm?cmnd=Power%20ON] >[OFF:GET:http://192.168.178.94/cm?cmnd=Power%20OFF]” }

Then I get the following error:

2020-10-21 12:51:48.810 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/Switch_Tasmota_W1] {item=Switch_Tasmota_W1, bridgemarker=true, command=ON, timestamp=1603277508807} | {org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler}={service.id=379, service.bundleid=241, service.scope=bundle, event.topics=openhab/*, service.pid=org.openhab.http, component.name=org.openhab.binding.http, component.id=19} | Bundle(org.openhab.binding.http_1.14.0 [241])]
java.util.UnknownFormatConversionException: Conversion = ‘O’

Looks like I need to mask the % char? How can I do this / what do I need to change to make it work?

Thanks in advance!

And I just found the answer: I need to mask it with

Power%%20ONN

1 Like