-
Notifications
You must be signed in to change notification settings - Fork 9
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
Streaminfo #4
Comments
I was thinking about this, and wonder if this is also timing related, i swear i read somewhere there was a 5000 wait to tune a channel so it could stabilize the symbols or somehing, but the _request has a max timeout of 2500, so putting a second one right after the first, causes a 'extra' 2500 timeout, which allows stabilization and finally returns the right result. I havent tried just reading stream info without a combined channel change, ill try that tonight maybe |
Yes, they do wait 5 seconds for the device to settle on a channel: https://github.com/mharsch/libhdhomerun/blob/master/hdhomerun_channelscan.c#L88 |
Yep, confirmed,, hdhr.discover(function (err, res) { var device = hdhr.create({device_id: res[0]['device_id'], //device.set('/tuner0/channel', 'auto:51', function (err, res) { device.get('/tuner0/streaminfo', function(err, res) { Produces the correct output. |
I implemented the logic for polling channel status in my example code: See poll_lock and poll_seq, called by test_channel. |
That should be handy, I'll have to look into that, I will want to (myself) expose that as a function call, with a callback that has the data..... If I do I can show you the updates, and if you want to include them, we can do that. |
With the following code ( chaining things per your suggestion with the last issue).
produces the following output:
[ { len: 15,
device_id: '103DA852',
device_type: 'tuner',
tuner_count: 2,
checksum: 120479540,
_offset: 23,
device_ip: '192.168.0.26' } ]
{ name: '/tuner0/channel', value: 'auto:51' }
{ name: '/tuner0/streaminfo', value: 'none\n' }
However uncommenting out the "last" streaminfo,
[ { len: 15,
device_id: '103DA852',
device_type: 'tuner',
tuner_count: 2,
checksum: 120479540,
_offset: 23,
device_ip: '192.168.0.26' } ]
{ name: '/tuner0/channel', value: 'auto:51' }
undefined
{ name: '/tuner0/streaminfo',
value: '1: 30.1 KYNM-HD\n2: 30.2 TUFF-TV\n3: 30.3 Retro\n4: 30.4 PBJ-TV\n5: 30.5 QVC\ntsid=0x1383\n' }
Commenting out the former streaminfo (thinking that maybe it didn't need to be chained?) results in the following:
[ { len: 15,
device_id: '103DA852',
device_type: 'tuner',
tuner_count: 2,
checksum: 120479540,
_offset: 23,
device_ip: '192.168.0.26' } ]
{ name: '/tuner0/channel', value: 'auto:51' }
undefined
I'll be happy to update the documentation if I can figure out the "proper" way to use it.
:)
Thank you,
Tyson
The text was updated successfully, but these errors were encountered: