How to stop playback and return home when TV standby via CEC?

Hello,
I own a Raspberry Pi2 with a TV Samsung UE40C6000.

How to stop playback (I use TvHeadEnd PVR with DVB-T and IPTV, and some Movies on an external HDD on the Pi2) and return to home menu when TV is switch off ?

That would make it possible to save band-width.

Thank you in advance.

Solution can be found in this post: