Serial control

Basic / Standard Reef Angel hardware
Post Reply
sickkick
Posts: 5
Joined: Sun Oct 02, 2011 3:50 pm

Serial control

Post 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.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Serial control

Post 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.
Roberto.
sickkick
Posts: 5
Joined: Sun Oct 02, 2011 3:50 pm

Re: Serial control

Post by sickkick »

OK, but can i control it serial hardwired(DB9 2,3,5) with out the WiFi adapter?
Last edited by sickkick on Sun Oct 02, 2011 4:00 pm, edited 1 time in total.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Serial control

Post 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.
Roberto.
Bryan
Posts: 147
Joined: Wed Jul 06, 2011 1:49 am
Location: Vancouver, B.C.

Re: Serial control

Post 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.
-=Bryan=-
sickkick
Posts: 5
Joined: Sun Oct 02, 2011 3:50 pm

Re: Serial control

Post 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
Last edited by sickkick on Mon Oct 03, 2011 7:02 am, edited 1 time in total.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Serial control

Post by rimai »

any one should work
Roberto.
sickkick
Posts: 5
Joined: Sun Oct 02, 2011 3:50 pm

Re: Serial control

Post by sickkick »

Also AMX has a voltage control card. would this work?
http://www.amx.com/products/NXC-VAI4.asp
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Serial control

Post by rimai »

I don't think that card would work for serial communication
Roberto.
sickkick
Posts: 5
Joined: Sun Oct 02, 2011 3:50 pm

Re: Serial control

Post 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;
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Serial control

Post 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.
Roberto.
Post Reply