maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   [Announce] Slumber – Sleep Timer for SailfishOS (https://talk.maemo.org/showthread.php?t=96093)

velox 2015-10-23 12:07

[Announce] Slumber – Sleep Timer for SailfishOS
 
Hi all,
I made a thing and would love you to tell me if it works for you:

slumber is a sleep timer program for SailfishOS with sensors support.

This means you can use the accelerometer or proximity sensor to reset the timer if the display is lit: Just place your device on your bed and slap the mattress in it's general direction to reset the timer. If the display is off, tapping the screen thrice to "wake up and reset" in one go works reasonably good as well.

It's designed to pause local media players or Kodi/VLC via network.
If your device supports it (Jolla1 does not), aliendalvik/android media players shown on the lock screen should work, too.
Optionally, an audible notification plays for the last few seconds before pausing your media.

Please let me know if it works for your favourite Player.

http://i.imgur.com/MGbJ50z.png

Known restrictions:
- Does not work with Android media players on jolla1 phone.
- Does not work in Sailfish Browser (working alternative: WebPirate Browser)
- Sensors won't work when Display is off. But there is an option to keep it on while the timer runs. (If you know how to fix: please tell me!)
- Phone Vibration might trigger Accelerometer. (Well…)

Install
- https://openrepos.net/content/velox/slumber (most recent builds)
- from Jolla Store (old aka. stable)
- build it yourself after getting it on github


Changelog don't waste your bandwidth if you don't think it's worth it

* version 0.12-1 (in jolla store)
- bugfix: fix settings page for volume restoration
- feature: add simple dbus interface
- a lot of translation updates (thanks, translation team!)

* version 0.11-2
- feature: reset timer with button press on Amazfish-connected device
- feature: optional second Kodi action: Suspend/Shutdown (Not supported on every Kodi configuration)
- feature: disconnect (audio) bluetooth devices without fully shutting down BT
- enhancement: enable "quick select" for main page pull menus
- bugfix/enhancement: support Kodi 18 (leia) API change
- appearance: move notification setting to "Actions" settings page
- appearance: make "playback detected" notification inline
- some translation updates (thank you, translation team!)

* version 0.10-1
- packaging/meta data: OBS compatibility
- user request: main page hint font size increased (previously hard to read in chinese)
- enhancement: restore volume faster on cancel
- many translation updates
- enhancement: add 172x172 icon
- feature: replace BT action with privileged actions

* version 0.9-2
- bugfix: fix broken translations
- bugfix: only disable bluetooth after volume is restored
- translation updates: es/zh/fr/nl/nl_be/sl
- enhancement: always reset volume while canceling (even if reset not enabled)
- enhancement: only trigger "void" fallback after mpris handling is done

Ancelad 2015-10-23 12:26

Re: [WIP] Slumber – Sleep Timer for SailfishOS
 
Please, fix button-width :D It is too big...

velox 2015-10-24 12:33

Re: [WIP] Slumber – Sleep Timer for SailfishOS
 
Quote:

Originally Posted by Ancelad (Post 1486496)
Please, fix button-width :D It is too big...

Yay, if Button Layouts are the worst thing anyone notices, that's a pretty good sign.
It looks a bit weird on Landscape, though, good point. On Portrait, I think it's actually prettier than automatic width, but I'll just change it and get over it. :) Thanks for taking the Time and giving Feedback!

velox 2015-10-24 21:49

Re: [WIP] Slumber – Sleep Timer for SailfishOS
 
v0.2 is uploaded to warehouse & first post is updated. Buttons are much narrower now :D

MikeHG 2015-10-24 23:10

Re: [WIP] Slumber – Sleep Timer for SailfishOS
 
Killdroid in the Jolla store can restart the Alien Dalvik system, as long as you've given it your root password.

Makes me wonder if you could use that (or the same mechanism) to shut all Android apps. It'd have to be a setting - it's a pretty blunt way of turning off the radio :)

ETA - there's also this http://talk.maemo.org/showthread.php?t=96085

CepiPerez 2015-10-25 04:13

Re: [WIP] Slumber – Sleep Timer for SailfishOS
 
nice app, but doesn't work for flowplayer
how does it work? dbus? I can add whatever you need, just let me know

velox 2015-10-25 11:00

Re: [WIP] Slumber – Sleep Timer for SailfishOS
 
Quote:

Originally Posted by MikeHG (Post 1486657)
Killdroid in the Jolla store can restart the Alien Dalvik system, as long as you've given it your root password.

Makes me wonder if you could use that (or the same mechanism) to shut all Android apps. It'd have to be a setting - it's a pretty blunt way of turning off the radio :)

ETA - there's also this http://talk.maemo.org/showthread.php?t=96085

I'll keep this in mind as a possible feature in the future. Good to know there are ways to kill dalvik and still get accepted to Jolla Store. Thanks!

