Premise Generic http driver?

Motorola Premise

doczaius

Member
Has anyone looked into this? or is there something available that I've skipped over?
 
So many new consumer electronics are implementing HTTP based API's to work with native remote control apps on smart phone's and tablets...  XBMC, DirecTV, AppleTV, Denon, Marantz, EtherRain.. and many more I'm sure. It's only a matter of time before manufacturers kill off serial communication completely.  My DirecTV box requires a USB->Serial adapter and from what I've read its reliability between firmware updates is questionable.  You can only get RS-232 connections on high-end Denon amps.. 
 
Thoughts? 
 
If I'm following you...

123 laid out using a virtual interface...basically using a UDS-10
that provides a port for tcp/ip communication...for me, I used that for Tivo; will use it to expand the Integra, and if Philip's ever get their act together, their flat screen...you're right..serial will go away...
 
The UDS-10 workaround only works for tcp sockets, which is fine for a lot of a/v components.  The Elk M1G module instructions details the UDS-10 trick.
 
For udp sockets, you need to use the sdk and C++ or .net.  Or you can create a perl script to serve the udp connection as a tcp connection (see the obi110 module) and then use the UDS-10 work around, which is much easier.
 
There's also standard stuff like the xml objects, http gets, etc... that you can use in vbscript to control devices.  The door bell module I posted a few months back is an example of how to use HTTP Gets in vbscript.
 
Interesting.  Thank you for the info.  Adding the UDS-10 was easy enough but now I'm stuck.  The port keeps opening and closing by itself... and I can't get what I enter in SerialData to stick -- it either disappears or all spaces and punctuation turn into the letter A???  I'm wondering if the UDS-10 driver is trying to create a persistent connection with the HTTP server...that won't work as the server will likely time out the connection if a command isn't received.
 
okay...so looking at my Tivo interface...
 
Add the Lantronix UDS10 (Addins->Lantronix). For the UDS10 IPAddress, add your device IP address. For the  IPPort, add your device port. (e.g. 192.168.0.116...port 31339). If your device has a web server, you should see that page in the center of the Builder. (I see the 'Congratulations' Tivo splash screen). If you go to the port (one level down), you should see the IP address and the Port address grayed out, with the PORTIO set to 'Open'. If not, delete that UDS10 and readd. Once you have that, go to the device and add that UDS-10 as the serial port of your device. You should see the PortStatus change to 'Port(Opened)'
I have found that rebooting the device has helped if you're getting the flapping port...report back and we'll see what to do next...and welcome to the Forums...
 
btw, what kind of device are you trying to connect to?
 
A DirecTV Genie.
 
I don't see anything in the center of builder -- but that's probably because the DTV box doesn't respond with HTML -- just an array in a text string.  For testing purposes, I did try point it to my router, which of course has a real webserver and the page did load successfully.     Still no go though trying to control from the custom device, the port keeps opening and closing.
 
I'm going to reboot the PC and see if that does anything. 
 
No luck with reboot... I've noticed that if I am able to issue a command in the brief window that the port is opened, it immediately closes after the command is sent.
 
I have at least 6 ip devices working just fine with Premise.  Some use HTTP, some use TCP, some use UDP.  You just need to first figure out the protocol and understand all the vendors technical information (maybe call DTV and see what technical information they can provide). 
 
The fact that you are saying HTML, makes me think you should be using HTTP to connect (http get or http post) in vbscript.  Look at the doorbell module I posted for examples of how to grab information from an http get.  If you can put a URL into a browser and manually control your box, this is what you need to be using.
 
In other words, this means you cannot use the uds-10 trick.  As I mentioned earlier, the UDS-10 trick only works for tcp socket communications.  This is what 80% of the devices use, but apparently not your genie.  While HTTP is built on TCP, you cannot use the UDS-10 work around as a web connection does not stay open after you request a URL.  Basically, if you can connect to something using telnet, the UDS-10 trick will work, otherwise it will not.
 
So, what I would do:  figure out how to connect to the thing manually using your PC, then use the correct method in Premise (highly likely one of the three methods I listed in my last post).  I think there was also a direct tv add-in in this zip file:  http://cocoontech.com/forums/topic/14446-download-various-drivers/  Be sure to read Builder's help file for understanding what an add-in is.
 
