mharsch / node-hdhomerun Goto Github PK
View Code? Open in Web Editor NEWlow-level device control of HDHomeRun TV tuners for node.js
low-level device control of HDHomeRun TV tuners for node.js
With the following code:
var hdhr = require('hdhomerun');
hdhr.discover(function (err, res) {
console.log(res);
var device = hdhr.create({device_id: res[0]['device_id'],
device_ip: res[0]['device_ip']});
device.get('/sys/model', function (err, res) {
console.log(res);
});
device.set('/tuner0/channel', 'auto:51', function (err, res) {
console.log(res);
console.log(err);
});
});
I get the following results:
[ { len: 15,
device_id: '103DA852',
device_type: 'tuner',
tuner_count: 2,
checksum: 120479540,
_offset: 23,
device_ip: '192.168.0.26' } ]
{ name: '/sys/model', value: 'hdhomerun3_atsc' }
undefined
[Error: request timeout]
I'm trying to track down whats wrong..... If you have any hints itd be helpful!
Thanks
Tyson
With the following code ( chaining things per your suggestion with the last issue).
var hdhr = require('hdhomerun');
hdhr.discover(function (err, res) {
console.log(res);
var device = hdhr.create({device_id: res[0]['device_id'],
device_ip: res[0]['device_ip']});
device.set('/tuner0/channel', 'auto:51', function (err, res) {
console.log(res);
device.get('/tuner0/streaminfo', function (err, res) {
console.log(res);
});
});
//device.get('/tuner0/streaminfo', function(err, res) {
// console.log(res);
//});
});
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 control channel uses a naive implementation that assumes incoming packets always contain one complete message. The control socket handler should work with the parser to detect partial messages and buffer them appropriately until the rest of the message arrives.
It would be nice to have virtual HDHomeRun and the tool for communication written in swift.
But without clear description about what server is on what port and what is multicasted it's not possible.
Also I second question from 3 years about what is the status of the project. That code no longer work for me so it's safe to assume new firmware broke something.
I just wanted to see what the status of this project is. I see that @geertbongers made some updates to recognize newer tags. I had actually made the same updates in my fork, but in a more intrusive manner. Specifically I did the following:
var
to const
and let
in files I touchedAt this point, I think it makes the most sense to merge @geertbongers/master changes to be merged first. After that, I can easily add the lineup_url
changes in a way that keeps with the current style.
More long term, what are the plans for maintaining this repo? I personally would like to make some of the changes I listed above, but I'm not going to do that only to have the core repo change out from under me. I'd love to hear your thoughts on this.
Finally, thanks for all your hard work on this. You definitely did all the heavy lifting here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.