Quote:

Originally Posted by CepiPerez (Post 1486663)
nice app, but doesn't work for flowplayer
how does it work? dbus? I can add whatever you need, just let me know

Pausing media is actually a bit of a hack right now: I just play a very short, silent .mp3 file right out of QML, which automatically pauses a lot of native players. I tried using dbus from QML when I wanted to fade out media volume before, but didn't get anywhere. Hints how to do that stuff at all (and helpful dbus methods) would be greatly appreciated…

r0kk3rz 2015-10-25 16:00

Re: [WIP] Slumber – Sleep Timer for SailfishOS
 
Quote:

Originally Posted by velox (Post 1486679)
Pausing media is actually a bit of a hack right now: I just play a very short, silent .mp3 file right out of QML, which automatically pauses a lot of native players. I tried using dbus from QML when I wanted to fade out media volume before, but didn't get anywhere. Hints how to do that stuff at all (and helpful dbus methods) would be greatly appreciated…

Using MPRIS to pause the players might be a better solution for native players. Which is what the lockscreen media controls use, and so is a common API for you to hook into

http://specifications.freedesktop.or...est/index.html

https://github.com/nemomobile/qtmpris

velox 2015-10-25 16:16

Re: [WIP] Slumber – Sleep Timer for SailfishOS
 
Quote:

Originally Posted by r0kk3rz (Post 1486694)
Using MPRIS to pause the players might be a better solution for native players. Which is what the lockscreen media controls use, and so is a common API for you to hook into

http://specifications.freedesktop.or...est/index.html

https://github.com/nemomobile/qtmpris

This is why I like this place. Thanks, I'll definitely look into that!

CepiPerez 2015-10-25 21:48

Re: [WIP] Slumber – Sleep Timer for SailfishOS
 
Add this to your globals.qml file:

on top of page:
import org.nemomobile.mpris 1.0

Insde main Rectangle component:
MprisManager { id: mprisManager }

then when timer is triggered add this:
mprisManager.pause()

This should work for stock player and flowplayer (also cutespot uses mpris afaik)

velox 2015-10-26 00:46

Re: [WIP] Slumber – Sleep Timer for SailfishOS
 
Meanwhile, I resorted to calling mpris via DBusInterface directly, that seems to work for now. But your Solution might be more robust – I will test that, as well. Thanks!

version 0.2-3 is uploaded to openrepos.

edit: I could not sleep, so I tested MprisManager. Works brilliantly, but harbour tools don't like "import org.nemomobile.mpris 1.0", so I'm sticking with manual calls for now.

velox 2015-10-28 06:54

Re: [WIP] Slumber – Sleep Timer for SailfishOS
 
I've uploaded v0.3-1 today.

Because I use Kodi (XBMC) a lot, slumber now supports pausing it when the Timer runs out.
Also fixed a Bug where you couldn't use Sensors to reset while the "running out" sound was playing.

velox 2015-11-06 12:35

Re: [WIP] Slumber – Sleep Timer for SailfishOS
 
Call for Help testing
Yesterday I got word from Jolla QA that pausing Kodi v15.2 didn't work on their test rig (Kodi running on Ubuntu) – testing the connection in Slumber Settings worked, though.

I've had no Problems using a bunch of Versions, including Raspberry Pi (OpenELEC 5.08), Kodi on Android and Linux (v15.2).

Does anyone here use Kodi, can reproduce this Problem and has the time to post the result of

HTML Code:

http://[USER]:[PASSWORD]@[KODIBOX]:[KODIPORT]/jsonrpc?request={%22jsonrpc%22:%222.0%22,%22method%22:%22Player.GetActivePlayers%22,%22id%22:1}
here? (Replace the user/host data, open in a Browser while kodi plays, preferably not on the kodi box itself)

You'll get a nice thank you on the About Screen if you like. ;)

Thanks!

velox 2015-11-09 10:45

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Sorry for "bumping" the thread with stuff you might not care about, but this is big news for me:

The error in QA has been found and Slumber is now available in Jolla Harbour.


Thanks to Jere at Jolla and everyone here who helped with feedback so far!
First Post is updated.

velox 2015-11-12 01:08

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Yet another bump… ;)
Version 0.4 is deployed to openrepos for testing. Please tell me if you like it.

Changes
- new option: disable bluetooth when timer runs out (thanks: marxian & coderus)
- new option: keep display lit while timer is running
- new option: darken main application screen while timer is running
- user request: optional visual indicator before timer runs out
- user request: stronger acceleration needed to trigger "shaking"
- user request: new, even stronger shaking option "earthquake"
- ui tweaks (new sub page for appearance options, VerticalScrollDecorators on options pages)

Enjoy!

velox 2015-11-21 23:15

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Version 0.4-3 is up on openrepos.

