How to write addons for closed API devices

(Barry van Oudtshoorn) #1

I’d love to get started writing addons for things like my air conditioner. It doesn’t have a public API, unfortunately. :frowning: What’s the best way of getting started with something like this? It’d be great to have a collection of resources around this, because there are a whole lot of IoT devices with closed APIs, and it’d be awesome to crack them open. :wink:

(Dave Hylands) #2

I think that the first thing you need to do is to figure out how to actually control your air conditioner from some code. Coding in Python or Javascript will probably be easiest, but it really depends on what you’re comfortable with.

Once you’ve done that, then you can start to think about the web api properties. You’ll probably want on an on/off property and a temperature set point property.

Then you can look at one of the existing adapters to see how to go about structuring your add-on/adapter. I’d probably look at the gpio or example adapter as a starting place. The tp-link adapter ( is written in python, while the gpio and example adapters are both done in Javascript (node).

(Felix) #3

you can use packet sniffers like packet capture for Android to record (even encrypted) packets, send from your device.
Usually those api’s use XML and JSON, so maybe you can extract information about the api structure by reading packets.