Python Forum
How to change TV channel with Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to change TV channel with Python
#1
Hi, I am a beginner as you can probably already tell. I have been watching a lot of videos and reading many articles on how to use python and I have been putting a lot of those skills to use. I was wondering how I could connect my python to my TV. I want to change the channel and or volume. Is this possible? Thanks!
Reply
#2
I almost pursued a similar project at one point. It should be doable, but depends on a lot of things.

First off, if you have a smart TV, it might provide some API for doing things easily. You'd have to do some research on that. I'll assume that's not the case for the rest of what I have to say.

You could make a "smart" TV remote. All you need is an infrared LED (which is what is in a TV remote) which either works by USB or you could hook it up to an Arduino or Raspberry Pi. When I planned to do this, I had an infrared reader as well so that I could record what my TV remote was doing and play it back, since I thought it would be more fun to reverse engineer than to look up documentation. You could use Python, or whatever, to control this hardware to do whatever you want it to do.

For someone new to coding, I'd say this is a medium to hard project.
Reply
#3
Thank you I really appreciate it! Now follow up question. I do have a smart TV. How would I use an API to continue with python?
Reply
#4
You'd Google the API for that TV.
Reply
#5
or, you might put an infra-red emitter on your computer and program it to emulate a remote control. python should be great for this.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#6
Though I understand the literal definitions of what you said. Do you think you can put it in layman for a beginner programmer like myself? Thank you for the input.
Reply
#7
are you expecting me to show you the code? i didn't jump in here for the long haul.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#8
there's some info available on how you might interface to a remote control:
Although none of these address your project specifically, each shows how to do part of what you need:

ps://www.youtube.com/watch?v=tvRLz4RLoeo
https://hackaday.com/tag/tv-remote/
https://www.youtube.com/watch?v=Nd_Kc7BXa54
https://lifehacker.com/hack-a-tv-remote-...o-30794141
https://www.instructables.com/id/Hacking...e-Control/
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  how to check if someone send a message in a discord channel? Zerolysimin 1 765 Nov-06-2022, 11:10 AM
Last Post: Larz60+
  Output from Paramiko exec_command from channel pemca 0 2,571 Dec-03-2021, 12:29 PM
Last Post: pemca
  Not able to add multiple channel IDs to python bot flaykez 3 81,698 Oct-18-2021, 01:26 AM
Last Post: CyKlop
  Auto detect threshold for skin detection w/ HSV channel davlovsky 1 2,194 Oct-13-2019, 01:45 AM
Last Post: Larz60+
  pika channel.start_consuming() is not running sundar 0 2,404 Mar-20-2019, 06:28 AM
Last Post: sundar
  AttributeError: type object 'MyClass' has no attribute 'channel' chris0147 2 8,718 Sep-29-2017, 06:16 PM
Last Post: chris0147
  ORA-03113: end-of-file on communication channel Python Cx_Oracle akansha 3 7,527 Nov-17-2016, 08:50 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020