dipskhatri Posted January 18, 2021 Share Posted January 18, 2021 I wonder if anyone can help me. I am trying to use the wakeup agent to play a playlist from Spotify everyday (Which works great), but after say 15mins i want it to stop and then play a radio station, i have done the following but i think its not right can anyone help? it does stop in 15mins but nothing after that happens... Regards, Quote Link to comment Share on other sites More sharing options...
South Africa C4 user Posted January 18, 2021 Share Posted January 18, 2021 Stop means don’t do anything after the stop command. It can be useful inside an if statement, but in your case, stop means that the last line of code won’t be executed. Simply deleting stop will probably make this work (although I’ve never played a radio station so cannot comment on that line of code). Using a 15 minute timer is (arguably) better programming than using a 15 minute delay. But once you delete the STOP, your code should work as is. Quote Link to comment Share on other sites More sharing options...
lippavisual Posted January 18, 2021 Share Posted January 18, 2021 STOP is the problem. And as said above, you should create a timer instead of using delay. Delay is more processor intensive, especially for 15 minutes. When wake is enabled, Start Timer "morning routine". When Timer "morning routine" expires, play radio station. msgreenf 1 Quote Link to comment Share on other sites More sharing options...
dipskhatri Posted January 18, 2021 Author Share Posted January 18, 2021 Thankyou both for your help i took off the delay and have added a timer, but it seems the timer does not work as i set it for 1 min (to test) but it does not trigger. If i use the 'execute' the radio plays but not taking into account the timer.... see below image. I can achieve what i want via scheduler programming and add in all the conditions and it works nicely no issue. But i don't want to use that options as every time i need to change the alarm time or day for my Kids rooms i have to go back in to composer HE and do this and also the Mrs is not able to do all that and amend the time in composer, so want it so she can just use the wakeup agent on the touchscreens. We want the sequence to be as following: the wake up agent will have its source that needs to play (Spotify) after some time 15 mins it needs to play a radio station i'm adding this all under 'Wake enabled in' and not using 'Wake in' does that make a difference? Thanks for your help Quote Link to comment Share on other sites More sharing options...
HRT Posted January 18, 2021 Share Posted January 18, 2021 Yes, you need to switch it to wake in. then have it restart timer "morning wakeup" then go to the timer, and program the select station when timer expires. Quote Link to comment Share on other sites More sharing options...
dipskhatri Posted January 18, 2021 Author Share Posted January 18, 2021 i have tried the following the timer agent does not even work and keeps playing the Spotify playlist see images i have attached so sorry for all the questions. Quote Link to comment Share on other sites More sharing options...
Control4Savant Posted January 18, 2021 Share Posted January 18, 2021 9 minutes ago, dipskhatri said: i have tried the following the timer agent does not even work and keeps playing the Spotify playlist see images i have attached so sorry for all the questions. Your radio station command needs to be inside the timer programming for when it expires. Right now it is only checking for if it is expired at that moment of execution. Quote Link to comment Share on other sites More sharing options...
dipskhatri Posted January 18, 2021 Author Share Posted January 18, 2021 i did the below and it worked Thank you so much. Control4Savant and South Africa C4 user 2 Quote Link to comment Share on other sites More sharing options...
Control4Savant Posted January 18, 2021 Share Posted January 18, 2021 Glad to help at the end. Everyone else did the hard work. Quote Link to comment Share on other sites More sharing options...
South Africa C4 user Posted January 18, 2021 Share Posted January 18, 2021 Well done! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.