Roon Extension: Alarm Clock v0.7.4

(Jan Koudijs) #61

I have to admin that I still had a backup over the last week :blush:, apart from the failure on Monday where I wrote about, I did not need it. One issue I have with internet radio is that it sometimes plays at half speed, but this can also happen when playback is started manually.[quote=“RBM, post:59, topic:21556”]
More seriously: I like your pioneering spirit quite a bit, Jan.


(Jules Herfst) #62

Need some help.

i installed the extension on my NUC6i5 where my core is running.
I use putty from a Windows10 pc to start the extension.
After starting with the command “node .” i can see the extension in roon remotes.
Everything looks ok.
When i kill the putty connection the extension is disabled/invisable.
Makes sensebut how do i start the extension and close the Putty wh terminating the extension?

Sorry i’m not expert but with some hints i can manage.


(Jan Koudijs) #63

This probably requires a bit of explanation. The ‘Once’ option sets the alarm to the first occurrence of the set time. If the time hasn’t passed for today, you will be alarmed today, otherwise you will be alarmed tomorrow.

That’s correct, the idea is that you are awake at the set time. The details of fading can be found in post 27.

(Jan Koudijs) #64

I ran into the same issue. I connect from my PC to my NUC via ssh, both systems are running Linux. To prevent termination at logout I had to run the extension via nohup (no hangup).

nohup node . &

What OS is running on your NUC? I don’t know if there is a Windows replacement.

(Jules Herfst) #65

Unfortunately this didn’t work. See pic for OS info.

(Rene Bouwmeester) #66

I made a little service definition so node/alarm-clock.js is auto-loaded as a service – this appears to work:


ExecStart=/usr/bin/node /home/rene/roon-extension-alarm-clock-master/alarm-clock.js > /dev/null 2>&1


(Jan Koudijs) #67

You don’t see the output this way. Did the extension not appear? It all looks OK.

(Jan Koudijs) #68

I definitely will give this a try.

(Jules Herfst) #69

Yes, it appears but after terminating the ssh connection it is gone.


Firstly, thanks @Jan_Koudijs for all your hard work on this.

Ok, so I have tested the basic functionality on a windows 10 x64 PC this evening and can confirm the alarm started correctly on time. Roon had previously been in “Radio” mode, so this is what started playing when the alarm was initiated.

The Roon core is running on a STi5.

Like others, the cmd window needed to be open and running ‘node .’ all the time for the alarm extension to be seen in Roon. Obviously, it wouldn’t be practical to operate in this manner all the time, but is fine for testing purposes. (I’m not that proficient with Linux, so prefer not to mess with the STi5 at the moment)

Is there any impact on Roon performance (or other devices/network) from continually having the ping commands running? Is this a typical design approach for these type of extensions?

thanks again, and keep up the good work

(Jan Koudijs) #71

Strange, I googled a bit but nohup should also work on Ubuntu. No clue what’s the issue here :frowning:

(Steve) #72

Great see this pioneering work!

Looking from the sidelines, it’s clear to me that there needs to be quite a bit of thought/work put into making the process of finding/adding/installing extensions simplified for the average user.

The potential of these extensions is huge (not an exact analogy but I’m thinking what the iPhone became with the App Store apps).

It would be a real shame if medium-long term the community API extensions weren’t opened up to all users with minimal technical knowledge. An alarm clock is a great idea - everyone should be able to have it!

(Jan Koudijs) #73

My NUC6i5 running Arch Linux is not able to tell the difference. If the Roon Core is idle the load is 0.00 %, after starting the extension this number remains unchanged.

The pinging is standard Roon API behavior, all extensions will have this.

@danny can you tell something about the performance impact of running an extension that subscribed to the zones?

(Jan Koudijs) #74

If playback stops immediately at the set time then not all conditions for fading are met, most probably related to reading the current volume level. Can you repeat this tests and capture the console output in a file and send me this? What I’m looking for is the volume information, it should be something like this:



I think I know what’s going on here. I switched a zone to DSP volume and that gives me a dB volume scale. The fade implementations makes assumption, the biggest of which is that a volume of 0 means silence. For a dB scale it is of course completely the opposite. If I set my play volume to 0 dB I get exactly what you describe: current volume is 0 (dB), target volume is 0 (numeric) so fading concludes that there is nothing to fade, resulting in the ‘hard’ stop.

