Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Detecting My Panasonic Viera (VT60) #19

Closed
soloam opened this issue Aug 7, 2018 · 19 comments
Closed

Not Detecting My Panasonic Viera (VT60) #19

soloam opened this issue Aug 7, 2018 · 19 comments

Comments

@soloam
Copy link

soloam commented Aug 7, 2018

Hello, I was able to install the package now, thank you, but when I test it out with the list-devices examples, I don't get any return, I own a Panasonic VT60 and I can send movies directly from my Youtube app to my TV. Can it be that I'm doing something wrong?

Thank You

@yocontra
Copy link
Owner

yocontra commented Aug 7, 2018

If you use https://www.npmjs.com/package/node-ssdp to scan for all devices does it show up?

@soloam
Copy link
Author

soloam commented Aug 8, 2018

No, the same, no return! I used the example Usage-Client!

Thank You

@yocontra
Copy link
Owner

yocontra commented Aug 8, 2018

@soloam You might want to open a ticket on node-ssdp then, since that's what we use as our underlying library. Could be a network issue of some sort.

@soloam
Copy link
Author

soloam commented Sep 6, 2018

Hello @contra actually I was doing something wrong on the node-ssdp, now I can see my tv on the client example of the node-ssdp, but not on the nodecast

Got a response to an m-search: 200 { "CACHE-CONTROL": "max-age=1800", "EXT": "", "LOCATION": "http://192.168.1.xx:55000/pac/ddd.xml", "SERVER": "FreeBSD/8.0 UPnP/1.0 Panasonic-MIL-DLNA-SV/1.0", "ST": "urn:panasonic-com:service:p00ProAVControlService:1", "USN": "uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx::urn:panasonic-com:service:p00ProAVControlService:1" } { "address": "192.168.1.xx", "family": "IPv4", "port": 20299, "size": 316 }

@yocontra
Copy link
Owner

yocontra commented Sep 6, 2018

That looks like something different from a normal DLNA DIAL server - it should be urn:dial-multiscreen-org:service:dial:1

@soloam
Copy link
Author

soloam commented Sep 6, 2018

yes I have this one also:

got a response to an m-search:
200
{
"CACHE-CONTROL": "max-age=1800",
"EXT": "",
"LOCATION": "http://192.168.1.xx:55000/nrc/ddd.xml",
"SERVER": "FreeBSD/8.0 UPnP/1.0 Panasonic-MIL-DLNA-SV/1.0",
"ST": "urn:dial-multiscreen-org:service:dial:1",
"USN": "uuid:xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx::urn:dial-multiscreen-org:service:dial:1"
}
{
"address": "192.168.1.xx",
"family": "IPv4",
"port": 54825,
"size": 294
}

@soloam
Copy link
Author

soloam commented Sep 6, 2018

I also have a kodi device running with TubeCast and it also works great with my youtube app on my mobile, but it's not detected in your library also.

@soloam
Copy link
Author

soloam commented Sep 6, 2018

Ok I found a possible idea for the problem if I run:

This does not work (probably the program is ending before it discovers the packages?)

#!/usr/bin/env node

var ssdp = require('node-ssdp').Client
  , client = new ssdp({})

client.on('response', function inResponse(headers, code, rinfo) {
  console.log('Got a response to an m-search:\n%d\n%s\n%s', code, JSON.stringify(headers, null, '  '), JSON.stringify(rinfo, null, '  '))
})

client.search('urn:dial-multiscreen-org:service:dial:1')

This one works

#!/usr/bin/env node

var ssdp = require('node-ssdp').Client
  , client = new ssdp({})

client.on('response', function inResponse(headers, code, rinfo) {
  console.log('Got a response to an m-search:\n%d\n%s\n%s', code, JSON.stringify(headers, null, '  '), JSON.stringify(rinfo, null, '  '))
})


setInterval(function() {
  client.search('urn:dial-multiscreen-org:service:dial:1')
}, 5000)

@yocontra
Copy link
Owner

yocontra commented Sep 6, 2018

@soloam Yeah it seems like that is the issue after doing some testing, I commented on the ticket you opened on node-ssdp since the issue seems to lie the.

If they seem unresponsive I could add a workaround into this library.

@yocontra
Copy link
Owner

