gysmo38 / mitsubishi2MQTT

Mitsubishi to MQTT with ESP8266 module
GNU Lesser General Public License v2.1
393 stars 141 forks source link

last action stays in the url #53

Closed spfmoby closed 4 years ago

spfmoby commented 4 years ago

Hi Something is bothering me : I often keep a tab of my web browser (computer, smartphone) opened with the control page of my AC (ie : http://192.168.1.33/control ) When I make an action, like turning the AC on or off, the url becomes http://192.168.1.33/control?POWER=OFF for example. If later I refresh (or the tab is automatically reloaded after I quit and restarted my browser) and in the meantime I changed the status of the AC (powered on with the remote for example), it automatically shuts it off which is not very convenient. Is there a reason for the url to be keeping the last action? Wouldn't it be better if a new location was called (/control) after each command or the url rewritten using javascript for example?

shampeon commented 4 years ago

Changing the method to POST should keep the params from the URL.

spfmoby commented 4 years ago

thanks. I tried, it works, except for the temperature which still reacts as a POST request http://192.168.1.33/control?TEMP=21 http://192.168.1.33/control?TEMP=21.5 ...