Roon Extension: Alarm Clock v0.9.0

One more question @Hectorson.
Is the Volume setting in the extension available in combination with ‘Use Device’?
If not then I can hide the Fade Time setting under the same conditions.

Sounds like an issue for Roon then… the behaviour is different between the two settings.
Just as a side note the volume scales are different, with DSP volume it’s a decibel scale and with the Meridian device 0 - 100.
I wouldn’t change anything and hope that @support can help!

Think I got to the bottom of it! There is a setting that forces maximum volume on playback starting. This setting only applies if you are using device volume control.

Problem solved, thanks for your time

1 Like

Good to hear that you nailed it.
Can you provide a screenshot of this setting, so that it can be of help for others?

I created a video on how to setup a wake alarm.
You can watch it on YouTube:

https://youtu.be/LYBaF6PyZi0

If this is considered useful then I can create more videos like this.
Just let me know.

I made a small guide here as well, how to automaticly start and run node automaticly in Windows.

I hope soon Roon can make the extentions available in the Roon core one way or another. So a need of a second PC is not needed (in my case).

1 Like

When finishing a listening session I don’t like to quit a song halfway, so what I typically do is that I clear the queue and let the currently playing song finish.

One of the use cases for the Alarm Clock is to stop playback when something else has to be done. If I setup an alarm for this I run into the issue of the terminated song which I, as said, don’t like.

So when combining the above, what I was looking for is a way to set a stop alarm that adjusts its time to a song boundary. I now found a way to do this…

One of the current features of Alarm Clock is a fade-out. Playback ends by reducing the volume over a configured timeframe. This is a way to transition from Play to Stop, stopping at a song boundary is another way to make this transition.

So this is what I’m changing: The transition type becomes a separate setting (besides the transition time) that can be set to:

  • Instant
  • Fading
  • Track Boundary

When Track Boundary is selected the transition time gives the maximum added playback time in minutes. When the alarm expires and the remaining time of the song is less than this transition time then the song will be finished, otherwise the stop will be instant. For popular music a transition time of 5 minutes will work for most cases, for other genres longer times are probably required.

The below screenshot shows a setup for a 30 minutes listening session/sleep timer with a track transition time of 5 minutes.

When used with a sleep timer the nice thing is that a song is played till the end and the other day a wake alarm can continue with the next song of the album.

Note: The stop at Track Boundary is not sample accurate. It can happen that a very short part of the next song is played (less than a second), but this is too short to end up in the History.

1 Like

Ok Its late… but I have done steps 1 and 2…Node is installed as V7.10.0 - I’m doing all this is Win10Pro

Where do I create step 3? In RoonServer or Node or ???

how do I do step 4?

5 I think is just a txt file with a rename to app.js?

6 how do I run that

OK I managed to Download the file from git hub and read the README.md

I installed GIT too

but I get this now when i run the ‘npm install’ and ‘nam .’ doesn’t work … HELP Please @Jan_Koudijs

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\Users\ladmin>cd roon-extension-alarm-clock-master

C:\Users\ladmin\roon-extension-alarm-clock-master>dir
 Volume in drive C has no label.
 Volume Serial Number is A8A1-4BBD

 Directory of C:\Users\ladmin\roon-extension-alarm-clock-master

05/04/2017  12:03 AM    <DIR>          .
05/04/2017  12:03 AM    <DIR>          ..
05/03/2017  11:59 PM                25 .gitignore
05/03/2017  11:59 PM            27,406 alarm-clock.js
05/03/2017  11:59 PM            11,357 LICENSE
05/03/2017  11:59 PM               572 package.json
05/03/2017  11:59 PM             1,831 README.md
           5 File(s)         41,191 bytes
           2 Dir(s)  33,767,026,688 bytes free

