Forum
Auto music arriving home...... - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Community (/forum-5.html)
+--- Forum: Uncategorized (/forum-59.html)
+--- Thread: Auto music arriving home...... (/thread-1201.html)



Auto music arriving home...... - Skywatch - 7th Aug, 2013 10:58 PM

Hi.

I had a thought that it would be nice to have music playing as soon as I walk throught the door.

Thinking on this it would be simple to add a small transmitter to the door that sends a signal to the pi when it's opened. Then, the pi could run a python script to turn on the amp via a small relay board. This is all fairly simple.

But, how would you make a script to (for example) load an audio plugin (tunein radio) and select the station and volume you want to play?

I just think it would be cool to be welcomed home like this every day!

Or am I mad? Wink

Skywatch


RE: Auto music arriving home...... - rikardo1979 - 7th Aug, 2013 11:41 PM

you r just crazy an having a lot of spare time.
Imagine you came home than your music plays. than you start watching movie and than your missus came through same door so the movie stops and music plays again, than your kids and music plays again, than you go to empty a bin and music plays again,....
To me, crazy idea...
more simple solution would be to add NFC tagg programed to play stream direct to any XBMC at home when you you place your Phone on specific place where the tag would be Wink
much easier what you say Wink
Cool


RE: Auto music arriving home...... - IriDium - 8th Aug, 2013 12:17 AM

Maybe even easier to install the Xbmc remote app on your Android or !phone and as soon as you are within WiFi range of your house, you can start music, play TV or see what the Kids are watching in your absence (Hmm maybe not a good idea :-) )

However, as RK mentions, you do have too much time on your hands!! how about helping out with some testing :-)


RE: Auto music arriving home...... - rikardo1979 - 8th Aug, 2013 12:50 AM

(8th Aug, 2013 12:17 AM)IriDium Wrote:  Maybe even easier to install the Xbmc remote app on your Android or !phone and as soon as you are within WiFi range of your house, you can start music, play TV or see what the Kids are watching in your absence (Hmm maybe not a good idea :-) )

However, as RK mentions, you do have too much time on your hands!! how about helping out with some testing :-)
your idea would work too(thats what I thought first) but requires and human interaction with screen and most of the time you came home from work and you tired so you just want to relax and chill. As most the people empty the things like car keys, wallet and mobile phone, they also place those on same spot always - somewhere close to door or kitchen,dining table etc
So and here comes the NFC tagg Smile once phone is close (the usual place for it after work Smile ) all turns on as magic and by that time you throw all your clothes and you lying down to your bellowed sofa and start listening you favorite music Smile
Cool


RE: Auto music arriving home...... - Fred - 8th Aug, 2013 01:32 AM

This would be so awesome.


Re: Auto music arriving home...... - f1vefour - 8th Aug, 2013 01:33 AM

If you have an Android phone the best way to accomplish your task is with Tasker, your RPi would need to have remote ssh access.

List of needed things:
Android phone.
Tasker for Android (Llama may work).
ssh binary for Android (I could provide this if you need it)
Remote access to your Pi over ssh

You could use NFC tags but may still need Tasker.

I would create a location specific profile that runs a command over ssh when you get close to home, it's really quite easy with this method assuming you have an Android phone. (I will help if you need it)

Or an even easier way is remote access to XBMC, then you could simply send the proper json commands over http.


RE: Auto music arriving home...... - rikardo1979 - 8th Aug, 2013 01:39 AM

just program the NFC tag to start Yatse and play from music files, nothing else is needed, except the wifi on phone needs to be on Smile


Re: RE: Auto music arriving home...... - f1vefour - 8th Aug, 2013 01:55 AM

(8th Aug, 2013 01:39 AM)rikardo1979 Wrote:  just program the NFC tag to start Yatse and play from music files, nothing else is needed, except the wifi on phone needs to be on Smile

He wants to first launch a music plugin, Yatse has an API but you can't simply access it.

How can you make Yatse play music with an NFC tag? I have NFC tags and NFC Task Launcher.


RE: Auto music arriving home...... - rikardo1979 - 8th Aug, 2013 02:01 AM

(8th Aug, 2013 01:55 AM)f1vefour Wrote:  
(8th Aug, 2013 01:39 AM)rikardo1979 Wrote:  just program the NFC tag to start Yatse and play from music files, nothing else is needed, except the wifi on phone needs to be on Smile

He wants to first launch a music plugin, Yatse has an API but you can't simply access it.
you can access addons actually Wink


RE: Auto music arriving home...... - Skywatch - 8th Aug, 2013 05:07 PM

Wow!

Thanks for all the input, I didn't expect you all would be interested Wink

Having thought about it I have a simple workable solution.

Leave the pi playing radio station of choice. Have a relay turning the power to the amp off and set a door opening detector (or button remote) to turn on the amp again when entering. Easy and the pi's low power makes it a green soltion too.

I suppose you could also detect when the phone/tablet logs into the wi-fi (ie when in range) and use that to turn on the amp again.

Both options are simple, no messing with phone/tablet in the rain or juggling the shopping etc...

There will be a 'one shot' detector so that I can 'arm' the system to auto play on leaving the house so that only the first opening of the door will trigger a music event. Subsequent door openings will not trigger unless set to do so in the software.

Thanks for sharing all your thoughts and highlighting areas of concern.

Now once this is up and running I have another plan......

Skywatch


RE: Auto music arriving home...... - brantje - 8th Aug, 2013 07:53 PM

(8th Aug, 2013 05:07 PM)Skywatch Wrote:  Wow!

Thanks for all the input, I didn't expect you all would be interested Wink

Having thought about it I have a simple workable solution.

Leave the pi playing radio station of choice. Have a relay turning the power to the amp off and set a door opening detector (or button remote) to turn on the amp again when entering. Easy and the pi's low power makes it a green soltion too.

I suppose you could also detect when the phone/tablet logs into the wi-fi (ie when in range) and use that to turn on the amp again.

Both options are simple, no messing with phone/tablet in the rain or juggling the shopping etc...

There will be a 'one shot' detector so that I can 'arm' the system to auto play on leaving the house so that only the first opening of the door will trigger a music event. Subsequent door openings will not trigger unless set to do so in the software.

Thanks for sharing all your thoughts and highlighting areas of concern.

Now once this is up and running I have another plan......

Skywatch
What i have is an cron job, that executes every minute to check if i'm away.
If i'm away (aka mobile phone not found on network), then the security system is activated.