Channel Favorites
TonyAngelo
Posts: 315
I'm writing a module for RS232 control of a DirecTV HR20 and had a question about how people deal with channel favorites. I was thinking of using a separate include file with all the Favorite information that would talk to the module. This way if there is a lineup change or I need to change to favorites all I need to do is alter the include file not the module.
So my questions are these:
1) Is this a good idea, or is there a better way to accomplish this?
2) If this is a valid idea how do I interface between the include file and the module?
I tried searching the forum for other threads about this but didn't find any.
TIA!
So my questions are these:
1) Is this a good idea, or is there a better way to accomplish this?
2) If this is a valid idea how do I interface between the include file and the module?
I tried searching the forum for other threads about this but didn't find any.
TIA!
0
Comments
http://www.amxforums.com/showthread.php?t=1958&highlight=favorites
Here's another thread with some discussion on favorites as well.
A random Programming Example -- DSS Music Channels
--John
We have clients who use Comcast, Time Warner, Direct TV, DishNet and a few other oddball things floating around.
Obviously, whenever one of the TV service providers changes their channel lineup (Comcast has done so 4 times this year alone) it can mean a lot of reprogramming.
Here's my solution.
I have a netlinx master here at my office that is in charge of maintaining stuff like this in all our client's masters. The client masters check in periodically with what I call 'the Mothership'.
If the TV service provider has changed the channel lineup, I change the data table in the Mothership. The client masters download the new lineup and no reprogramming or touch panel changes are needed.
I've toyed with the idea of doing the same thing using a MYSQL database. However, I like the AMX solution as it is harder to hack.
The Mothership is also responsible for a whole host of other things, but that's another discussion.
we use buttons with tv icons. in the [hold 50] of the button_event, we open a keypad, where the customer can assign a new channel number. this because every customer has its own solution, its own tv receiver/tv set/satellite things/cable tv stuff and so on.
The customer masters initiate the conversation. Every system has a unique system ID and I use that number to determine what time that master will try to communicate with the mother ship. (avoids collisions) If communication fails both the master and the motherhsip note it and the system will try again after a period of time. If three failures occur, then I get a notice to that effect and a service call is generated.
The masters send a whole bunch of system useage stuff and also check with the mothership to see if their channels are up-to-date. If not, then the remote master begins to download the new channel lineup.
The communication is a simple IP port-to-port connection on the higher port numbers. I wrote my own Telnet protocol with encryption and error correction. There is a handshake routine that is stored at both ends of the system. It'd be pretty hard to hack because the routine goes through several steps and it is set up "1 strike, you're out." (I'm not too silly to think that it is impervious. It's just hard.)
I like your idea of having the user-managed preset. That works well too. I've offered that feature before. Howver, our customers are a little too spoiled for that, I'm afraid. 8~)
when I tested with the file on a netlinx masters webserver everything worked fine, now I transferred the file to the company's webserver. when I get the file with a web browser it works perfectly, but accessing it with HTTP GET from the netlinx master, i only get an error message. i tried with local port 11, maybe I should try with a higher local port number. another thing, i'm gonna try is to sniff everything, that firefox sends, like "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.1)" and so on and modify my HTTP GET- string
i have found out that port number doesn't matter (above/below 1024) and it works the following way (i actually sniffed with ethereal what firefox was sending, when calling the address):
i have read a little bit about ftp, but with the http approach, i have to open a connection with IP_CLIENT_OPEN and then send the above string and I get the entire text file in my data event.
doing this with ftp would mean to go through username, password and stuff i don't really need, although it offers more possibilities....
or is there an ftp transfer template for netlinx master?
Although the auotomated methods are cool simple manual FTP transfer to the master can accomplish the updates just as well as long as you have your channels or favs file written on the master and have a routine that periodically loads them in their proper arrays or structures either on a daily/weekly basis or every time you open a certain page like Cable_Channels or XM_Guide, etc..
That's why I chose to write my own protocol for this. It's easier to manage the transfer and keep track of what happened each step of the way. It is essentially reinventing the wheel in a way. I'm just customizing the hub caps a bit.