C:\Users\ladmin\roon-extension-alarm-clock-master>npm install
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:205:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:194:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:899:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:342:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:191:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:511:12)
npm WARN addRemoteGit  roonlabs/node-roon-api-settings resetting remote C:\Users\ladmin\AppData\Roaming\npm-cache\_git-remotes\git-github-com-roonlabs-node-roon-api-settings-git-19f6b67e because of error: { Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:205:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:194:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:899:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:342:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:191:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:511:12)
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git -c core.longpaths=true config --get remote.origin.url' }
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:205:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:194:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:899:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:342:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:191:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:511:12)
npm WARN addRemoteGit  roonlabs/node-roon-api-status resetting remote C:\Users\ladmin\AppData\Roaming\npm-cache\_git-remotes\git-github-com-roonlabs-node-roon-api-status-git-6e99c067 because of error: { Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:205:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:194:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:899:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:342:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:191:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:511:12)
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git -c core.longpaths=true config --get remote.origin.url' }
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:205:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:194:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:899:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:342:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:191:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:511:12)
npm WARN addRemoteGit  roonlabs/node-roon-api-transport resetting remote C:\Users\ladmin\AppData\Roaming\npm-cache\_git-remotes\git-github-com-roonlabs-node-roon-api-transport-git-b8d4411d because of error: { Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:205:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:194:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:899:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:342:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:191:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:511:12)
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git -c core.longpaths=true config --get remote.origin.url' }
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:205:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:194:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:899:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:342:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:191:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:511:12)
npm WARN addRemoteGit  roonlabs/node-roon-api resetting remote C:\Users\ladmin\AppData\Roaming\npm-cache\_git-remotes\git-github-com-roonlabs-node-roon-api-git-a25990b1 because of error: { Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:205:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:194:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:899:16)
npm WARN addRemoteGit     at Socket.<anonymous> (internal/child_process.js:342:11)
npm WARN addRemoteGit     at emitOne (events.js:96:13)
npm WARN addRemoteGit     at Socket.emit (events.js:191:7)
npm WARN addRemoteGit     at Pipe._handle.close [as _onclose] (net.js:511:12)
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git -c core.longpaths=true config --get remote.origin.url' }
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
roon-extension-alarm-clock@0.4.0 C:\Users\ladmin\roon-extension-alarm-clock-master
+-- node-roon-api@0.0.1  (git://github.com/roonlabs/node-roon-api.git#a153bb466c7b483a62593fcf058b29e337425f02)
| +-- ip@1.1.5
| +-- node-uuid@1.4.8
| `-- ws@1.1.4
|   +-- options@0.0.6
|   `-- ultron@1.0.2
+-- node-roon-api-settings@1.0.0  (git://github.com/roonlabs/node-roon-api-settings.git#67cd8ca156c5bcd01ea63833ceaaec6d6a79654d)
+-- node-roon-api-status@1.0.0  (git://github.com/roonlabs/node-roon-api-status.git#504c918d6da267e03fbb4337befa71ca3d3c7526)
`-- node-roon-api-transport@1.0.0  (git://github.com/roonlabs/node-roon-api-transport.git#189beb51fdf196fcf0ded36d19153d10b0fc8c2c)

npm WARN roon-extension-alarm-clock@0.4.0 No repository field.

C:\Users\ladmin\roon-extension-alarm-clock-master>npm .

Usage: npm <command>

where <command> is one of:
access, adduser, bin, bugs, c, cache, completion, config,
ddp, dedupe, deprecate, dist-tag, docs, doctor, edit,
explore, get, help, help-search, i, init, install,
install-test, it, link, list, ln, login, logout, ls,
outdated, owner, pack, ping, prefix, prune, publish, rb,
rebuild, repo, restart, root, run, run-script, s, se,
search, set, shrinkwrap, star, stars, start, stop, t, team,
test, tst, un, uninstall, unpublish, unstar, up, update, v,
version, view, whoami

npm <cmd> -h     quick help on <cmd>
npm -l           display full usage info
npm help <term>  search for help on <term>
npm help npm     involved overview

Specify configs in the ini-formatted file:
C:\Users\ladmin\.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

npm@4.2.0 C:\Program Files\nodejs\node_modules\npm

C:\Users\ladmin\roon-extension-alarm-clock-master>

Please try to run the ‘npm install’ command from a Git CMD window. As suggested by @R1200CL in this post:

not much better

The ‘No repository field’ warning is “normal”. Is there a node_modules directory created?

If so, you should try the ‘node .’ command.

C:\Windows\System32\cmd.exe /k “C:\Program Files\nodejs\nodevars.bat” & “CD C:\Users\ladmin\roon-extension-alarm-clock & node .”

Is what I have in the shortcut in the startup folder but I get this error when I try to run the shortcut

but if I do a git version it opens a window and I get the pings

“C:\Program Files\Git\git-cmd.exe” --cd-to-home “cd C:\Users\ladmin\roon-extension-alarm-clock & node .”

and when I run the command from the folder it runs and then I see this so I’m close I think - but should that window with the pings run all the time?

@Jan_Koudijs OK so I have manually started a node. command window and its scrolling away… I have a set wake alarm but how does one choose a play queue to open?

for now I have just started a play on that endpoint and paused it in the hope that the api will just start it up tomorrow morning…fingers x it will

I might try a sleep one shortly too

embarrassed to say I was typing npm . so now node . is working…but I’m still not able to get an auto startup shortcut to work as per above

Would this help you in any way ?

Thats what I used… but its not working… at least not when I try to run it from the startup folder - the GIT one works so maybe Ill just use that

should I expect the window to be open and constant scrolling of the pings?

Yes.

Are you sure you actalluy have the correct path. Maybe you have one more folder ?
Can you please browse in your file manager to verify.

If yes, you may start looking if you actually have used the correct startup menu. Add another program to test.

I tried to make my guide “bullet proof” so if there is anything that can be misunderstood in my explanation, please let me know.

Well the same extension works for git but not for the node shortcut. I’m following the same start menu select the cmd and then open location I think it was…I’m in bed now as it’s 2:40 am and trying to see if the fade will work on this API and then in the morning wake me up…then I have to try to make it WAF friendly…that could be a challenge despite my wife being pretty techie when she wants to be.

Yes, this is how it works at the moment. In case you forget to preselect something, a track from your play history will be picked. There is some more information about this in the Limitations section in the first post.

Sleep well, I hope your wake alarm isn’t too early :wink:

1 Like