I am getting flicky results on status
I just install the utility and started to play around. I have a chromecast and I was watching a movie at that time. However it seems that I couldn't get the status consistently:
$ go-chromecast ls
1) device="Chromecast HD" device_name="Projector" address="192.168.1.42:8009" uuid="8c14515959c0386e617826190cf5ad68"
$ go-chromecast status -u 8c14515959c0386e617826190cf5ad68
error: unable to get cast application: unable to connect to chromecast at '192.168.1.4:8009': dial tcp 192.168.1.4:8009: i/o timeout
$ go-chromecast status -a 192.168.1.42
error: unable to get cast application: unable to connect to chromecast at '192.168.1.42:8009': context deadline exceeded
$ go-chromecast status -a 192.168.1.4
error: unable to get cast application: unable to connect to chromecast at '192.168.1.4:8009': dial tcp 192.168.1.4:8009: i/o timeout
$ go-chromecast status -a 192.168.1.42
Stremio (PLAYING), title="...", artist="", time remaining=1009s/2929s, volume=1.00, muted=false
$ go-chromecast status -u 8c14515959c0386e617826190cf5ad68
error: unable to get cast application: unable to connect to chromecast at '[fe80::7ca7:7eff:fe04:ea95]:8009': dial tcp [fe80::7ca7:7eff:fe04:ea95]:8009: connect: invalid argument
$ go-chromecast status -u 8c14515959c0386e617826190cf5ad68
Stremio (PLAYING), title="...", artist="", time remaining=1033s/2929s, volume=1.00, muted=false
An interesting messages is also this:
error: unable to get cast application: unable to connect to chromecast at '192.168.1.4:8009': dial tcp 192.168.1.4:8009: i/o timeout
Even though the IP of the chromecast is 192.168.1.42 the log reports it attempted the IP 192.168.1.4. Then it attempted an IPv6.
I would expect to always try connect over the IPv4 since it exists, and also pick the correct IP.
Do you mind trying both of those commands again but with the --disable-cache flag and seeing if that makes a difference? I am wondering if the cache is doing something weird here.
If that doesn't work, do you mind running the same commands again but this time with the --verbose and --debug flags and posting their output?
Getting this:
~$ go-chromecast status -u 7f6cf02cfb881590b9a4be12e067986e --debug --verbose
using device name=Family room TV 2 addr=10.0.0.25 port=8009 uuid=7f6cf02cfb881590b9a4be12e067986e
error: unable to get cast application: unable to connect to chromecast at '10.0.0.25:8009': dial tcp 10.0.0.25:8009: i/o timeout
~$ go-chromecast status -u 7f6cf02cfb881590b9a4be12e067986e --debug --verbose --disable-cache
error: unable to get cast application: unable to find cast dns entry: no cast devices found on network
EDIT:
Disabling IPv6 and rebooting laptop fixed it.