Giter Site home page Giter Site logo

setOn is locked about homebridge-playstation HOT 6 CLOSED

awesole avatar awesole commented on August 20, 2024
setOn is locked

from homebridge-playstation.

Comments (6)

kopiro avatar kopiro commented on August 20, 2024 1

Hello everyone, the setOn is locked is a preventive timing measure to make sure that the library that we use underneath and the communication with the Playstation works correctly.

What you're seeing then it may be happening because you're just "testing" the plugin and hammering the Playstation with burst of connections, and not using it like you should on a daily basis; something like an Heisenbug.

I've been using the plugin myself for many months now, and you can rest assured that unless you're hammering it, it should do the job.

Let me explain more technically: I observed many errors when trying to switch on/off the console via RemotePlay in a short burst of time; this is happening because the opening of the RemotePlay connection takes some time (is not persistent, as it won't be needed for this feature) - therefore whenever you want to switch on/off, we open a RemotePlay connection, send command and close.

Because this is happening over the Internet, negotiating the initial connection may take sometime; therefore to avoid having these errors and making sure that we don't overload the Playstation, whenever you turn the Playstation on/off via HomeKit, I've a put a 20s timeout that, in case of successful connection it will be released "immediately".

How much immediately really depends on many factor, but what I observed is around 6s to open the connection, send the command, cleanup resource and close connection.

Try it yourself: switch the Playstation On via HomeKit - wait around ~20s - and then try to switch it off; everything should work as expected.

from homebridge-playstation.

kopiro avatar kopiro commented on August 20, 2024 1

What I can try to do is explain this better is the error-message so that people are aware of this limitation :)

b1d2d83

from homebridge-playstation.

lorenzomigliorero avatar lorenzomigliorero commented on August 20, 2024

Same issue

from homebridge-playstation.

valerioceniccola avatar valerioceniccola commented on August 20, 2024

same issue for me

from homebridge-playstation.

briancrink avatar briancrink commented on August 20, 2024

Same Issue.

from homebridge-playstation.

briancrink avatar briancrink commented on August 20, 2024

Hello everyone, the setOn is locked is a preventive timing measure to make sure that the library that we use underneath and the communication with the Playstation works correctly.

What you're seeing then it may be happening because you're just "testing" the plugin and hammering the Playstation with burst of connections, and not using it like you should on a daily basis; something like an Heisenbug.

I've been using the plugin myself for many months now, and you can rest assured that unless you're hammering it, it should do the job.

Let me explain more technically: I observed many errors when trying to switch on/off the console via RemotePlay in a short burst of time; this is happening because the opening of the RemotePlay connection takes some time (is not persistent, as it won't be needed for this feature) - therefore whenever you want to switch on/off, we open a RemotePlay connection, send command and close.

Because this is happening over the Internet, negotiating the initial connection may take sometime; therefore to avoid having these errors and making sure that we don't overload the Playstation, whenever you turn the Playstation on/off via HomeKit, I've a put a 20s timeout that, in case of successful connection it will be released "immediately".

How much immediately really depends on many factor, but what I observed is around 6s to open the connection, send the command, cleanup resource and close connection.

Try it yourself: switch the Playstation On via HomeKit - wait around ~20s - and then try to switch it off; everything should work as expected.

Thank you for clarifying. It's helpful for users to understand the limitations of the plugin so to not label it as an issue.

Perhaps, it would be resourceful to add the limitations to README.md :)

from homebridge-playstation.

Related Issues (20)

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.