If you use kodimote or unplayer, you might want to update:
- new: kodimote support as "local" player (you don't need to configure Kodi in slumber if kodimote is connected.)
- added support for unplayer
- moved source to github

First post is updated…

eson 2015-11-22 11:11

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
I was thinking of helping translate, but there is no option for more languages at Transifex. German and Spanish are the only available languages to join.
Of course I could make a pull request at GitHub if you prefer?

Edit:
Found the button at Transifex. The bastards had moved it to a hidden place. ;)

velox 2015-11-22 15:53

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Quote:

Originally Posted by eson (Post 1489162)
I was thinking of helping translate, but there is no option for more languages at Transifex. German and Spanish are the only available languages to join.
Of course I could make a pull request at GitHub if you prefer?

Edit:
Found the button at Transifex. The bastards had moved it to a hidden place. ;)

Ah, did not check here before sending you a Message on Transifex (I'm not at home there, as well, just made an account last week) – I'll add you as a coordinator for swedish, whatever that means, but you'll have sufficient rights to edit and check everything, I think. ;)
Thank you so much for offering to help!

Edit: pull requests are fine as well, just heard that transifex was the way to go these days… :)

eson 2015-11-22 16:19

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Quote:

Originally Posted by velox (Post 1489193)
Ah, did not check here before sending you a Message on Transifex (I'm not at home there, as well, just made an account last week) – I'll add you as a coordinator for swedish, whatever that means, but you'll have sufficient rights to edit and check everything, I think.

Thanks! I've sent you a reply message at Transifex to.
It's not like it was my first time at Transifex, so I should know where to click, but it seem like they really did move some things around since I last made a language request. :D

velox 2015-12-04 14:24

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Language update on openrepos, folks!

0.4-4: Thanks to CepiPerez and eson, slumber now has spanish and swedish translations!


Edit:
Also, QA is working: 0.4-2 is now available in jolla store.

velox 2016-01-03 00:54

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
0.4-5 on openrepos:
- Thanks to ria88 for the finnish translation!
- player support: talefish & "qtmpris" used by vlc remote

have fun!

velox 2016-12-22 09:36

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
After almost a year of silence, there was an update again tonight!

0.5-1 on openrepos:
- Works with some android players (if you see lock screen controls with an android app, slumber should be able to pause it, as well). As you'd expect, this feature does not work on the jolla one.

If everyone is silent/happy, I'll try publish this version on the jolla store as well "soon". (That's why the version number changed to 1.5.)


Cheers!

[edit]
build 2 of 0.5 is on openrepos and includes a polish translation (thanks atlochowski!) because this community thing is awesome! First post is updated as well.
[/edit]

Ancelad 2016-12-25 15:06

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
One of the best SailfishOS-app ever. And now it has Russian translation.

velox 2016-12-25 21:17

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Quote:

Originally Posted by Ancelad (Post 1521033)
One of the best SailfishOS-app ever. And now it has Russian translation.

Thank you so much for the translation!
Also that's the nicest thing anyone said about slumber, which is a great christmas present itself. I'm really glad to hear it's useful!

So, yeah, changelog goodness, even if a day late:
* version 0.5-4 is on openrepos
- new translation: russian (thanks again ancelad!)
- polish translation update (thanks atlochowski!)

cheers!

karlos devel 2016-12-25 23:11

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
any plans to Talefish @velox? : )

velox 2016-12-26 06:38

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Quote:

Originally Posted by karlos devel (Post 1521044)
any plans to Talefish @velox? : )

Yeah, I know… I've kind of answered in the talefish thread…

velox 2017-01-11 20:28

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Version 0.5-5 is now on openrepos:
- bugfix: "keep display lit" does not time out anymore

Also, the previous build 0.5-4 is the first update submitted to jolla store and available there as well.

Enjoy!

Ancelad 2017-01-13 20:29

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Please, update russian translation in the next release

velox 2017-01-14 09:08

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Quote:

Originally Posted by Ancelad (Post 1521918)
Please, update russian translation in the next release

Absolutely, thanks for providing and updating it!

Version 0.5-6 is now on openrepos:
- enhancement: "keep display lit" timer duration decrease
- translation update russian (thanks ancelad)

velox 2017-01-22 18:26

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Version 0.6-1 is now on openrepos:
- bugfix: app start does not change system volume anymore

Version is bumped to publish this version of slumber on jolla store, as well.
[edit] It's through QA and in the jolla store [/edit]

velox 2017-02-11 13:13

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
* version 0.6-2 is just released on openrepos:
- new translation: Slovenian (thanks sponka!)
- user request: Long press in main view opens timepicker (no need to go through settings anymore)
- appearance: Typography: Time Strings not subscript anymore
- appearance: Slightly smaller text on tablet
- spanish translation update

Cheers!

velox 2017-03-05 17:27

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Nathan Follens has been busy and translated both of my apps, so

