catt icon indicating copy to clipboard operation
catt copied to clipboard

scan devices

Open idonotknowwhatimdoing opened this issue 1 year ago • 7 comments
trafficstars

image

Hi, all! If I use "--json-output" with "scan", I receive only one dev info, but "scan" return two or more.

idonotknowwhatimdoing avatar May 09 '24 17:05 idonotknowwhatimdoing

Hmm, that's odd. Can you try again and paste the output here?

skorokithakis avatar May 10 '24 13:05 skorokithakis

PS C:\Users\cattvm> catt scan
Scanning Chromecasts...
192.168.10.40 - MiTV-MSSP1 - Xiaomi MiTV-MSSP1
192.168.10.59 - MiTV-MSSP1 - Xiaomi MiTV-MSSP1
PS C:\Users\cattvm> catt scan --json-output
{
    "MiTV-MSSP1": {
        "services": "{ServiceInfo(type='mdns', data='MiTV-MSSP1-c20c57ec53bd6d67916b246e3ceddbc4._googlecast._tcp.local.')}",
        "uuid": "c20c57ec-53bd-6d67-916b-246e3ceddbc4",
        "model_name": "MiTV-MSSP1",
        "friendly_name": "MiTV-MSSP1",
        "host": "192.168.10.59",
        "port": 8009,
        "cast_type": "cast",
        "manufacturer": "Xiaomi"
    }
}
PS C:\Users\cattvm>

I have a theory. This may be due to non-unique device names. There will be an opportunity to check later

idonotknowwhatimdoing avatar May 10 '24 16:05 idonotknowwhatimdoing

PS C:\Users\theds> catt scan
Scanning Chromecasts...
10.10.100.20 - Android TV - Xiaomi MiTV-MSSP1
10.10.100.13 - Главная спальня - Google Inc. Chromecast
PS C:\Users\theds> catt scan --json-output
{
    "Android TV": {
        "services": "{ServiceInfo(type='mdns', data='MiTV-MSSP1-0fb4e8df2847080c958cda51e4f1544a._googlecast._tcp.local.')}",
        "uuid": "0fb4e8df-2847-080c-958c-da51e4f1544a",
        "model_name": "MiTV-MSSP1",
        "friendly_name": "Android TV",
        "host": "10.10.100.20",
        "port": 8009,
        "cast_type": "cast",
        "manufacturer": "Xiaomi"
    },
    "\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u043f\u0430\u043b\u044c\u043d\u044f": {
        "services": "{ServiceInfo(type='mdns', data='Chromecast-02cbbbbb3be56653f903518b09d91c8b._googlecast._tcp.local.')}",
        "uuid": "02cbbbbb-3be5-6653-f903-518b09d91c8b",
        "model_name": "Chromecast",
        "friendly_name": "\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u043f\u0430\u043b\u044c\u043d\u044f",
        "host": "10.10.100.13",
        "port": 8009,
        "cast_type": "cast",
        "manufacturer": "Google Inc."
    }
}
PS C:\Users\theds>

Work fine on another location with unique devices names.

idonotknowwhatimdoing avatar May 10 '24 16:05 idonotknowwhatimdoing

Ah, yep! That would do it. This will be tricky to fix without breaking the API...

skorokithakis avatar May 10 '24 16:05 skorokithakis

Ah, yep! That would do it. This will be tricky to fix without breaking the API...

If I rename the devices using the TV interface, will that solve my problem?

idonotknowwhatimdoing avatar May 10 '24 17:05 idonotknowwhatimdoing

It should, yes.

skorokithakis avatar May 10 '24 17:05 skorokithakis

Thx! I'll be able to check it out next week. After that, I will add the result here.

idonotknowwhatimdoing avatar May 10 '24 17:05 idonotknowwhatimdoing