Start chromecast from command line
Opened this issue · 7 comments
https://github.com/diequeiroz/start-chromecast-CLI
I wrote a tiny script to start the casts programmatically from command line. It's great to create a cron tab and keep your app running without the need to open the browser and start the cast;
So with this, I can run greencast headless on a remote machine and start it via ssh?
Hi
I am using raspberry pi 2... i tried "sudo pip install startcast" but encountered errors during compilation...
pi@raspberrypi ~/greenscreen $ sudo pip install startcast
Downloading/unpacking startcast
Downloading startcast-0.1.1.tar.gz
Running setup.py (path:/tmp/pip-build-3eH45_/startcast/setup.py) egg_info for package startcast
Downloading/unpacking pychromecast (from startcast)
Downloading PyChromecast-0.6.13-py2.py3-none-any.whl
Downloading/unpacking protobuf>=3.0.0b1.post2 (from pychromecast->startcast)
Downloading protobuf-3.0.0b2-py2.py3-none-any.whl (326kB): 326kB downloaded
Downloading/unpacking zeroconf>=0.16.0 (from pychromecast->startcast)
Downloading zeroconf-0.17.4-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): requests>=2.0 in /usr/lib/python2.7/dist-packages (from pychromecast->startcast)
Downloading/unpacking six>=1.9 (from protobuf>=3.0.0b1.post2->pychromecast->startcast)
Downloading six-1.10.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/dist-packages (from protobuf>=3.0.0b1.post2->pychromecast->startcast)
Downloading/unpacking netifaces (from zeroconf>=0.16.0->pychromecast->startcast)
Downloading netifaces-0.10.4.tar.gz
Running setup.py (path:/tmp/pip-build-3eH45_/netifaces/setup.py) egg_info for package netifaces
Downloading/unpacking enum-compat (from zeroconf>=0.16.0->pychromecast->startcast)
Downloading enum-compat-0.0.2.tar.gz
Running setup.py (path:/tmp/pip-build-3eH45_/enum-compat/setup.py) egg_info for package enum-compat
Downloading/unpacking enum34 (from enum-compat->zeroconf>=0.16.0->pychromecast->startcast)
Downloading enum34-1.1.2.tar.gz (46kB): 46kB downloaded
Running setup.py (path:/tmp/pip-build-3eH45_/enum34/setup.py) egg_info for package enum34
Installing collected packages: startcast, pychromecast, protobuf, zeroconf, six, netifaces, enum-compat, enum34
Running setup.py install for startcast
Installing startcast script to /usr/local/bin
Found existing installation: six 1.8.0
Not uninstalling six at /usr/lib/python2.7/dist-packages, owned by OS
Running setup.py install for netifaces
checking for getifaddrs...found.
checking for getnameinfo...found.
checking for optional header files...netash/ash.h netatalk/at.h netax25/ax25.h neteconet/ec.h netipx/ipx.h netpacket/packet.h linux/irda.h linux/atm.h linux/llc.h linux/tipc.h linux/dn.h.
checking whether struct sockaddr has a length field...no.
checking which sockaddr_xxx structs are defined...at ax25 in in6 ipx un ash ec ll atmpvc atmsvc dn irda llc.
checking for routing socket support...no.
checking for sysctl(CTL_NET...) support...no.
checking for netlink support...yes.
will use netlink to read routing table
building 'netifaces' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNETIFACES_VERSION=0.10.4 -DHAVE_GETIFADDRS=1 -DHAVE_GETNAMEINFO=1 -DHAVE_NETASH_ASH_H=1 -DHAVE_NETATALK_AT_H=1 -DHAVE_NETAX25_AX25_H=1 -DHAVE_NETECONET_EC_H=1 -DHAVE_NETIPX_IPX_H=1 -DHAVE_NETPACKET_PACKET_H=1 -DHAVE_LINUX_IRDA_H=1 -DHAVE_LINUX_ATM_H=1 -DHAVE_LINUX_LLC_H=1 -DHAVE_LINUX_TIPC_H=1 -DHAVE_LINUX_DN_H=1 -DHAVE_SOCKADDR_AT=1 -DHAVE_SOCKADDR_AX25=1 -DHAVE_SOCKADDR_IN=1 -DHAVE_SOCKADDR_IN6=1 -DHAVE_SOCKADDR_IPX=1 -DHAVE_SOCKADDR_UN=1 -DHAVE_SOCKADDR_ASH=1 -DHAVE_SOCKADDR_EC=1 -DHAVE_SOCKADDR_LL=1 -DHAVE_SOCKADDR_ATMPVC=1 -DHAVE_SOCKADDR_ATMSVC=1 -DHAVE_SOCKADDR_DN=1 -DHAVE_SOCKADDR_IRDA=1 -DHAVE_SOCKADDR_LLC=1 -DHAVE_PF_NETLINK=1 -I/usr/include/python2.7 -c netifaces.c -o build/temp.linux-armv7l-2.7/netifaces.o
netifaces.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-3eH45_/netifaces/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-aURzvV-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
checking for getifaddrs...found.
checking for getnameinfo...found.
checking for optional header files...netash/ash.h netatalk/at.h netax25/ax25.h neteconet/ec.h netipx/ipx.h netpacket/packet.h linux/irda.h linux/atm.h linux/llc.h linux/tipc.h linux/dn.h.
checking whether struct sockaddr has a length field...no.
checking which sockaddr_xxx structs are defined...at ax25 in in6 ipx un ash ec ll atmpvc atmsvc dn irda llc.
checking for routing socket support...no.
checking for sysctl(CTL_NET...) support...no.
checking for netlink support...yes.
will use netlink to read routing table
building 'netifaces' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DNETIFACES_VERSION=0.10.4 -DHAVE_GETIFADDRS=1 -DHAVE_GETNAMEINFO=1 -DHAVE_NETASH_ASH_H=1 -DHAVE_NETATALK_AT_H=1 -DHAVE_NETAX25_AX25_H=1 -DHAVE_NETECONET_EC_H=1 -DHAVE_NETIPX_IPX_H=1 -DHAVE_NETPACKET_PACKET_H=1 -DHAVE_LINUX_IRDA_H=1 -DHAVE_LINUX_ATM_H=1 -DHAVE_LINUX_LLC_H=1 -DHAVE_LINUX_TIPC_H=1 -DHAVE_LINUX_DN_H=1 -DHAVE_SOCKADDR_AT=1 -DHAVE_SOCKADDR_AX25=1 -DHAVE_SOCKADDR_IN=1 -DHAVE_SOCKADDR_IN6=1 -DHAVE_SOCKADDR_IPX=1 -DHAVE_SOCKADDR_UN=1 -DHAVE_SOCKADDR_ASH=1 -DHAVE_SOCKADDR_EC=1 -DHAVE_SOCKADDR_LL=1 -DHAVE_SOCKADDR_ATMPVC=1 -DHAVE_SOCKADDR_ATMSVC=1 -DHAVE_SOCKADDR_DN=1 -DHAVE_SOCKADDR_IRDA=1 -DHAVE_SOCKADDR_LLC=1 -DHAVE_PF_NETLINK=1 -I/usr/include/python2.7 -c netifaces.c -o build/temp.linux-armv7l-2.7/netifaces.o
netifaces.c:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-3eH45_/netifaces/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-aURzvV-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-3eH45_/netifaces
Storing debug log for failure in /root/.pip/pip.log
@diequeiroz I use chrome tab mirroring to cast. I'm unable to figure out how to do that using the CLI. Any pointers?
@diequeiroz These are some internal grafana dashboards.