Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Previous page Next page Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Page 1 of 2
Topic:
Raspberry Pi as an RFX9600 simulator
This thread has 16 replies. Displaying posts 1 through 15.
Post 1 made on Wednesday November 18, 2015 at 20:39
tengizk
Long Time Member
Joined:
Posts:
September 2010
77
"Real" RFX9600 + serial to Ethernet bridge that worked for me for long time finally is no good anymore since the most recent additions to my home theater setup are impossible to control using just one way serial (I use a PS challenged TSU9300 as the control panel) - they are stateful and require more complicated programming than just shooting strings over telnet-like connections.

So I decided to add a Raspberry Pi as a smarter controller to accept serial commands from RFX9600 and then perform the more complicated IP control of the devices.

Just for the heck of it I also tried to resurrect an old toy project (after my twins were born it had to wait until the kids grew older) and re-implemented my C# RFX9600 simulator (it only really supports serial, delay, relay and power sense – I don’t know how to crack the IR payload that comes from Pronto panels) using Python.

To my astonishment it turned out to be more reliable than the bona fide RFX9600! I mean, with RFX9600 I get "Command filed" once in a while (a dozen times a week give or take) and always thought that it mostly had to do with the inherent properties of WiFi (noise, occasional channel changes – my AP is set up to periodically look for less crowded channels, etc.) and unreliable nature of UDP.

But with Raspberry Pi version of the simulator it works quite differently – so far after a week or so I have not seen the dreaded "Command failed" on TSU9300 even once. Perhaps is has something to do with Pi’s faster CPU or faster network, I don’t know, but if it keeps being this reliable for some more time, I am seriously considering retiring the "real" RFX9600.

Yet I still need to control my older devices using IR. One option would be to either send IR metadata (like say, direct RC5/6 address/command, etc.) encoded as serial commands and then translate them to IR in the Pi since it has GPIO and can easily emit properly modulated IR sequences (and, of course, it can do power sense and relay control).

But first, I want to try and crack what panels send as IR payload to extenders in order to reuse the IR database.

Any pointers? Perhaps someone has done something similar before?

Thanks!

Last edited by tengizk on November 19, 2015 20:19.
Post 2 made on Thursday November 19, 2015 at 04:31
buzz
Super Member
Joined:
Posts:
May 2003
4,376
Start here: [Link: remotecentral.com]
OP | Post 3 made on Thursday November 19, 2015 at 18:31
tengizk
Long Time Member
Joined:
Posts:
September 2010
77
Thanks buzz, but I am beyond that already - the communication protocols work, panel happily sends everything to the emulator, serial gets processed and executed. But not the IR - I cannot parse the payload since I haven't figured out the wire format for it.

Last edited by tengizk on November 19, 2015 20:18.
Post 4 made on Friday November 20, 2015 at 08:15
buzz
Super Member
Joined:
Posts:
May 2003
4,376
I haven't messed with this, but it might be encrypted or in a not so common format such as base64. They had been protective about their IR code library.
Post 5 made on Friday November 20, 2015 at 20:12
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,996
Oh, the DB IR codes are definitely encrypted alright. In a form much like the Protected ProntoScript.

The first 4-6 bytes are not encrypted as the extender needs to know the format and the amount of time to send the IR code (Duration). However, the remainder of the data is.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 6 made on Friday November 20, 2015 at 23:47
buzz
Super Member
Joined:
Posts:
May 2003
4,376
Are learned IR codes encrypted? If not, a workaround would be to learn the codes required, rather than pull from the database. This would be an OK scheme for a one-off project where the devices seldom change.
Post 7 made on Saturday November 21, 2015 at 10:19
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,996
The Pronto Hex IR format for all formats except the FFFF raw learn is well documented both by Barry Gordon and Eigeny (Eugene) Eulanov. These docs are in the Classic Pronto Forum.

The issue is with the Raw Learn format and the ones that start with FFFF.

You will also have to dissect the 5000/6000 series of codes as these are RC5/RC6 and have toggle bits.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 8 made on Saturday November 21, 2015 at 13:41
buzz
Super Member
Joined:
Posts:
May 2003
4,376
Lyndel,

