My favorite wakeup piston


#1

Over a time of 30 minutes a hue lamp rises from 0% to 100%
The 10 last minutes it turns on a radio station on my sonos speaker and adjust it up to 20% in 10 minutes.

Feel free to adjust to you waking up needs :alarm_clock::clock230:


#2

A lot of good inspiration here. Thanks for sharing.


#3

Inspiration indeed but, does this piston actually work? :slight_smile:
I have some questions:

  1. The lines 43; 45; 49. Why you set the same level 3 x times?
  2. Can you please tell us how did you get the RadioNews addresses.
  3. Related to question 2, I need to know the address with my favorite playlist instead a radio list. Do you know how can I obtain that?
  4. Do you know how to group for example, 2 from 3 speakers, before you set to them a list to play?

Thank you.


#4

First: Oh yeah it works every day i am present :smiley:

1 was a desperate need to get it to start up at 1% at start, it keeps flashing to full before it goes down to 1%. Does not realy matter if you have more than 1 if you see the logic :slight_smile: Could have clened it before i posted it i admit.
2 rewrite this piston for your needs, 4 i had problems getting playlists to do what i want them to stable, so i ended up using radio. Seemes there some changes in uri for sonos as things/time changes. I did not play more than a couple of hrs so feel free if you find a way to get it stable. Change what you are playing in beteween tests to be sure.
3 Dont think you can group in ST yet, but you could chose multiple thoug. (correct me if the support for grouping sonso is in place)


#5

Thank you @Einars I succeed to find my playlist uri with your piston!


#6

Hi Einars.

I harvested the currentTrack of “The Jazz Groove” radio station. It looks like this:

trackNumber":“1”,“status”:“playing”,“level”:"",“uri”:“x-sonosapi-stream:s138946?sid=254&flags=8224&sn=0”,“trackUri”:“aac://http://aac-64.streamthejazzgroove.com/stream”,“transportUri”:"",“enqueuedUri”:“x-sonosapi-stream:s138946?sid=254&flags=8224&sn=0”,“metaData”:“The Jazz Groove<\u002fdc:title>object.item.audioItem.audioBroadcast<\u002fupnp:class>SA_RINCON65031_<\u002fdesc><\u002fitem><\u002fDIDL-Lite>”,“trackMetaData”:“x-sonosapi-stream:s138946?sid=254&flags=8224&sn=0<\u002fres><\u002fr:streamContent><\u002fr:radioShowMd>/getaa?s=1&u=x-sonosapi-stream%3as138946%3fsid%3d254%26flags%3d8224%26sn%3d0<\u002fupnp:albumArtURI>x-sonosapi-stream:s138946?sid=254&flags=8224&sn=0<\u002fdc:title>object.item<\u002fupnp:class><\u002fitem><\u002fDIDL-Lite>”}

I thought the uri is:

x-sonosapi-stream:s138946?sid=254

But it’s not. Do you know how could I find out the correct uri, for this online radio station?

Thank you.


Spotify not playing (Sonos)
#7

Groovy question :musical_score::musical_keyboard::musical_note:
Look for TrackURI


#8

This looks pretty interesting and I’ll have a play, thanks. Also thanks for the helpful hint on finding Sonos URL’s, that just solved another problem I had :smiley:

Would love to work out how to make the alarm time an input from something like Alexa but that’s getting a bit complex. Currently I use Alexa for my morning wake up but I can’t string things together like starting Sonos so this will certainly help.

BTW, how do you find the Hue colour codes?


#9

once you set a colour you can find it in ide on the lamp.


#10

Brilliant, thanks


#11

Had this work this morning and need to play with it a bit more.

Did you ever find a way to over ride the Hue lights starting bright then going back down to 1%? I had tried this previously but could not find a way to set Hue lights to start at a low setting :frowning:

Also, my Sonos started to play but for only a few seconds, then stopped. Ever had that happen?


#12

Nope, never solved the flash high level on hue, but i dont notice it anymore. Regarding the sonos, not happened here. Adjusted the levels and timing on sosno multiple times after this. You can look at mine as it is now.
code:

e4rrw

It does include som debug and norwegian, but for functions this one works fine.


#13

IFTTT is your friend. Create a service that takes in spoken text from Alexa and then “Make a Web Request” passing the time as a variable. In your piston read the parameter and use to set your alarm.


#14

Hello and thank you for writing this Piston; the lighting I have working perfect however I still have not sorted out the music to come on. I monitor in the log and there are no errors but I am not sure if the music comes on?Lighting comes on faint and increases slowly.
Log Shows Sonos Waiting…