kukkjanos / ewelink Goto Github PK
View Code? Open in Web Editor NEWEWeLink Smart Home API Methods
EWeLink Smart Home API Methods
Good day !
API changed: https://www.gitmemory.com/issue/skydiver/ewelink-api/21/549051843
Do you have any wish to update library?
Hello,
the functions getDevices()
and getDevices($deviceId)
work and give back all necessary data. ๐
But toggleDevice($deviceId)
is not working.
Apache logs says:
[Thu Apr 11 18:02:55.088519 2019] [:error] [pid 14929] [client 195.111.111.111:51120] PHP Fatal error: Uncaught WebSocket\\ConnectionException: Empty read; connection dead? Stream state: {"crypto":{"protocol":"TLSv1.2","cipher_name":"ECDHE-RSA-AES128-GCM-SHA256","cipher_bits":128,"cipher_version":"TLSv1.2"},"timed_out":false,"blocked":true,"eof":true,"stream_type":"tcp_socket\\/ssl","mode":"r+","unread_bytes":0,"seekable":false} in /var/.../src/vendor/textalk/websocket/lib/Base.php:202\nStack trace:\n#0 /var/.../src/vendor/textalk/websocket/lib/Base.php(92): WebSocket\\Base->read(2)\n#1 /var/.../src/vendor/kukkjanos/ewelink/src/Api/Api.php(154): WebSocket\\Base->receive()\n#2 /var/.../src/vendor/kukkjanos/ewelink/src/Api/EWeApi.php(73): EWeLink\\Api\\Api->sendWSMessage(Array)\n#3 /var/.../src/toaster.php(48): EWeLink\\Api\\EWeApi->toggleDevice('1xxxxaabbc')\n#4 {main}\n thrown in /var/.../src/vendor/textalk/websocket/lib/Base.php on line 202
Could you please check this. I am not able to debug php.
Thanks
Hello,
during install i got this error message:
...
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
...
Can this be ignored?
These apis failed to work a lot of times before working fine. I had to refresh the page 3-6 times before making it work. I added do-while in getDevice to loop the process untill sonoff does not accept the connection.
Another fix: when you login with the apis, it creates a cache file, if you use another session of ewelink (from your smartphone, another server with apis, etc) your apis will not work more, because ewelink only supports one session for time. So if you want to force the re-connection you have to ignore cache when you receive the error (so re-make the connection to your account).
Write me in private chat for working apis or if you need help.
As eWeLink will stop provide the support and maintance of current APPID & APP secret on Aug 31th 2020.
That means that this project may work improperly.
eWeLink will offer a special APPID and APP secret for this project.
@kukkjanos Please contact me via the mail
To: [email protected]
and cc: [email protected]
Daniel
Suddenly, the api returns this message
array [ "code" => 400 "error" => "params is incomplete" ]
Sometimes it still works, but a lot returns this.
Is it because of some change in the ewelink servers?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.