How do I create a plugin for a cloud connected smart device?

I’ve edited the title to make it a little more generic. Specifically I have a Powrmatic A/C unit, but it could be any cloud controlled device - what I mean by that is a WiFi connected device with some form or proprietary internet hosted controller and (probably) a mobile app.

I installed a MITM proxy to get the commands, so I already know what the A/C unit is sending and receiving when I perform certain functions on its app, if there is already a plugin for a similar device which uses a cloud system then I can use as a starting point and modify the specifics to make it work?

It seems to use x-headers for identification of the specific unit and urlEncoded form for sending the temperature set point (Though on and off don’t use that, so that will be part two if it’s not simple!)

At the moment I want to do this to integrate the A/C into the smart home system, but I can see this being even more useful in a few years when someone switches the cloud server off!

I am curious about this myself, and will be following this thread. How are you expecting to send commands to the AC, will you be using ordinary HTTP Get or Put commands? Or something else? Will those commands be originating from within your LAN, or from outside it (which would add considerable complexity)?

I also do not understand exactly what you are asking for. If you want to know how to write a Plugin to perform HTTP get or puts, then you might want to examine existing plugins to see how they do it. The new Tasker Plugin is a very simple plugin that does HTTP Get’s, for example.

1 Like

@Mark_Manning For the more complicated devices, such as cloud controlled, I use Home Assistant because it’s plug and play, then I can use simple GET and POST requests to communicate between HR and HA. But as @aa6vh mentioned, it depends how the Powrmatic communicates - TCP, HTTP Get/Put/Post. I imagine if you have the Powrmatic documentation, you can rock a plugin. Here’s some info I saw for commands:

And here’s an example of a plugin for something that’s cloud controlled:

2 Likes

Thank you, both of you, I’ve started writing a plugin and will report back once I’ve got it working (or given up!)

Hi Mark, did you manage to get this integration to work? I have 5 of these units as well and new to HA. The App from the manufacturer is really unreliable so I was hoping I could do the same. I found this thread searching for a solution :slight_smile: