Home AMX User Forum AMX General Discussion

Channel Favorites

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!

Comments

  • Joe HebertJoe Hebert Posts: 2,159
    Try this thread that Dave Hawthorne started:

    http://www.amxforums.com/showthread.php?t=1958&highlight=favorites
  • TonyAngeloTonyAngelo Posts: 315
    I get a message saying that I don't have permission for that page.
  • Joe HebertJoe Hebert Posts: 2,159
    Search for the word "favorites" Your post will be the first result and Dave's thread is right after that.
  • the8thstthe8thst Posts: 470
    I think that thread may be in the ACE section as I cannot get to it either.
  • John GonzalesJohn Gonzales Posts: 609
    Another thread

    Here's another thread with some discussion on favorites as well.

    A random Programming Example -- DSS Music Channels

    --John
  • ericmedleyericmedley Posts: 4,177
    I think I've posted this before but I'll do it again as it is still a good discussion...

    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.
  • REBUILD_EVENTREBUILD_EVENT Posts: 127
    how do you get the things from the 'mothership' as you call it to the netlix masters out there?


    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.
  • ericmedleyericmedley Posts: 4,177
    how do you get the things from the 'mothership' as you call it to the netlix masters out there?


    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~)
  • REBUILD_EVENTREBUILD_EVENT Posts: 127
    I asked because I am trying to save some information in a text file on the webserver and get it by the netlinx masters every now and then.

    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
  • REBUILD_EVENTREBUILD_EVENT Posts: 127
    I asked because I am trying to save some information in a text file on the webserver and get it by the netlinx masters every now and then.

    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):
    SEND_STRING dvPort,"'GET /myPath/myFile.txt HTTP/1.0',13,10,
    'Host: www.MyDomain.ch',13,10,
    'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1',13,10,
    'Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',13,10,'Accept-Language: en q=0.8,en-us;q=0.5,en;q=0.3',13,10,
    'Accept-Encoding: gzip,deflate',13,10,
    'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7..Keep-Alive: 300',13,10,
    'Connection: keep-alive',13,10,
    'Cookie: __utmz=151369467.1169742947.10.2.utmccn=(referral)|utmcsr=192.168.1.6|utmcct=/projects/smartcontrol/report/1|utmcmd=referral; __utma=151369467.1456649791.1163402383.1170932546.1172134396.13',13,10,
    13,10";
    
  • viningvining Posts: 4,368
    REBUILD_EVENT wrote:
    I asked because I am trying to save some information in a text file on the webserver and get it by the netlinx masters every now and then.
    Have you tried the FTP approach. There's a DMTF (??) function in FTP that will query the date/time stamp of a file. If the stamp changes then transfer. Simply set up the master to query this DMTF stamp for the particular file in question once a day/week what ever and if it changes download it to the master. It a transfer is susccessful parse your text file/xml/csv file what ever and load it into your channel/fav array.
  • REBUILD_EVENTREBUILD_EVENT Posts: 127
    vining wrote:
    REBUILD_EVENT wrote:

    Have you tried the FTP approach. There's a DMTF (??) function in FTP that will query the date/time stamp of a file. If the stamp changes then transfer. Simply set up the master to query this DMTF stamp for the particular file in question once a day/week what ever and if it changes download it to the master. It a transfer is susccessful parse your text file/xml/csv file what ever and load it into your channel/fav array.

    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?
  • viningvining Posts: 4,368
    Like everything else sending the user name and password isn't difficult once you've done it. I guess if you're just retrieving one file http method would be much simpler but later when you decide to check and transfer multiple files FTP would be more efficient.

    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..
  • ericmedleyericmedley Posts: 4,177
    vining wrote:
    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.
Sign In or Register to comment.