Are you saying that some IR transmissions to the RFX are encrypted while others are not?
Post 9 made on Tuesday November 24, 2015 at 01:13
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,996
I am saying that the Protected or DATABASE code is encrypted when read from the database and sent encrypted to the RFX which decrypts it. Therefore, any DATABASE code will not be able to be handled by software someone writes.


Note I am not screaming DATABASE, that's the way PEP2 displays it.

;-)
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 10 made on Tuesday March 1, 2016 at 11:59
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
I have not contributed here lately as I haven't been doing much Pronto development. I still have my Pronto's and they are my "remote of choice" for A/V. I just finished a little project that may be of interest to people on this forum.

I needed a reasonable way for all my Home Automation controllers (Pronto's, iPads, UDI ISY, Homeseer) to deal with IR. I built a two part solution. Part 1 runs under Windows (&, 8, 10) and will build IR timing files and Macro sequences for part 2 which I call the IR Proxy. Part 1, IR_Gen, takes as input protocol files in .irp format or in Pronto Hex format. It builds timing files for each command in the input for Global Cache devices, any of the GC devices that drive IR. Part 2 runs on a Raspberry Pi 2 and takes simple TCP/IP commands and provides feed back. It discovers all the GC devices and then just sits there waiting for a TCP command to request transmission of a IR pattern to a Global Cache.

As an example lets say I have a Global Cache device I call "house", and a timing file for a Cisco 4200 Set Top Box named STB. The following TCP command will be accepted: "DOIR House,1,STB,Select" and send a 'Select' command to the Cisco device connected on port 1 of the designated GC device. Similarly the TCP command "MACRO House,1,NBC" will send a predefined macro named NBC out port 1 of the House Global Cache.

The Proxy is very fast. it holds the data base for the Global cache in global cache format, while IR Gen maintains the input protocol data bases. Once the RPi is set up and running there is almost nothing to be done except restarting it when you change its IR Database.

I am up to the point of documenting the system, but am curious as to how much interest there is in such a system before I expend a lot of effort on documentation.
Post 11 made on Tuesday March 1, 2016 at 20:53
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,996
Barry, I am very interested in the code behind the irp to Global Cache conversion. One other thing I would be interested in is the ability to take a Pronto Hex String of data and convert to IRP format. i.e. A Pronto Hex to Global Cache converter that could be used realtime.

Another question. I think everything in your library is a one-shot IR command or do you have a way of using Smooth-Continuous IR on the Global Cache and if so, are you using the older GC100 or the new ITach devices.

If you'd like to discuss offline why I ask drop me a note and let me know when is a good time to talk.

Been a while since we talked. Will know more in a couple of weeks but a trip to FL might be possible soon.

Hope you are up for a good steak dinner.

Lyndel
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 12 made on Wednesday March 2, 2016 at 08:10
Dawn Gordon Luks
Founding Member
Joined:
Posts:
September 2001
1,178
Barry, that's pretty amazing.

There's another possibility for use with the Global Cache GC-IRE.

Control4 controllers used to have the ability to allow the use of 3rd party remotes via a built-in infrared target and internal Pronto hex codes. Over the past few years the hardware portion has been disabled and the only way to make it work is by using older controllers.

If you could write a Control4 driver that uses the GC-IRE, that would solve the problem, and our beloved Pronto's could be used with Control4.

BTW, I'm in Southeast Florida (Jupiter) and would love to get together with both you and Lyndel anytime. If you like, you can visit our showroom and play with all the toys. :-)
Post 13 made on Wednesday March 2, 2016 at 15:07
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
Lyndel, Pronto Hex string to .irp format is possible, but the file would then need some simple hand editing, but the basics are there. In my IRgen program I use an internal format which is just timing in microseconds and IR frequency in Hz. I can generate anything from that. Since it runs on a PC, it is written in VB6, but I am planning to convert it to vb.net We have a couple of really good steak houses in my area now, so just "Come on Down"

Dawn,

Jupiter is about a 60 to 90 minutes from my house, all Highway (I-95). I pass it periodically on my way to Boynton Beach where I have family. Unfortunately I have no knowledge regarding Control4. I'll try and remember to drop you a line when/if Lyndel makes it down here. You are welcome anytime.

My HA world is pretty stable now. The amazon Echo controls all the house lighting, The in-wall iPads and my iPhone provide easy status and manual control of everything. Most control, except for A/V, uses a UDI ISY to handle Insteon and Z-Wave devices. The Theateruses an Asrock PC that gets all its commands from any device controller (iPad, iPhone, Echo, Pronto) over TCP/IP. To render ripped Blurays I use either a Dune player or a Raspberry Pi running Kodi. There is a new RPi 3 out now that is amazing for $35.00. Fully compatible with older versions but a 1.25 Ghz process with IIRC four cores. I do all my RPi work now in Nodejs running asynchronous code in a headless configuration.
Post 14 made on Friday March 4, 2016 at 23:32
pgeraghty
Lurking Member
Joined:
Posts:
March 2016
1
But first, I want to try and crack what panels send as IR payload to extenders in order to reuse the IR database.

Any pointers? Perhaps someone has done something similar before?

As it happens, I've been working on exactly that this week. I've recently acquired a TSU9600 and want to route all of the commands and have any rules defined in another system (currently looking at OpenHAB) so that I'm not tied to always using the Pronto. I got the Pronto because I want the hard buttons, but sometimes it'll be nice to be able to use a phone/tablet.

I was going to hook up some IR LEDs to a Raspberry Pi and have that act as my IR extender, but my TSU9600 came bundled with an RFX9400 so I decided to see if there was any way to reuse that first. So pretty much the opposite of what you're doing, but I still need to understand the communications protocol and at least some of the IR payload format to be able to convert to it.

So far I've worked out
- How to gain telnet access to the RFX9400 and run the diagnostic software on there and dump packets
- The communications protocol used to send IR payloads to the RFX9400. Probably much the same as you've already worked out for serial on the RFX9600 except for the commands to continue and stop sending the code for long presses
- The format for the IR payload sent when a code is defined using the old Pronto HEX format in PEP. I understand this and the conversion process enough that I have a Java app that will take Sony Pronto HEX commands and successfuly send them to my TV via the RFX9400
- Today I've taken a code form my Sony remote learnt in PEP (so, starting with FFFF and very long) and have managed work out how this is encoded based on a modified understanding of the format of the converted codes.

Everything is documented, but given it's in the form of a log of the investigation process which is still ongoing it's not very concise.

This document, [Link: gist.github.com], describes

- telnet access
- diagnostic software
- an out of date description of the ECF format (this seems to be Philips' term for the codes starting with FFFF)
- process for converting Pronto HEX to ECF that is slightly wrong, but is close enough to work

A second document, [Link: gist.github.com]

- shows how to decode a learned code in ECF/FFFF format
- updates my description of the ECF format to be more generalised. I'm pretty confident this is more correct than the previous version but I haven't implemented and tested it yet

It's still a work in progress so I'd be interested in any corrections. I've only looked at 2 brands of remote so far so there is bound to be variations I have not seen. Hopefully it's enough for anyone else wanting to do something like this to get started though.

As others have noted there are also the protected database codes which start with EECF in the payload. I've really not paid much attention to them as I don't have any need for them myself. There are references to encryption keys in various binaries on the RFX9400 but I don't know how you might go about actually extracting them. Without those you won't be able to support protected database codes. I'm not sure if those are what you're wanting to re-use, or if they're codes you've added to the database yourself.


Pete
Post 15 made on Sunday March 13, 2016 at 13:25
Amherst
Lurking Member
Joined:
Posts:
February 2016
5
On March 1, 2016 at 11:59, Barry Gordon said...
I am up to the point of documenting the system, but am curious as to how much interest there is in such a system before I expend a lot of effort on documentation.

I would like to raise my hand in favor of documentation on this project. Thanks!
Page 1 of 2


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse