Roon Extension: Alarm Clock v0.7.2


(Mr Fix It ) #21

Hmm guess I missed that in the animation…if thats the case then awesome :smiley:


(Israel Smith) #22

This is fantastic! Please let us know when and how we can try it. Great work.


(Jan Koudijs) #23

Just had an idea for a third action besides Play and Stop: Transfer Zone.

So the first alarm starts playback in Zone A and the second alarm transfers the music to Zone B some time later.

All those possibilities…


(Mr Fix It ) #24

I need a 4th action…see that my wife has left the house, fire up all zones and rock out a predefined playlist! :smiley:

But seriously one sleep timer and one wake timer are all most of us would need with some fade in/out and playlist options for wake, but having more options is always a nice to have if it can be accommodated with little risk of creating a programming nightmare.

Less is more and KISS come to mind…then again I can hardly program my way out of a wet paper bag…


(Jan Koudijs) #25

Hi @wizardofoz,

You’re absolutely right.
Adding too much features/complexity is the typical pitfall for an engineer.
So please keep an eye on me :wink:

For the Transfer Zone case not much complexity is added, but if nobody has a use case it can be easily left out.


(Daniel Beyer) #26

I would leave it out. Transfering zones is more of a corner use case. The Extension is called Alarm Clock, I would keep it to that function. Then later after it has gone live and you’ve seen how it survives the real world, I would begin to think about using it as the basis to expand to related functions.


(Jan Koudijs) #27

I implemented the fade function. It can be used in different ways, depending on the following settings:

Alarm action: Will playback be started or stopped?
Alarm volume: Will volume increase or decrease? (In case playback has already started)

I ended up with 4 types of fading:

Fade-in (Stop->Play transition)
Playback starts at volume 0 and increases till the configured volume is reached. A fade-in reaches the configured volume at the configured time, to make sure you wake up in time.

Fade-out (Play->Stop transition)
Playback is active at an initial volume and decreases till volume 0 is reached, at that time playback is stopped and the initial volume is restored. A fade-out starts at the configured time.

Fade-up (Volume transition)
Playback is active at an initial volume and increases till the configured volume is reached. A fade-up reaches the configured volume at the configured time.

Fade-down (Volume transition)
Playback is active at an initial volume and decreases till the configured volume is reached. A fade-down starts at the configured time.

Notes:

  • All fade types extend the playing time. I choose to give priority to playback, the safe option for an alarm clock.
  • Following this priority approach, a volume increase has priority over a volume decrease. This takes care of the case that two alarms are competing each other, or it can be used to terminate a fade by manually increasing the volume.
  • You don’t configure a fade type, it results from the alarm action and volume in combination with the playing mode at the time the alarm expires.

(Jan Koudijs) #28

I updated the first post to let it reflect the current status of the extension. I will try to do this at a regular basis.


(Mr Fix It ) #29

Looking at the animated gif? I can’t stop it to see the Day(s) options…could you list those please…it’s stops on Mon-Fri long enough that I might assume there are sat/Sun and perhaps everyday and but it looked like a few more than that.


(Jan Koudijs) #30

I increased the display time for the Days pull-down in the first post.

The available options are:

  • Once
  • Daily
  • Monday till Friday
  • Weekend
  • Sunday
  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday

(Mr Fix It ) #31

so with only 5 timers its not possible to have 7 different day presets…but nice to see the day options…thanks


(Jan Koudijs) #32

5 timers is just a number I picked.

It can be 7, 10, …

What would be a sensible number?


#33

Hi Jan,

great work so far! I’m really looking forward to trying this in real world. One question: Is it possible to choose an internet radio station (which is already added to roon of course) as an audio stream?

EDIT: Oh, you are using it that way already, don’t you?

I use the Alarm Clock in combination with an Internet Radio stream.

So, forget my stupid question :slight_smile:

Best


(Mr Fix It ) #34

My gut tells me that perhaps a more adhoc sleep operation is something that would be used…as for waking up that’s perhaps a more regimented preference most would have IMHO but I guess at least having options in the development to cater for more alarms than less is good.

Perhaps 8 is a good mix of one for each day of the week as a maximum plus one for adhoc sleep use when one chooses to.

I’ll be happy when we can have a play with it tho regardless. Any info anywhere on how to install an extension…I have yet to look


(Jan Koudijs) #35

Thanks @osss.

I indeed use it with an internet radio stream. Though at this moment you have to select the radio stream manually for the used zone. So if the alarm expires and there is nothing to play you will be :sleeping: in silence.

My plan is to support preselection of internet radio, playlist, etc. but I still have to figure out what is possible with the Roon API in this respect. Also I want to provide a first test version to the community before implementing this new functionality. I think that in its current state the Alarm Clock can be of use to more people than just me. This will also provide me some valuable feedback.


Alarm Clock's most requested feature [Included in v0.7.0]
(Jan Koudijs) #36

This can be done via the ‘Once’ option. You set the time for that night and after the expiration of the alarm it will be auto disabled. At the next usage you re-enable the alarm and if necessary adjust the time.

Some tinkering is required here. Have a look at this guide, step 3 till 5 can be skipped if you pick one of the ‘roon-extension-’ examples provided here. Select an example and download a zip file via the green ‘Clone or download’ button. More discussion about this can be found in this thread.

If you can run one of the examples, you can run the Alarm Clock when it becomes available.


(Mr Fix It ) #37

I think my head will explode…seriously I doubt that unless the Core allows for inclusion of this as part of the update process that doing the steps in that guide will glaze over the face anyone who is remotely non geek…and Im a pretty good geek most of the time.


(Jan Koudijs) #38

It won’t be for everyone as long as the API is in beta and there is no Roon provided distribution channel / installation method.

Just for completeness, you have to look only at the ‘Getting started’ part of the guide. Make sure you execute the ‘npm install’ command of step 5.


(Mr Fix It ) #39

I clearly need more reading time to get my head around the whole API thing and how it might work in production too as well as beta


(Jan Koudijs) #40

The first test version of the extension is now available on GitHub:

https://github.com/TheAppgineer/roon-extension-alarm-clock

The GitHub page has instructions on how to install the extension.

Important notes!!

  • Use this extension at your own risk!
  • Make regular backups of your Roon database.
  • This extension is in beta status, as is the API it depends on. This means that there can be small or even bigger issues!
  • Using this extension requires some tinkering (as the forum category suggests), I tried to make the installation instructions as clear as possible. If things are unclear, let me know.
  • GitHub will probably remain the distribution channel till the Roon team unfolds its plans for extension distribution and installation.
  • Start off by performing a basic test. Set up a non-critical alarm to start or stop playback and see if it works for you.
  • If you use it for wake up, use your phone or another alarm clock as a backup. Get confidence in the correct operation of the extension.
  • Keep an eye on the availability of the extension in the Settings->Extensions screen of Roon. I noticed that I had to restart the extension after a Roon Core update!

I would like to hear from you
User feedback will be valuable to bring this extension and the Roon API to the next level. I’m available for support or feature requests!