Command / Script to start media playback

Is it posible to start playback a media via some sort of script or command line tools

I will like to send a command to play my normal playlist to det media player i my office, when i enter my home :smile: example