Yeah, It's definitely HTTP.  All most all of my IP connected consumer electronic devices have either a HTTP gui, simple get/post command interface or a combination of the two . 
 
For reference to anyone searching in the future, you can list the commands from the DTV box by navigating to: http://xxx.xxx.xxx.xxx:8080/info/getOptions
You must turn on remote access in the settings. This should work for any boxes released in the past few years running the latest firmware.  When you run the query you will see comments from DTV stating that the functions may change or be disabled in the future, so fair warning. Probably more likely to change as I believe this is how the unexpectedly impressive DirecTV iPad app interfaces with the boxes.
 
I missed your earlier post; I should have refreshed more often!  I checked out the DirecTV driver previously but its old/serial specific, probably ok for older boxes but both of my DVRs were manufactured within the past couple of years... no serial ports, only USB (+end-user supplied adapter), and a lot of dead ends/issues on other forums.
 
I'll checkout the doorbell driver.  Info and time spent with UDS won't go to waste though, it may be the solution for AppleTV and if I can find the hardware for cheap it may work out with my runco and epson projectors which do not have IP. ^_^
 
Thank you both. Funny how I'm getting more support for a product that cost nothing and from complete strangers than from the two commercial products I tried with paid staff.  DIY for life!
 
Correct.  You WILL need the UDS-10 trick for most of your devices.  The direct tv thing is odd ball and couldn't be integrated with a lot of control systems such as URC (you're lucky you're using a PC for controlling it).  Almost always, a tcp socket is used for IP Control via transferring an ascii string.  I wouldn't be surprised if there was another means to control the Direct TV box, but maybe there's not.  
 
My Panasonic TV uses complex looking SOAP packets, so I just used a WIFI to IR adapter and chose to use IR:  http://www.globalcache.com/products/itach/wf2irspecs/
 
The Global Cache devices work great with Premise (search the help file for global cache).  The GC-100 is what I'd use for IR if I had an ethernet jack nearby.  Since the URL structure is simple for your box, it's not too hard to code though.  But...  There's nothing wrong with IR if you have discrete commands for everything.  It is 100% reliable when using a GC-100.
 
Do the newer Direct TV boxes not have an ethernet port? I have my older HR21 boxes connected using ethernet and can control them
with the Home Automation program I use, I also use SageTV and my SageTV box can switch channels on the Direct TV boxes to record off my Hauppauge HD PVR or Collosus.
 
@Waynedb Yep, they do have ethernet ports. That's what I've been trying to get to work with Premise  I don't think I ever got far enough into configuring CQC to work w/DTV because the VRC0P wouldn't work with it and I hated the idea of having to buy more z-wave hardware.  Elve has a generic HTTP driver that would probably work and I'm assuming Homeseer as well.
 
Etc...not sure I'm following the uds-10 will Not work..so far, it has worked for the devices I've tried...more data, please
 
The Premise module seriously works better than CQC with the VRC0P?!?  That's a huge compliment to 123 if he's reading this!  It was his cleaver idea to use the job queue feature that will automatically retry failed jobs, etc...  I'm not sure of any other z-wave software that has such a feature.
 
doczaius said:
CQC to work w/DTV because the VRC0P wouldn't work with it and I hated the idea of having to buy more z-wave hardware.
 
It depends entirely on the communications protocol being used.  Unless it's TCP (as most devices are), it will not work.  Whatever device you are connecting to also has to act as a TCP listener (server), and the UDS-10 module then acts as the client (who initiates the connection with the server/listener).  It sounds like doczaius' problem is not that it will not connect, but that it will not stay connected.  That is because even though HTTP is built on TCP, I think the device he's connecting too is not a TCP listener (so the connection is quickly dropped).
 
 
If you google "socket programming" you can learn a lot about this type of thing.  Maybe start with some perl examples, so google "socket programming perl tutorial."
 
 
chucklyons said:
Etc...not sure I'm following the uds-10 will Not work..so far, it has worked for the devices I've tried...more data, please
 
Back
Top