I spent some time last week reverse engineering my TP-Link HS100 WiFi Smart Plugs. I was able to figure out the protocols, messages, and encodings. I have some Java code to enumerate the devices on the network (get the info such as name, ip address, current state,) and send a message to toggle the state. I am currently running 1.8.2 OpenHab and I would like to create a binding for OpenHab that I can contribute to the community. My first question is should I start developing it for OpenHab 1.x or 2.x? Second is can anyone recommend a similar binding I could use as a reference while creating my own?
I guess the guidance is unless you have a specific reason to stick to OH1.x, develop for OH2.x as 1.x support will decrease over time as OH2.x improves.
The Orvibo binding is another WiFi Smart Plug/Switch so that may be a good reference point for you, although again this is an OH2.x binding.
I’ll seconds @danielwalters86’s comment, build it for OH 2. Furthermore, only OH 2 will be able to do anything with your auto discovery of devices anyway so to build a fully functional binding you will have to do it in OH 2 anyway.