Giter VIP home page Giter VIP logo

Comments (5)

Garfonso avatar Garfonso commented on July 30, 2024

Hi,

what device do you try to talk to?
Do you see a webpage on the IP?

from dlinkwebsocketclient.

joroMaser avatar joroMaser commented on July 30, 2024

@Garfonso I have edit my post , thank you

from dlinkwebsocketclient.

Garfonso avatar Garfonso commented on July 30, 2024

@joroMaser what device do you want to talk to? DSP-W118?

The device returns an error, when the library asks for the current state of the socket.
You can try with a modified version of the switch.js file (which is meant as example anyway) and remove the client.state() call and see if it manages to switch the socket on or off.

from dlinkwebsocketclient.

joroMaser avatar joroMaser commented on July 30, 2024

@Garfonso
Do you mean comment out the lines:

let state = await client.state();
console.log('Socket is ' + (state ? 'on' : 'off'));

in switch.js ?

I still got

Had error: Error: API Error 2: system error   
    at WebSocketClient._setSetting (/mnt/dlink_websocketclient/index.js:263:19)       
    at process._tickCallback (internal/process/next_tick.js:68:7

from dlinkwebsocketclient.

Garfonso avatar Garfonso commented on July 30, 2024

@Garfonso Do you mean comment out the lines:

let state = await client.state();
console.log('Socket is ' + (state ? 'on' : 'off'));

in switch.js ?

yes.

I still got

Had error: Error: API Error 2: system error   
    at WebSocketClient._setSetting (/mnt/dlink_websocketclient/index.js:263:19)       
    at process._tickCallback (internal/process/next_tick.js:68:7

So it can not switch.
What device is this? (third time I ask... sorry.... without this information I can recommend nothing further)

from dlinkwebsocketclient.

Related Issues (3)

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.