Page 1 of 1

Serial control

Posted: Sun Oct 02, 2011 3:54 pm
by sickkick
Hello,

I was wondering if this unit could be controlled with serial communication? I currently have a AMX control system that controls the whole house and would like to send commands to reef controller via serial.

Re: Serial control

Posted: Sun Oct 02, 2011 3:57 pm
by rimai
Yes, the whole wifi protocol is based on serial commands.
You can read and write memory settings, override relays, change time and pretty much whatever your imagination takes you.

Re: Serial control

Posted: Sun Oct 02, 2011 3:57 pm
by sickkick
OK, but can i control it serial hardwired(DB9 2,3,5) with out the WiFi adapter?

Re: Serial control

Posted: Sun Oct 02, 2011 4:00 pm
by rimai
Yes, but you would need some sort of cable adapter to connect to your AMX system.
The RA serial port is a UART and uses TTL levels and not RS-232 levels, which means 0-5VDC signals.

Re: Serial control

Posted: Sun Oct 02, 2011 7:25 pm
by Bryan
Have been using my RA with serial, and like Roberto says, you need a Max232 or similar to convert the RA TTL to RS232 levels.. One caveat though, u will likely experience issues with your ph probe acting erratically. this is because a ground loop will exist between your PC and the RA.

Only work around is to isolate the lines (opto-isolate). Easiest way I found was use a Bluetooth Serial transmitter, about $15.00. Works great and similar to wireless.

Re: Serial control

Posted: Mon Oct 03, 2011 6:55 am
by sickkick
Will any MAX232 work or is there a certain one?
Also AMX has a voltage control card. would this work?
http://www.amx.com/products/NXC-VAI4.asp

Re: Serial control

Posted: Mon Oct 03, 2011 7:02 am
by rimai
any one should work

Re: Serial control

Posted: Mon Oct 03, 2011 7:03 am
by sickkick
Also AMX has a voltage control card. would this work?
http://www.amx.com/products/NXC-VAI4.asp

Re: Serial control

Posted: Mon Oct 03, 2011 7:05 am
by rimai
I don't think that card would work for serial communication

Re: Serial control

Posted: Tue Oct 04, 2011 8:08 am
by sickkick
Is there an ASCII protocol for serial Or would I have to create one? Also does the Controller send info out on serial when there is a change and one finial question, Can I poll the unit for its values? Essentially what I want to do is have my AMX system control and display the values from the controller.

EXP.

relay1=on;
ph=8.0;
h1=on;
h2=on;

Re: Serial control

Posted: Tue Oct 04, 2011 2:52 pm
by rimai
Yes, the entire wifi protocol is serial based.
You can just use it :)
Send "GET /r99" and you get back an XML data containing all the parameters and relay statuses.
You can also code it to have the controller send out data periodically.
The ReefAngel.WebBanner() sends out data for the web banners and you could just read and use.
So, it's up to you to decide either push or pull.