[HOW TO] Dash Button Doorbell - Play a Spotify Playlist

OK, so i’ve answered my own question… leaving this here for anyone else :

This triggers when dasher sets an input_boolean.doorbell to on… it then puts the volume up to 100% on our source (the frontroom echo dot in this case) plays the doorbell track on spotify and then lowers the volume again 30 seconds later.

  - alias: 'Doorbell'
    trigger:
      platform: state
      entity_id: input_boolean.doorbell
      from: 'off'
      to: 'on' 
    action:
      - service: media_player.select_source 
        data:
          entity_id: media_player.spotify
          source: Frontroom
      - service: media_player.volume_set
        data:
          entity_id: media_player.spotify
          volume_level: 1
      - service: media_player.play_media
        data:
          entity_id: media_player.spotify
          media_content_type: playlist
          media_content_id: spotify:user:laurahan88:playlist:0OlVU3YR5MgFNEUVMlDNpF
      - service: input_boolean.turn_off
        entity_id: input_boolean.doorbell
      - delay: '00:00:30'
      - service: media_player.volume_set
        data:
          entity_id: media_player.spotify
          volume_level: 0.2

Nice, thanks!

So basicly i can just order a branded dash button on ebay and reprogram it to work with hass?

Basically yeah…

you set it up on the Amazon app but don’t select an item to order…

then you run Dasher which will see the button when you press it and send a command to HA… In my case it’s telling an input_boolean to turn on. My Automation above sees the input_boolean change from off to on, turns up the volume on the desired Echo, plays the tune, turns down the volume again and then flips the boolean back to off ready to go again.

1 Like

Very cool!

So if i buy an already branded dashbutton, can i still do the not selecting any order part?

Yep, as far as i know, they are all branded… mine is for Finish dish washer tablets :slight_smile:

Hehe!

One last question. Can i cleanly remove the branding sticker from the front?

Probably… though i just stuck a postage label over it and trimmed it.

1 Like

Thank you!
This summer I did the same project as you, but with a doorbell switch with 15meter wire to my rasperry.
Although i have a cheap ebay ip camera pointed at my frontdoor so when HASS plays the doorbell.mp3 its also sends a snapshot picture to my telegram! For a short time HASS actually called me up on skype and i talked to the person pressed my doorbell. :stuck_out_tongue:

Just ordered two dashbutton, thanks again!

Nice!

I don’t have a camera in the porch yet but it is on the list of things to do… that would be a definite improvement…

Beware… there is a very small delay between pressing the button and it going off… if you set a static IP then it speeds things up though… my delay is around 3 seconds.

I bet its disconnecting / reconnecting to wifi every time to conserve battery. Thanks for the heads up!

It does exactly that… you press the button and then it connects. I think you’re limited to about 1000 button presses but once that’s up, you can crack it open and replace the AAA battery and it should reset it.

If you planning on buying a cheap ip camera
Ebay link

Mine is 2 years old… mounted outside, under a “rain cover”. Worked thru two European winter. I had about 5-10 freeze ups in two years. Also its 720p/~15-20fps

Edit: I forgot to mention, you need to buy a power adapter for it. A 1amper adapter should work. Im using it with a POE adapter so one wire only.

Nice, i’ll look in to that… cheers

1 Like

How were you able to play music through the echo dot?? So far I’ve gotten the emulated hue component working with being able to trigger entities in HASS with my dot but I haven’t found any ways of controlling the volume of my dot or playing music from HASS.

the above section shows how i select the Spotify connect source (which in this case is an Echo) and then tell it to raise the volume, play the playlist (of 1 track), then lower the volume

I mean how do you get the echo to show up as a media player

1 Like

You don’t…

Spotify is the media player. and if you’ve used Spotify through your Echo device then it will be available as a source.

1 Like

Thanks for the reply!