* version 0.6-3 has landed on openrepos:
- new translation: Dutch (thanks pljmn!)

Sorry for not being able to release it sooner. :)

velox 2017-03-22 18:32

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
* version 0.7-1 is up on openrepos!

Because I'm a bit more excited about it than I should, here's a bit more text than usual, sorry. The TL;DR part is bold.

I've finally managed to include a feature I wanted to have since the beginning (and which has been requested more than once):
An option to fade out the local media volume shortly before the sleep timer runs out.

Actually I've managed to do it twice this week, but the first implementation wasn't compliant with harbour rules, so I scrapped it. Yay!

Big thanks to kimmoli, I've adapted the relevant bits and pieces of the pulseaudio code that I ended up using from stuff I found in buttonjackd. There was no license specified over there, but I guess he won't be mad at me incorporating this into a GPL application.

Another big thank you (again) to the translation community: Some Translations were already there the morning(s) after I hacked around late. Unbelievable! :)

Please let me know if it works for you! Thanks!

velox 2018-02-15 22:38

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Hi folks,
we got a translation update with version 0.8-2 (on openrepos):
- new translations: Italian (thanks fravaccaro) & French (thanks lutinotmalin)
- add more translators to about page

cheers!

velox 2018-09-03 09:33

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Hi folks,
version 0.8-3 ist up on openrepos!

Changes:
- New Option: Notification! You can now enable a notification to pop up ten seconds before the timer runs out. This should switch on the screen and, with it, re-enable the accelerometer, so you can resume listening without fumbling with the device (Xperia X does not reliably do "double tap to wake") or opening your eyes in bed. Tapping the notification itself does nothing.
- I removed the "switch bluetooth off" trigger, because the corresponding DBUS call is blocked on current SFOS versions. So it stopped working, I think, on SFOS 2.2.
- On some ambience colors, the Cover wasn't very readable, so I set the font color to "Theme.primaryColor", which normally means "white".
- Translation updates

I'd appreciate some feedback if this works for you (or, even more important: if it does not).

cheers!

velox 2019-01-05 09:12

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Hi folks!
version 0.8-4 is now out on openrepos!
This should simplify support for new players as long as they use mpris.
Before, the Dbus call for every player had to be predefined, but now slumber is searching for active ones automatically.
Also


- enhancement: query dbus for any active mpris players
- appearance: cover font (secondary) color change
- translation updates: nl/nl_be
- new Translation: zh_cn (thanks rui kon)


EDIT:
Changed a little thing and pushed another build:
* 0.8-5
- enhancement: reset volume a bit later (for slower players like hutspot)

cheers!

velox 2019-01-14 22:40

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Hi again folks,
I just wanted to tell you about a new version, 0.9-1, on openrepos again. The main feature is a convenience setting to detect if a media player starts playing stuff to automatically start the timer. Slumber needs to run for this, but it's a feature that saves me some work almost daily.
Also, disabling BT as an action is back.

* Mon Jan 14 2019 0.9-1
- new option: detect playback (mpris) to start timer
- audio: optimize clock sound effect (more click, less noise)
- feature: re-introduce bluetooth disable action
- performance: some minor refactoring
- dev convenience: rename translations


Please let me know if it works for your device(s)!

cheers!

carlosgonz 2019-01-15 18:48

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
spanish lang-, it is not workin. i need update the es.ts file too.

velox 2019-02-03 22:01

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
I've now been able to release the new version 0.9-2 with fixes to broken translations after some other annoyances/issues have been dealt with. Thanks for all bug reports!

* Sun Feb 03 2019 0.9-2
- bugfix: fix broken translations
- bugfix: only disable bluetooth after volume is restored
- translation updates: es/zh/fr/nl/nl_be/sl
- enhancement: always reset volume while canceling (even if reset not enabled)
- enhancement: only trigger "void" fallback after mpris handling is done


cheers!

velox 2019-02-18 22:46

Re: [Announce] Slumber – Sleep Timer for SailfishOS
 
Hi folks,
with version 0.10-1, quite a few things changed in the background.
What's visible is that the Bluetooth switch (that previously worked only on a few systems) is now grouped together with more "privileged actions" (Lock Screen, Alien Dalvik off, Flight Mode on, Wifi off, BT off), which require you to grant access once using your developer tools password. The access can be revoked at any time and developer tools don't need to remain enabled afterwards.

Many thanks to my dear translators, especially rui kon, who also did quite a bit of testing!

* Mon Feb 18 2019 0.10-1
- packaging/meta data: OBS compatibility
- user request: main page hint font size increased (previously hard to read in chinese)
- enhancement: restore volume faster on cancel
- many translation updates
- enhancement: add 172x172 icon
- feature: replace BT action with privileged actions


cheers!


All times are GMT. The time now is 02:07.

vBulletin® Version 3.8.8