Amazon Echo Pauses My TV

I can say “alexa, turn on TV pause” or “turn on TV play” to control my TV.  A Raspberry Pi receives the request from the Amazon Echo, then the Pi queries my receiver to find out if I am watching my TiVo or my smart TV’s built in apps like Hulu, YouTube or Netflix.  Then the Pi pauses either the TiVo or the smart TV.  I am fortunate that my LG TV, TiVo and Marantz receiver can all be network controlled, so I don’t have to rely on a stateless infrared blaster.

Using Alexa is very handy in case I abruptly have to walk out of the room, I can pause my TV while walking, so I am not slowed down but also do not have to miss my TV show.  If the phone rings, I can quickly pause the TV without waiting to answer my phone.  Another use case is when somebody turns on the blender or gets ice from the fridge.

Next I plan to implement an “alexa turn on rewind” to skip back 30 seconds both with the TiVo or smart TV.

Software Libraries

  • Custom code that talks to my TiVo (telnet) and Marantz stereo (http)

All the code and libraries are kept running forever on my Raspberry Pi using PM2.

PM2 is designed for node scripts, not Java, so to keep Amazon Echo Bridge running forever I use this PM2 process configuration.  (Thanks Zalym)

    "name": "Amazon Echo Jar",
    "args": [
    "script": "java",
    "node_args": [],
    "log_date_format": "YYYY-MM-DD HH:mm Z",
    "exec_interpreter": "none",
    "exec_mode": "fork"