Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

DirecTV Plugin

If you have a question or need help, this is the place to be.
Post Reply
User avatar
Fiasco
Plugin Developer
Posts: 222
Joined: Fri Jul 24, 2009 5:32 am
Location: St. Louis MO
Contact:

DirecTV Plugin

Post by Fiasco »

I'm trying to write a plugin for the DirecTV HR20 series DVR's.

I've got my RS232 communication going and can use a serial port terminal program to send hex codes to the HR20 to trigger actions. (example FA 81 turns receiver off).

However, I'm not having much success sending commands through eventghost.

How can I dump debug output from within the init.py script to the eg console log?

Any help on sending and receiving hex strings over serial?

Thanks
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: DirecTV Plugin

Post by jinxdone »

Use the serial port plugin, check the checkbox on the left side and set the Encoding = HEX. Then use the Write Data action and as the string to send: "\xFA\x81".

It should be as simple as that.

The print() function will write a line into the log view if you need to to debug your pÛthon scripts.
User avatar
Fiasco
Plugin Developer
Posts: 222
Joined: Fri Jul 24, 2009 5:32 am
Location: St. Louis MO
Contact:

Re: DirecTV Plugin

Post by Fiasco »

By checkbox on the left side, do you mean the "Generate events on incoming data" checkbox?

I currently have the serial port plugin installed w/ the generate events checkbox selected. I created a serial port write action as you suggested and that works fine to trigger the DVR.

However, I'm getting no return events from the serial port.
User avatar
Fiasco
Plugin Developer
Posts: 222
Joined: Fri Jul 24, 2009 5:32 am
Location: St. Louis MO
Contact:

Re: DirecTV Plugin

Post by Fiasco »

I got it figured out. I've got all the basic remote functions working and can directly jump to specific channels. Working on getting feedback sorted out so I can display channel info, tuner status ect on the iphone screen.
User avatar
Fiasco
Plugin Developer
Posts: 222
Joined: Fri Jul 24, 2009 5:32 am
Location: St. Louis MO
Contact:

Re: DirecTV Plugin

Post by Fiasco »

dtv preliminary interface
Attachments
photo.jpg
User avatar
Fiasco
Plugin Developer
Posts: 222
Joined: Fri Jul 24, 2009 5:32 am
Location: St. Louis MO
Contact:

Re: DirecTV Plugin

Post by Fiasco »

Had to return my leased laptop back to school at the end of the semester. Backed everything up and apparently made some type of tragic error because I lost most of the work I've done the past month or so on this and other things. Grrrr.

I didn't care for my artwork anyway so I revised my DTV interface. Screen one is above. Second screen gives the rest of the functions.

My DTV plugin I was working on also got lost so I'll start that over as well.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: DirecTV Plugin

Post by krambriw »

Even if you haven't finished everything while you are creating/developing "things", its always a good advise to upload working versions asap to the community (not only for early feedback but also to help in such situations you just described)

BestR Walter
User avatar
Fiasco
Plugin Developer
Posts: 222
Joined: Fri Jul 24, 2009 5:32 am
Location: St. Louis MO
Contact:

Re: DirecTV Plugin

Post by Fiasco »

I've got my stream of data coming back from the DTV.
b = binascii.b2a_hex(readdata) gives me my 2 character hex representation
I have a dictionary structure with commands and strings
{'F0':'command acknowledged'}
if b = F0 why doesn't
commandDict.has_key(b) or commandDict.has_key(str(b))
return true?


figured it out, case issue
User avatar
Fiasco
Plugin Developer
Posts: 222
Joined: Fri Jul 24, 2009 5:32 am
Location: St. Louis MO
Contact:

Re: DirecTV Plugin

Post by Fiasco »

DTV RS232 Protocols
Attachments
dtvprotocol232.zip
(190.96 KiB) Downloaded 116 times
User avatar
Fiasco
Plugin Developer
Posts: 222
Joined: Fri Jul 24, 2009 5:32 am
Location: St. Louis MO
Contact:

Re: DirecTV Plugin

Post by Fiasco »

Prelim DTV plugin

I programmed alot in Perl some time ago but never messed with Python before so suggestions, fixes ect welcome.
Attachments
DirecTVHR20.zip
(9.38 KiB) Downloaded 111 times
User avatar
Fiasco
Plugin Developer
Posts: 222
Joined: Fri Jul 24, 2009 5:32 am
Location: St. Louis MO
Contact:

Re: DirecTV Plugin

Post by Fiasco »

Demo of interface

step 1: visit this webpage with your iphone
http://scores.warbirdsiii.com/imote/index.html

step 2: bookmark the page and save it to your Iphone desktop

step 3: launch the page from your newly created desktop icon

The page has to be launched from your iphone desktop and not browsed to w/ iphone safari to work correctly.

Click TV screen icon on the home screen. swipe left/right to navigate screens afterwards.
Post Reply