Hi
@rleiman ,
I'm pretty sure it depends on whether a manufacturer has published API documentation (or some clever soul has reverse-engineered one), and for WIFI-connected devices I haven't come across any standards, as opposed to e.g. Zigbee connections.
For Sonoff devices (as you mentioned eWeLink) the only option I found is
this python project which I intend to use on my B4J RPi server program that then communicates with my front-end Android app. I might give it a shot to 'B4Xify' the python code, but that could be a while - I don't speak python so there would be a lot of trial and error involved - and, once I get to actually playing with the things, I'll probably first use the python code via jShell.
I realise this doesn't really answer your question, but perhaps it offers some food for thought. Good luck!