DirecTV RS232/Ethernet plugin

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?!

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.

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!

@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.

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.

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.

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 :slight_smile:

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.

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)

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 :slight_smile:

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 :wink:

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.

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.

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 :slight_smile:

@strangely, did you get the RS-232 part of this driver working? (and the one for the Matrix switch also)

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!

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.

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!

@guessed, the program i used to convert before was called netremote designer from promixes, its not free but they have a trial period.

ok, from the Monoprice site, it looks like the switching commands are:

output 1:
input 1 “00,ff,d5,7b”
input 2 “01,fe,d5,7b”
input 3 “02,fd,d5,7b”
input 4 “03,fc,d5,7b”

output2:
input 1 “04,fb,d5,7b”
input 2 “05,fa,d5,7b”
input 3 “06,f9,d5,7b”
input 4 “07,f8,d5,7b”

output3:
input 1 “08,f7,d5,7b”
input 2 “09,f6,d5,7b”
input 3 “0a,f5,d5,7b”
input 4 “0b,f4,d5,7b”

output4:
input 1 “0c,f3,d5,7b”
input 2 “0d,f2,d5,7b”
input 3 “0e,f1,d5,7b”
input 4 “0f,f0,d5,7b”

So a “parent device” which has 4x Children, each implementing Vera’s urn:micasaverde-com:serviceId:InputSelection1’s should do it.

It looks like it’d only need to implement the following actions from that Service defn:

Input1
Input2
Input3
Input4

I’ll knock that out sometime this afternoon. You’ll need another Serial adapter to test it (etc) since I’ll have to do it blind.

I managed to get Vera to generate a device for the HR10-250 DirecTivo, so I now have that part working also (including SQRemote) so I’m all set there as well

Luckily, i already bought a Vera friendly serial adapter a while back and got vera to recognize it, its listed as device parent 29 and 30.

Great news about the Tivo, did you do it with IR and the USB UIRT or via serial somehow? I thought it didn’t have a serial port or USB!

@strangely, ok that took a little longer than expected. Can you try the attached files and let me know?

You’ll need to use the Serial Port Configuration to “attach” the relevant Serial port to it, and I couldn’t debug the IO parts (only that it was printing the “right” values when each Input1…4 was selected)

It’ll show up in SQ Remote (and Vera) as 4x “child” devices called:

HDMI Output 1
HDMI Output 2
HDMI Output 3
HDMI Output 4

Each of these will expose

InputSelection-Input1
InputSelection-Input2
InputSelection-Input3
InputSelection-Input4

… in SQ Remote in the Attachment UI.

Let me know how it goes :wink:

You Sir, are a genius! :slight_smile:

Took me about an hour to get it working because of a couple of mistakes; I also had to end up building a new gender changer with the TX/RX crossed as the plain gender changer never worked; this probably explains why I never had any luck communicating with it. I just assumed it was something I was doing wrong, despite even thinking at one point to build a new gender changer!..

Oh well, thats another nail in the Harmony 890 remote coffin now, and hopefully I wont have to use it at all! :slight_smile:

I think I owe you some beers!

Great! If you made code changes post them back. We can request another code.mios.com space to host them since they’ll probably be handy for anyone wanting a Matrix switcher “starting point”.