Getting Real Power data from SONOFF S40 WiFi Smart Plug (API usages)

Can anybody point me to a trusted API to get data from “SONOFF S40 WiFi Smart Plug” programmatically?
I tried “com.github.realzimboguy.ewelink.api”, its for java (BTW, im open for any language with c# preference).
Im able to get the device ID, Name and status.
But not current usages power data (e.g. Watt/amps/Volt)

FYI, the “status” is query like this

and it returns like this
{error=0, params=Param{switchValue=‘null’}, deviceid=‘1001xxxxxx’, errmsg=‘null’}

as you can see it has no power usages information. Maybe realzimboguy java api isn’t that deep for this particular device (s40). Are there any other options?


Looks like no body at present interested on this. But for future reference, if any one else stumble upon here, the com.github.realzimboguy.ewelink.api does work, bur for some reason it fails to make the device start sending the periodic status.

so once the java application is running, and web socket is listening, if you open the ewelink app on the mobile and tap the device, that starts the communication stream, and the java app start receiving the data.
basically overrideable methods onMessage & onMessageParsed in WssResponse interface get called back when the device send information. and power, voltage and current information is there.

now, for starting the data stream from the device… whats ewelink app is doing that the java api is failing to do, i haven’t figured that part yet.

also, it looks like in the code, looks like realzimboguy using his own appid & secret.
Not sure how to register a new appId with

So i likely still need to look for other options

Try to find it in the official open-api doc

They told me another email for assisting, just for your needs.