Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync lights with powersave mode (feature request) #38

Open
tschuett68 opened this issue Nov 17, 2021 · 1 comment
Open

Sync lights with powersave mode (feature request) #38

tschuett68 opened this issue Nov 17, 2021 · 1 comment

Comments

@tschuett68
Copy link

It would be great if I could sync lights with scrensaver or powersave states.
My desktop lights are hue contollable. It would be great, if they would switch off when the computer goes into power save and come back on, when I log in again.
The signals seem to be a bit all over the place - so that could be a problem
https://unix.stackexchange.com/questions/28181/how-to-run-a-script-on-screen-lock-unlock
But checking for signal looks pretty straight forward in gdjs
https://askubuntu.com/questions/170263/gnome-shell-js-listen-for-dbus-signal-on-an-interface-for-any-path

Love the extension. Keep up the great work.

@vchlum
Copy link
Owner

vchlum commented Nov 18, 2021

HI @tschuett68 !

I already wanted to add this feature.

I ended with the following issue so far: I wasn't able to reliable turn off the light on logout/screen lock/... The only suitable place is the destructor of the extension. The destructor is called on suitable occasions, but the extension is destroyed too early - before the asynchronous request can be issued/finished. So turning off the light(s) is problematic.

I will check out the link you have suggested. Thank you. Not sure if hooking up the screensaver is reliable. I will try it. Maybe there is some suitable signal, which I do not know about yet. I will try to search again.

Meanwhile, you can try the feature 'entertainment areas' - if you wish. This feature can work in the way you request. ..or in a similar way at least:-) You can create an entertainment area on the original mobile app. Once the entertainment area is created, you can enable the entertainment area to start on login/screen unlock. The lights will eg. synchronize your desktop. The entertainment areas use a stream, which means once you log out/lock the screen the stream will not continue. The extension is destroyed and the bridge will set the lights to preset settings - e.g.: lights can turn off. You need the Philips branded color lights for entertainment areas. Does it help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants