We have moved at community.getvera.com

Author Topic: DirecTV RS232/Ethernet plugin  (Read 44306 times)

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
DirecTV RS232/Ethernet plugin
« on: January 31, 2010, 03:49:23 pm »
I was doing a bit of research to see if DTV was controllable via RS232 and it seems to be possible using different methods depending on the model you have. Although my HR23-700 DVR isn't listed anywhere as confirmed compatible by DTV and doesn't have RS232, it does have USB.

There isn't much i could find on the internet that suggested that this model will work but i was experimenting with a USB/Serial adapter and managed to get it to respond to commands from a PDF doc I found for older receivers.

I tried to search here but any idea if anyone ever wrote a plug-in for this as i cant find anything?!
« Last Edit: January 16, 2011, 10:00:12 pm by guessed »
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: DirecTV RS232/Ethernet plugin
« Reply #1 on: January 31, 2010, 04:51:44 pm »
If you can get it to receive/process commands, over some form of Cable, then you should be able to modify the Panasonic TV Plugin to control it.

The key will be having the doco on what the commands are, how they're sent (CR, CR-LF, or some type of delimeter) and the "template" (PannyTV) for making a new one.

Try getting Power On/Off working first, by editing the text files from the Panny.  If you can get that working, then the rest of the commands will be easy to add.

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
Re: DirecTV RS232/Ethernet plugin
« Reply #2 on: January 31, 2010, 06:05:03 pm »
I thought about trying something like editing one of the existing plugins but dont want to cause the TV to stop working and then not have the on off control through Square connect. I'm having enough problem with the IR not working through that at the moment (one of the reasons i was looking into this)

Luckily the protocol doc that i found from DTV is very detailed and i also found a windows app that has all the buttons on the remote; it also shows the messages sent and received; hopefully it wont be too difficult, i just need to gen up a bit on how all the LUA scripting works and most likely buy a compatible USB/serial or another wiznet for vera to be able to talk to the DVR.

On a related note, I was playing around last night with trying to get control via IR of my HDMI matrix switch, but didnt have too much luck using the instructions from the SQ website and its a real pain in doing so; i had to find the pronto codes for it (could only find the newer pcf type), convert them into the older CCF format using another program i found and then add the IR strings into another existing TV plugin. Unfortunately i dont think this works anymore with the SQ vera build.

My matrix switch also supports RS232 and i have the command structure for that in a PDF too. I think unless MCV hurries up and brings out the new software that allows pasting of CCF files into the User Interface, it may be easier to try and code a plugin for both. My only problem with this approach is that i will need another USB/serial adapter and a USB hub too which ups the expense again and i may as well just use the USB-UIRT!
« Last Edit: January 31, 2010, 07:37:06 pm by strangely »
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: DirecTV RS232/Ethernet plugin
« Reply #3 on: February 01, 2010, 01:58:44 am »
@strangely, I think it would be worthwhile running 2x of these Media control Plugins.  If something "breaks" then one [Device] can be deleted (the source for the plugin can remain as needed).

I don't think that'll happen,but best to get that sort of kink out now (if it exists) than waiting until SQ Remote or Vera "hardens" and things cant be changed in the space.

Again, I don't think it'll happen.

Oh, and you don't need to learn Lua to make this type of Media Plugin.  There's very little Lua in the base Plugin you're already working with, so it's probably not a stretch to modify it.  It'll really depend upon what's in the protocol doco.

If you post the URL's for the Documentation you've found, and you don't get to modding a copy of the Panny Plugin by say Wednesday this week, then I'll mod it for you.  I wont have the bits to "test" it at my end (I have a DTV HD10-250) but I figure I can make it work roughly if the documentation is available.


Quote
My matrix switch also supports RS232 and i have the command structure for that in a PDF too

Probably.  I have a 4 Port Gefen floating around somewhere and I remember it's proto being fairly simple.  I don't imagine the Matrix ones are much more complex, the just have an extra layer of switching.

Quote
My only problem with this approach is that i will need another USB/serial adapter and a USB hub too which ups the expense again and i may as well just use the USB-UIRT!

Maybe, but as you've likely "guessed" by now, I'm not a fan of IR.  The biggest challenge right now for anyone that has the right Media/Home Audio components is that there's no good Ethernet-4x Serial port type adapter.  The WIZnet's are good for 1 or 2 ports, but more boxes are needed when you need more ports.

eg. a normal USB Hub can only power 1-2 WIZnets without being self-powered (etc)



BTW, sorry for the long lag in responses today, I've been installing the new Receiver and wall mounting everything.  Only just got it [more or less] back into running order.

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
Re: DirecTV RS232/Ethernet plugin
« Reply #4 on: February 01, 2010, 03:27:43 am »
No worries, I was a bit busy too and didn't get round to any script hacking. I think i'm going to have a go at the matrix switch first as there are less commands, I've ordered another serial adapter anyway since its not too expensive and will see what I can cobble together/edit your plugin.

I had a quick play earlier with putty trying to emulate what the windows app does, but didn't get any luck and had to give up for the day due to home improvements demanded by the wife :) 

I'm assuming vera can handle multiple serial devices?

I agree on the IR front but it may save me having multiple serial devices and would be a necessary evil anyway if i want to have a true universal remote and also use it for the xbox and the PC, I currently use the PC for playing blue rays, occasional TV (using the local cable channels and a HDhomerun tuner) when the DVR is using both tuners etc.
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: DirecTV RS232/Ethernet plugin
« Reply #5 on: February 01, 2010, 11:32:44 am »
> I'm assuming vera can handle multiple serial devices?

Yeap.  If you go with Multiple WIZnet's, I can either mod the generic IP-Serial plugin to generate "multiple" children (one for each) or you can simply instantiate a few more devices based upon the existing codebase.  Either will work just fine.

I've only seen Vera have problems with the "multiple" USB-Serial adapters, where there's one USB port and 8 Serial ports (and a power supply).  Still waiting for CJ to respond on that one (hint, hint)

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
Re: DirecTV RS232/Ethernet plugin
« Reply #6 on: February 01, 2010, 12:56:43 pm »
I bought one of the "confirmed working"  USB/serial devices (listed on the wiki) from Digi-key and doubt it'll be here until the end of the week, but if it goes ok then i may buy a second one and maybe even ditch the USB-UIRT temporarily as i think real support for this will be quite a way off with the slow pace of things.

I think realistically that the only way it will work with the Aeon stick, USB-UIRT and two USB/serial adapters will be with a powered hub anyway, but it would be interesting to find out what draws less in terms of power, WIZnets (powered from USB), or serial adapters. I guess if push comes to shove then i could even rig up some sort of Frankenstein inspired wall wart that powers vera and also a USB hub or Wiznets :)
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: DirecTV RS232/Ethernet plugin
« Reply #7 on: February 01, 2010, 01:08:14 pm »
Each WIZ draws 180mA.  Each USB port is supposed to drive 500mA, but many will drive more.  I've seen USB Hubs themselves drawing ~80-100mA

Not sure what the Aeon draws, but it's specs are probably public.

If you draw too much, your Vera will shutdown (I've done it).  I've had a Bus-powered USB Hub, the USB-RS232 (Bytecc BT-DB925) and the Alarm bridge (Paradox PTR3) all hanging off it just fine, but the PRT3 is "self-powered".  I have another Bytecc, and I'll plug it into the Hub tonight to see if it survives ;-)

The better powered USB Hubs do well because they provide 500mA per port (sometimes more) per USB spec.  I have all sorts of these so I can mix-n-match when I need them.

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: DirecTV RS232/Ethernet plugin
« Reply #8 on: February 04, 2010, 11:35:59 am »
I plugged 2x USB-serial Adapters (Bytecc BT-DB925) into the back of Vera using an iHome 4-Port USB 2.0 Notebook Hub, along with the Dongle and the PRT3 to my Alarm.

The all work fine, in a "no-load" situation, the config looks something like:

Vera-USB1
  - Dongle
Vera-USB2
  - iHome USB Notebook Hub
    - Paradox PRT3
    - USB-Serial 1
    - USB-Serial 2

I suspect it's "close" to the power limits of Vera though, so you'd only want to connect the RS-232's to things that themselves are powered.

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
Re: DirecTV RS232/Ethernet plugin
« Reply #9 on: February 04, 2010, 11:42:02 pm »
So i got mine yesterday and it worked fine in that it configured ok! Not going so well on the whole getting control of my DTV receiver or matrix switch but thats a different story :)
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: DirecTV RS232/Ethernet plugin
« Reply #10 on: April 16, 2010, 01:16:25 pm »
@strangely, did you get the RS-232 part of this driver working?  (and the one for the Matrix switch also)

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
Re: DirecTV RS232/Ethernet plugin
« Reply #11 on: April 17, 2010, 12:36:57 am »
I didn't really ever manage to communicate with the DVR with anything other than the app I sent you, and had put it on ice for the time being due to work commitments/travel and a baby that's about to arrive very soon (had a nursery and many other projects round the house to finish). It was a similar story with the HDMI switch also.

Hopefully, work will calm down a bit soon and I can put some time into it. Although you now got me thinking about it again...

Are you thinking about switching from the Tivo? Looks like DTV have some nice boxes coming out! 
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: DirecTV RS232/Ethernet plugin
« Reply #12 on: April 17, 2010, 10:52:13 am »
Still DTV, and waiting for them to release their newer Tivo-based box.  Once they do, I'll switch.... as long as they have Serial or Ethernet control (I don't fancy hacking my HR10-250 to get this)

In the meantime, trying to chase down the Pronto codes for it (in printed/text form, not CCF) to see if I can write a manual driver for it.

If you have the Make/Model of your matrix switch, and maybe even the RS-232 command structure, just throw it over and I'll see if I can hand-build an InputSelection1 device for you.

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
Re: DirecTV RS232/Ethernet plugin
« Reply #13 on: April 17, 2010, 01:11:32 pm »
Do you want the IR pronto codes for your HR10-250? If so, have you tried remotecentral.com? If you cant find the printed text ones then I managed to find a program that could covert the ccf codes to pcf; cant remember what it was called at the moment as I wiped my PC between when I was playing with it and now, but will search for it again.

Also, thanks for the offer with the matrix switch!
Its a Monoprice HDX-404E; I've attached the info that I could find so far. The PDF doc is for the 4x2 model but you'll see there's a text file with the extra commands for the 4x4 listed and is probably a bit more helpful and clear anyway, i also have a windows app they bundle along with it which is too big to attach; I was planning on maybe using it in case I couldn't get the plugin to work and seeing what it outputs.

Please dont put too much time into this by the way!
« Last Edit: April 17, 2010, 02:18:15 pm by strangely »
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
Re: DirecTV RS232/Ethernet plugin
« Reply #14 on: April 17, 2010, 01:24:28 pm »
@guessed, the program i used to convert before was called netremote designer from promixes, its not free but they have a trial period.
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster