Controlling AC via http POST requests

Hi,
I have an AC that I can control throw http POST requests ( json ) .
all I need to do at is to renew the token( at the begging and every time its expire) and then I can do everything easily ( Mode, Temperature, etc…) .
Could you help please how should I implement it or share an example?
Thanks a lot,
Elior

What brand of aircon is it? There are a few that have really nice integrations, if you’re lucky!

It looks like there’s a REST command which would get you some of the way there: https://www.home-assistant.io/integrations/rest_command/

But the hard part is going to be token renewal - can you tell us a bit more about that? How are you renewing the tokens now? Do you just log in with a username and password at an existing portal then grep a token out of the response page? Is this happening over the local network, or are you bouncing through some remote gateway the AC company provides?

Hi Sam and thank you for you help :slight_smile:
Its local brand that use MIDEA dongle but with new APP and new firmware on the dongle.
I did a reverse engineering to the communication protocol ( it wasn’t too easy because the app written in Fultter ) .
The renewing done by sending your “AC ID” then you can get the new token then you can use it, very simple when you know how the protocol works.
The communication based on POST requests to remote server ( Cloud) and then the cloud communicate with the AC throw another MQTT server.
Elior