A fix for this is at the top of my list. I will put it as a known issue in the first post. And when a fix is there I will inform you (and everybody else :wink: ).


My radio started as it should this morning. :musical_score::1st_place_medal::alarm_clock:

May I suggest a different user interface at a later stage in development.

I’m using an iDevice. How about a huge clock that you adjust the by dragging the time arrows in order to set the time. ?

(Sorry for my bad English. I don’t know the correct tem, but I hope you understand what I mean)

Should be much simple to use, and beneath the clock you can have digits, that also displays the setting you done.
Here in Norway we have a app “Easypark” that have a similar function implemented. Very easy the rotate the time on a wheel or a clock.
(Better UI than Apples built in wake up clock)

Maybe an automatic stop could be implemented. That you can set how long music/radio should be played after the given wake up time. I noticed you talked about 4 fade settings as shown quote above, but I can only see one fade settings in the user interface. So maybe already implemented, but is there is a bug ?

I also think Roon development have to think about a more easy way to implement nodejs into RoonCore, and find a way to browse all available extensions. Equally to how LMS and Squeezebox have done.

As an example, if your core is on a SonicTransporter or a NAS (Qnap), you have to use a PC, Mac, or Linux mashine. And for ROCK as well maybe ?

Is installation of nodejs the only way you can make Roon Extention work ?

It’s probably to early to talk about this, here is the only information I found about Roon Extention:

The Roon API will allow developers to enable:

Custom volume controls even if the device is not Roon Ready
Custom convenience switching/standby can be used even for devices is not Roon Ready
Display of now-playing data and transport controls
Lightweight hierarchical browsing
Plugin settings from Roon UI
Roon’s API is still in a pretty early state, but 1.3 contains support for these features and is suitable for experimentation.

We have several exciting integrations planned over the next few months using the API as a jumping off point, and look forward to expanding and improving the Roon API with your feedback. Please try it out and let us know!


Maybe @danny can tell us a little bit more about the future plans for Roon API ?

Will this Alarm Clock Extention be possible to easier access within Roon ?
Could it be a separate app ?


I suppose this is for Linux?

And in Windows ? You have to run GIT.cmd at startup is suppose. That’s the easy part. How to automatically get that “node .” into the command prompt + enter ?

Or maybe not something to use energy on at this early stage ?



Not sure if this is a bug or feature :grinning:

Here is my setting this morning:

Now, what seems to happen that after every 11 minutes music stops.
Meaning after the wake up have served its purpose, and I just like to play music or radio, this only can be done in 11 minutes intervals in my case.

I suppose that is not your intention?

I just disable the timer. Hopefully that temporary will solve the issue.
EDIT: it did not.

In Roon it looks like my Squeezebox Radio is playing, but it’s not.

Setting fade time to zero didn’t help :cry:

May I suggest that if or when you release an update, please explain how to do such an update or reinstall correctly windows.

(Jan Koudijs) #78

Thanks for the report @R1200CL.

What I see is that there is a bug in the Repeat function. You have disabled repeat in your alarm, but the alarm will not be auto disabled if a specific day of the week is selected (as you did). So the alarm will be repeated the next Sunday.

This doesn’t explain the behavior that you see, I tried to reproduce it but no luck so far. Is this the only alarm that you have enabled? What date is shown for the next alarm on the status screen after playback started?

Is everything back to normal if you stop the extension completely?


I have an alarm for tomorrow.
Actually is seems it’s only alarm number two shows in attached pic below. Yesterday alarm no one did not show up. Should it ?

How is this meant to be ? Should all your alarms show up ?

I’m a bit afraid to play with this on my main system, but I have another Squeezebox Radio here, I can test more with later tonight. Will be out for some hours now.

You mean remove ?
Have not done.

If you mean disable or stop, no radio/music still stops after 11 min. And that happens even if I set time to Zero.

I shall test this more later today with shorter time, and a better track of what I’m doing and report back.

(Jan Koudijs) #80

It only shows the alarm that will expire first. Only reason for this is that it was the quickest to implement :slight_smile:

I’m not able to perform tests on a Squeezebox and I don’t know how it differs from a Roon RAAT device. As your problem may be Squeezebox specific it can be helpful to also test on other devices.

I mean stopping the node execution in the Git CMD window.