yocontra commented Sep 6, 2018

Published a fixed version as 1.0.0 - if node-ssdp fixes their stuff I can remove the hack, but it should be fine.

@yocontra yocontra closed this as completed Sep 6, 2018
@soloam
Copy link
Author

soloam commented Sep 6, 2018

Sorry @contra I tested it out and it seams that the find() is broken, I now can see my devices appearing, that works, but it stays in a infinite loop.

@soloam
Copy link
Author

soloam commented Sep 6, 2018

if I run:

#!/usr/bin/env node

var nodecast = require('nodecast');

var devices = nodecast.find();

devices.once('device', function(device) {
    console.log('Details for ', device.name)

    var yt = device.app('YouTube');

    yt.start('v=CNp6hpzAQIo', function(err) {
        console.log('Youtube for ', device.name)
    });
});

I get:

Details for  OSMC-Sala
Youtube for  OSMC-Sala

And never jumps to the next device
It keeps the program open and I have to cancel it with "CTRL+C"

If I run your list example:

!/usr/bin/env node

var nodecast = require('nodecast');


var stream = nodecast.find();

stream.on('device', function(device) {
        console.log('Found', device.name);//,  device.info);
  if (typeof device.apps === 'function') {
    device.apps(function(err, apps){
      console.log('Applications for', device.name, apps);
    });
  }
  if (typeof device.details === 'function') {
    device.details(function(err, details){
      console.log('Details for', device.name, details);
    });
  }
  if (typeof device.running === 'function') {
    device.running(function(err, app){
      console.log('Currently running app for', device.name, app);
    });
  }
});

I get

Found OSMC-Sala
Details for OSMC-Sala {}
Currently running app for OSMC-Sala undefined
Found VIERA VT60 Series

It keeps the program open and I have to cancel it with "CTRL+C"

@yocontra
Copy link
Owner

yocontra commented Sep 6, 2018

@soloam Yeah, because it's an asynchronous networking interaction (we send out a blast, and we wait for responses to come in) there's no way to know that we have received all device responses so you have to call .end manually or press ctrl-c.

Listing apps is only supported for chromecast and roku, so you wouldn't see anything printed for that. Your output looks correct - it found your device and gave you a handle to it. Your first example should work fine.

I'm not having that issue on my devices, I just ran the same thing on my work network and got:

Found [TV] Room 2 (Horse)
Found Family Room TV
Found Flow TV Stand
Applications for Flow TV Stand [ { id: '31012',
    type: 'menu',
    version: '1.9.17',
    name: 'Movie Store and TV Store' },
  { id: '31863',
    type: 'menu',
    version: '1.3.5',
    name: 'Roku Home News' },
  { id: 'tvinput.hdmi1',
    type: 'tvin',
    version: '1.0.0',
    name: 'HDMI 1 (ARC)' },
  { id: 'tvinput.hdmi2',
    type: 'tvin',
    version: '1.0.0',
    name: 'HDMI 2' },
  { id: 'tvinput.hdmi3',
    type: 'tvin',
    version: '1.0.0',
    name: 'HDMI 3' },
  { id: 'tvinput.cvbs', type: 'tvin', version: '1.0.0', name: 'AV' },
  { id: 'tvinput.dtv',
    type: 'tvin',
    version: '1.0.0',
    name: 'Antenna TV' },
  { id: '45706',
    subtype: 'sdka',
    type: 'appl',
    version: '1.0.12',
    name: 'Roku TV Intro' },
  { id: '151908',
    subtype: 'rsga',
    type: 'appl',
    version: '1.5.9',
    name: 'The Roku Channel' } ]
