ageorgios / homebridge-tasmota-mqtt-motor

Homebridge plugin to control Tasmota Switch for an UP/DOWN motor (like a window)
Other
6 stars 0 forks source link

HTTP Commands #4

Open Hadea4711 opened 4 years ago

Hadea4711 commented 4 years ago

Hi,

you wrote that "Uses HTTP for sending commands and MQTT for listening for button presses and updating state".

Could you be please so kind and give an example for using a HTTP command in regarding with your MQTT Script?

In my case, I will open/close the blinds, but I don't have any ideas. I'm a rookie :-(.

Commands: http://sonoff/cm?cmnd=Power1%20On http://sonoff/cm?cmnd=Power2%20On

udovic2100 commented 4 years ago

@Hadea4711: Yes, HTTP is used to send open and close commands. See tasmota documentation.

@ageorgios: I encountered a problem with the way the HTTP command is formatted. According to the tasmota documentation you need to replace all semicolons with '%3B' when using backlog over HTTP. In the Homebridge logs I see the link that is sent to control the Tasmota device and it still uses semicolons. Even when copying the command to a web browser the Tasmota won't react. When I replace the semicolons with '%3B', however, it works. Is that a new behavior of Tasmota? Can we change the code so it replaces the semicolons automatically? Could you please comment?

ageorgios commented 4 years ago

I commited the change to %3B, it works both ways on my setup

udovic2100 commented 4 years ago

Thanks so much for your quick reaction. In the meantime I tested the tasmota shutter and blinds mode (SetOption80) and think it’s also kinda neat. It has many calibration and compensation features such as time offsets for lifting. If you haven’t already, you should check it out.