[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby code to control Russound CAV6.6

Gavin Kistner

7/17/2006 7:59:00 PM

I'm (finally) starting to set up my home for automated electronics. The
first bit I'm working on will be for the Russound CAV6.6, though
(looking at their various API documents) it should be largely
applicable to various RS-232-controlled devices from Russound.

Is anyone interested in controlling this product, or other Russound
products, using Ruby code? If so, please let me know. I'm trying to
decide between hacking together what I need versus writing a flexible
library that others may use.

2 Answers

Suraj Kurapati

7/17/2006 9:01:00 PM

0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Phrogz wrote:
> I'm (finally) starting to set up my home for automated electronics. The
> first bit I'm working on will be for the Russound CAV6.6, though
> (looking at their various API documents) it should be largely
> applicable to various RS-232-controlled devices from Russound.

Last time I checked, there wasn't any (usable) serial-port extension
for Ruby. Thus, how are you planning to have Ruby communicate via
RS-232?

> Is anyone interested in controlling this product, or other Russound
> products, using Ruby code? If so, please let me know. I'm trying to
> decide between hacking together what I need versus writing a flexible
> library that others may use.

The library, it seems to me, would simply be an extension/relative
of the IO class which keeps state information about the particular
Russound device being controlled, correct?

If so, you'd probably hacking in this direction anyway, so get
something working first and then integrate your work into a library.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEu/otmV9O7RYnKMcRAmeOAKCzANYCF6P694YXnIF0PNxvitv7FwCgmwsp
g/R3rVywteJLjao6yoSOgNM=
=mjk4
-----END PGP SIGNATURE-----

Gavin Kistner

7/18/2006 12:03:00 AM

0

Suraj N. Kurapati wrote:
> Last time I checked, there wasn't any (usable) serial-port extension
> for Ruby. Thus, how are you planning to have Ruby communicate via
> RS-232?

Like this:
http://groups.google.com/group/comp.lang.ruby/browse_frm/thread/21d9ef82f56346a/1f72a79dd9760dc1?q=serial&rnum=1#1f72a7...


> The library, it seems to me, would simply be an extension/relative
> of the IO class which keeps state information about the particular
> Russound device being controlled, correct?

Well, the Russound API has specific packet formats it uses. In addition
to wrapping up common commands (volume=, zone_source=, allon, alloff),
the library does stuff like forming the packets for you, which includes
calculating the checksum according to russound's algorithm, inverting
high-order bytes and injecting special markers, and so on.

It will use a derivative of IO for the actual communication, but
there's some higher-level niceties planned and in the works.