Found Flow TV
Applications for Flow TV [ { id: '31012',
    type: 'menu',
    version: '1.9.25',
    name: 'Movie Store and TV Store' },
  { id: 'tvinput.hdmi1',
    type: 'tvin',
    version: '1.0.0',
    name: 'HDMI 1 (ARC)' },
  { id: 'tvinput.hdmi2',
    type: 'tvin',
    version: '1.0.0',
    name: 'HDMI 2' },
  { id: 'tvinput.hdmi3',
    type: 'tvin',
    version: '1.0.0',
    name: 'HDMI 3' },
  { id: 'tvinput.cvbs', type: 'tvin', version: '1.0.0', name: 'AV' },
  { id: 'tvinput.dtv',
    type: 'tvin',
    version: '1.0.0',
    name: 'Antenna TV' },
  { id: '12',
    subtype: 'ndka',
    type: 'appl',
    version: '4.2.90679030',
    name: 'Netflix' },
  { id: '13',
    subtype: 'ndka',
    type: 'appl',
    version: '10.2.2018080217',
    name: 'Amazon Prime Video' },
  { id: '2285',
    subtype: 'rsga',
    type: 'appl',
    version: '6.9.1',
    name: 'Hulu' },
  { id: '69091',
    subtype: 'rsga',
    type: 'appl',
    version: '3.0.10',
    name: '4K Spotlight' },
  { id: '13842',
    subtype: 'ndka',
    type: 'appl',
    version: '1.3.220786',
    name: 'VUDU' },
  { id: '50025',
    subtype: 'rsga',
    type: 'appl',
    version: '2.0.820',
    name: 'Google Play Movies' },
  { id: '2213',
    subtype: 'sdka',
    type: 'appl',
    version: '4.1.1602',
    name: 'Roku Media Player' },
  { id: '28',
    subtype: 'rsga',
    type: 'appl',
    version: '4.1.20171012',
    name: 'Pandora' },
  { id: '45706',
    subtype: 'sdka',
    type: 'appl',
    version: '1.0.16',
    name: 'Roku TV Intro' },
  { id: '46041',
    subtype: 'ndka',
    type: 'appl',
    version: '5.7.106',
    name: 'Sling TV' },
  { id: '8838',
    subtype: 'rsga',
    type: 'appl',
    version: '2.5.4',
    name: 'SHOWTIME' },
  { id: '61322',
    subtype: 'rsga',
    type: 'appl',
    version: '4.4.23',
    name: 'HBO NOW' },
  { id: '151908',
    subtype: 'rsga',
    type: 'appl',
    version: '1.5.9',
    name: 'The Roku Channel' },
  { id: '837',
    subtype: 'ndka',
    type: 'appl',
    version: '1.0.70500270',
    name: 'YouTube' } ]

@yocontra
Copy link
Owner

yocontra commented Sep 6, 2018

Ah, I just noticed - your code is doing once instead of on so it will only listen for the first device, that's why it isn't working.

@soloam
Copy link
Author

soloam commented Sep 6, 2018

yeh that made it jump to the next device but the movie does not start

#!/usr/bin/env node

var nodecast = require('nodecast');

var devices = nodecast.find();

devices.on('device', function(device) {
    console.log('Details for ', device.name)

    var yt = device.app('YouTube');

    yt.start('v=UxWqEFHNOBM', function(err) {
        console.log('Youtube for ', device.name)

        // starts the app on the device
        // also optionally takes data to pass to the app
        // (for example: youtube takes v=id to launch with a video)
    });
});

shouldn't this start the youtube in both devices?

Sorry for all this
Thank you

@yocontra
Copy link
Owner

yocontra commented Sep 6, 2018

@soloam Yeah that should work, assuming your TV has a youtube app and it accepts those parameters.

@soloam
Copy link
Author

soloam commented Sep 6, 2018

Yes it does... But the films don't start! I don't understand if I'm doing something wrong!

@soloam
Copy link
Author

soloam commented Sep 7, 2018

According to the developer of node-ssdp, it's working as intended, and we should use a settimeout ou setinterval to mantain the session open to capture the packages. Your version now keeps it open forever, I can't close it without a ctrl+c, because I stay locked inside the find function! A god solution would be to be able to inform the find function on the time that it should keep looking for the package, like a timeout time! This would avoid it being locked forever.

I don't know if this is the reason why I can't send videos to my devices, but being stuck in a infinit loop does not seems like a good thing.

Thank you @contra and hope I helped find a "problem"

@yocontra
Copy link
Owner

yocontra commented Sep 7, 2018

@soloam find will always continue looking for devices, that's how it was intended to work. It doesn't just do one scan then end - it will always emit an event when a new device is discovered. If you change networks, new devices join, or whatever then they should pop up. If we made it only search once then stop it would break that.

It's the same thing as a node http server - you open it, you can either close it to let the process know you don't need it anymore or you can press ctrl-c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants