Open foulek57 opened 3 years ago
I also have payloads for other devices if you can interpret my code for my homebridge plugin:
https://github.com/bwp91/homebridge-ewelink/tree/latest/lib/device
Hi @foulek57 how do you send that payload to ewelink? Can you please provide an example
Thanks in advance
Hi,
After you open the socket, Just using socket.send(payload); Need to convert the payload to string before you send it with the socket const string = JSON.stringify(payload); Then socket.send(string);
Sorry I using my mobile phone to write. So I don't have any examples by hand.
Hi @skydiver
I use this API a lot of time now, and send payload over the ws for the device that are not in this api. Now the time to share you all what i have, so if you want to add function... I'm not specialist in nodejs to pull a request, so sorry ...
The getDevicePowerUsage no more work by me, have captured the request of the app :
For the data of the day :
Result :
For the data of the last 100 days :
Result :
...
Sonoff B1
Cold :
Warm :
RGB :
IFAN :
Fan on :
Fan off :
Speed 1 :
Speed 2 :
Speed 3 :
Sonoff POW :
To get the instant data of the Sonoff Pow just send
all 60 sec.
Switch "Kingart Q" (for the store)
Set the % of closing :
Pause :
I hope this can help someone.