How cast on TV with package
pychromecast, if this script can’t find any chromecast? I installed it by guide here and when i run this script I get an empty list.
Python 3.8.5 (default, Jul 28 2020, 12:59:40) (GCC 9.3.0) on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pychromecast >>> chromecasts, browser = pychromecast.get_chromecasts() >>> chromecasts ()
I tried to type
catt scan to terminal and it returned:
venv username username-Notebook-Type ~ Path To Project $ catt scan Scanning Chromecasts... Error: No devices found.
Then I set a static IP (192.168.1.8) to TV , also in router and run this script which returned me this error:
>>> import pychromecast >>> cast = pychromecast.Chromecast('192.168.1.8') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/patrik/Documents/Git/Home/Voice-Assistant/venv/lib/python3.8/site-packages/pychromecast/__init__.py", line 328, in __init__ raise ChromecastConnectionError( # noqa pychromecast.error.ChromecastConnectionError: Could not connect to 192.168.1.8:8009
I am able to cast via my mobile(youtube app) or Google Chrome(on laptop) to my TV.
I’m working in
venv, but I also tried out of it.
I have laptop (Ubuntu) connected via ethernet cable to the same network as TV is (tried also through wi-fi). Python 3.8.5 with Pychromecast 7.7.1 installed via pip3. My tv is Samsung Smart TV.