Code Monkey home page Code Monkey logo

ewelink's People

Contributors

kukkjanos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ewelink's Issues

function "toggleDevice" is not working

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

Error message during instal

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?

Fixed these apis

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.

params is incomplete

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.