Reef Central Online Community

Reef Central Online Community (http://www.reefcentral.com/forums/index.php)
-   Do It Yourself (http://www.reefcentral.com/forums/forumdisplay.php?f=3)
-   -   Remote Screen for AC3 (WIN/MAC/*NIX) ::WIP:: (http://www.reefcentral.com/forums/showthread.php?t=1219081)

wizsmaster 10/01/2007 05:36 PM

Remote Screen for AC3 (WIN/MAC/*NIX) ::WIP::
 
Right now there are no commercial Plug & Play products out there for a remote screen for the Netpunes AquaController 3/PRO - so lets come up with something that works.

Our member/Mod on here JB NY has done some of the leg work, and come up with a WINDOWS solution.

I'm not trying to re-invent the wheel ... just make it work on platforms other than windows... so lets run with his idea & use his previous work as our foundation.



BTW - Thank You 'JB NY' - Great work so far!

wizsmaster 10/01/2007 05:37 PM

The following are what 'JB NY" has posted in his build thread - all credits go to him.

Quote:

<a href=showthread.php?s=&postid=10611043#post10611043 target=_blank>Originally posted</a> by JB NY
So here is something cool.

I finished setting up the wall mounted LCD screen for my tank. It pulls information about my tank and the fish room. I have it change from tank to room information every 3 seconds.

When everything is up and running. I get this screen.
http://www.cnidarianreef.com/G270/im...n/DSCN2257.JPG

Room stats are on this screen.
http://www.cnidarianreef.com/G270/im...n/DSCN2256.JPG

When I am doing maintenance (e.g. a water change) I have the heaters and chiller as well as a bunch of pumps turned off. When I am doing that I see this screen. This is to remind me to turn everything back on when I am done. :)
http://www.cnidarianreef.com/G270/im...n/DSCN2253.JPG

If something goes wrong and any alarm on the tank trips I get this screen.
http://www.cnidarianreef.com/G270/im...n/DSCN2254.JPG

Pretty slick, eh?


wizsmaster 10/01/2007 05:48 PM

Some Resources I have gathered for this project:
=============================
LCD Screen:
http://www.crystalfontz.com/products/634usb/index.html

Windows Based Software:
http://www.crystalfontz.com/forum/showthread.php?t=5384

FTDI - Virtual Com Drivers (WIN/*NIX/MAC):
http://www.ftdichip.com/Drivers/VCP.htm

LCDproc (*NIX/MAC):
http://www.lcdproc.org

Install/User Guide for LCDproc:
http://lcdproc.sourceforge.net/docs/current-user.html

GrowlLCDproc:
http://home.sandiego.edu/~epooch/cgi....cgi/tech/leds

Growl:
http://www.growl.info
*** DO NOT ISTALL GROWL 1.1.1 - go with GROWL 0.7.6 - "GrowlLCDproc" has NOT been updated for 1.1.1 yet***

*NIX USB Kernel patch - For Crystal Fontz USB LCD's
http://www.webbastards.com/projects/...CF632-USB.html


=======================================



In order to compile LCDproc - You will need a C compiler on OS X - Pull out your OS X Install CD, and install X TOOLS - that will give you a valid c compiler.

wizsmaster 10/01/2007 09:44 PM

Progress for today:

1. Install FTDI VCD

I had Hardware Monitor installed - and was able to make it work together - was able to output sensor data of the mac to the LCD
So far so good...

2. Install X TOOLS 2
3. Install LCDproc
(Growl was already installed)
4. Install GrowlLCDproc
5. Configured the LCDd.conf
6. Tried to start LCDd - (FAILED)

It will not connect to the "tty.usbserial-CF002626" device ... (i'm getting the "tty.usbserial-CF002626" out of /dev)


This is the main section of the config for the LCDd.conf:

Code:

## CrystalFontz driver (for CF632 & CF634) ##
[CFontz]

# Select the output device to use [default: /dev/lcd]
#Device=/dev/ttyS0
Device=tty.usbserial-CF002626

# Select the LCD size [default: 20x4]
Size=20x4

# Set the initial contrast [default: 560; legal: 0 - 1000]
Contrast=350

# Set the initial brightness [default: 1000; legal: 0 - 1000]
Brightness=1000

# Set the initial off-brightness [default: 0; legal: 0 - 1000]
# This value is used when the display is normally
# switched off in case LCDd is inactive
OffBrightness=0

# Set the communication speed [default: 9600; legal: 1200, 2400, 9600, 19200 or 115200]
#Speed=9600
Speed=19200
# Set the firmware version (New means >= 2.0) [default: no; legal: yes, no]
NewFirmware=yes

# Reinitialize the LCD's BIOS [default: no; legal: yes, no]
# normally you shouldn't need this
Reboot=no


wizsmaster 10/01/2007 10:38 PM

OK - i found my issue for why LCDproc wasn't working ... i forgot to add the /dev/ path to the device

now it starts, but i get nothing at the LCD.

wizsmaster 10/01/2007 11:32 PM

I have the LCDproc semi-working, there is still an issue somewhere.

The LCD screen doesn't get any new info ... and in the console i get error messages

root# /usr/local/sbin/LCDd

sock_send: socket write error
sock_send: socket write error
error: huh? Invalid screen id
error: huh? Unknown screen id
error: huh? Screen already exists


that is what happens when i try to put some text through growl/GrowlLCDproc towards LCDproc.

Out for the night.

--marco

JB NY 10/02/2007 09:31 AM

How to Create a remote LCD for the AC3 (Windows)
 
I was going to create a new thread but since Marco already has this thread. I hope he does not mind me posting how I do this on the windows platform.

First you need the LCD screen. The one I am using is from CrystalFontz. http://www.crystalfontz.com you need the LCD.I am using the USB LCD available here

http://www.crystalfontz.com/products/634usb/index.html

The unit I am using is the CFA634-TMC-KU but any on that page will work. Also you need to buy their USB connector WRUSBY03.

You will also need their USB drivers

http://www.crystalfontz.com/forum/showthread.php?t=5301

and their software available here

http://www.crystalfontz.com/forum/showthread.php?t=5384

Once you have that installed and working, you need to get the data from the AC3 to the LCD screen. Unfortunately the CrystalControl2 software, while allowing you to pull info directly from a website, does not support websites that require a username/password to view. So we need to find an alternate solution.

I run a lot of home automation, as well as scripting on my server. So I found it easier to just create a script that pulls all the data I need into an ini file. Once the ini file has data, it is pretty easy to have the CrystalControl2 software read the file. So here is what you need to do.

Download this file.

http://www.cnidarianreef.com/bin/AC_Script.zip

It consists of 3 files.

ACGD.exe is the main script compiled to an exe. I re-wrote for it for public consumption and tried to make it user friendly. It logs everything that happens as well as should error out correctly if there is a problem.

ACGD.ini is the ini file used by the program. Put in the IP addy of the AC3 as well as the username and password for the controller. Also put in the timer name you are using for the Alarm.

ACTank.txt is were the script dumps the values from the AC. This is what the CrystalControl2 software uses to read the data and display it on the screen.

So take those files and put them into a directory. Open the ini file and put in values for your AquaController.

Then run the ACGD program. If everything works correctly it should only take about 2-3 seconds. If not, it should time out in about 60 seconds, check the log file that is created in the dir you ran the program and see what the error was.

Assuming it runs correctly, check out the ACTank.txt, it should now contain the vales form your AC.

Now that you have data from your AC3 in a file, the next part is to set up the Crystal Control Software to read the txt file. I'll cover that in my next post.

I am sure there are other ways to get the data from the AC3, but this worked the easiest for me.

Sparkss 10/02/2007 09:58 AM

I know that this is not within scope for your current project, but have you also looked into adding control fucntionality to your remote screen, either in the form of buttons or upgrading to a touch screen of sorts ? IE: to enable feed mode, turn lights on/off, etc ? We don't have an AC3 yet (just an AC Jr at this time), but plan to upgrade eventually. Since we have an in wall it is harder to get to the fish room to monitor and/or turn things on/off. I have not really looked into this at all yet, so there may already be a solution out there. I also thought about using the digital inputs (24 or so of them on an AC3 with break out boxes, right ?) And hooking switches to those inputs and then program each switch, but that could get rather cluttered (potentially). Anyways, I was just curious if you had thought about adding the remote control capabilities to your remote screen. (this question to either of you :)).

Thanks.

JB NY 10/02/2007 10:12 AM

I can't do it on this screen as it does not support touch. But I have already done this with RF remotes and X10 like (Insteon) keypads.

Right now, through keypads and RF remotes. I can do anything you can do through the web interface, including turning on Feed Mode.

8BALL_99 10/02/2007 10:13 AM

Sparkss. FWIW I have a Equipment room behind my tanks.. They are kind of inwall.. They are set into the wall so you cant get to the back of them inless you are in the equipment room.. I ran the cables through the wall and mounted my AC3 in the display room.. I have overide switches in my Equipment room for the stuff on the DC8s.. Not a great pic but you can see the AC3 on between the tanks.. Might be an option for you.. Would for sure save you some $$.. A touch screen would be sweet though..
http://pic14.picturetrail.com/VOL514.../269971078.jpg

Double-J 10/02/2007 10:19 AM

Awesome guys!
JBNY- I connected to the controller, but then when I look at the ACTank.txt its doesn't show all the values. I'm using an ACIII with 3 PX1000's so I have a few PH probes, ORP Probes, and Temp probes.

Also I have a Matrix Orbital LCD screen and I'm using LCDC program. I tried to use the crystalfontz program but I can't connect thru it, I'm guessing it doen't matter which program you use, the plugins should be the same right?

Thanks guys, this should be an interesting thread

JB NY 10/02/2007 10:29 AM

Quote:

<a href=showthread.php?s=&postid=10886666#post10886666 target=_blank>Originally posted</a> by tinytool
Awesome guys!
JBNY- I connected to the controller, but then when I look at the ACTank.txt its doesn't show all the values. I'm using an ACIII with 3 PX1000's so I have a few PH probes, ORP Probes, and Temp probes.

Is it at least working with the basic. Temp, pH and ORP?

Double-J 10/02/2007 10:43 AM

Yup it's polling, but here is what I'm talking about.

10/2/2007 11:37:37 AM ***log file started***
10/2/2007 11:37:37 AM ini file found.
10/2/2007 11:37:37 AM Logging into AC at IP 192.168.1.105
10/2/2007 11:37:38 AM Successfully logged into AquaController.
10/2/2007 11:37:38 AM Polling AquaController.
10/2/2007 11:37:39 AM Successfully Polled AquaController.
10/2/2007 11:37:39 AM Successfully terminated connection to Aquacontroller.
10/2/2007 11:37:39 AM Checking AC data for consistancy.
10/2/2007 11:37:39 AM Parsing data
10/2/2007 11:37:39 AM Finished Parsing data. Writing results.
10/2/2007 11:37:39 AM ***Log file closed***


[READINGS]
STAT=NORMAL
TEMP=nd
PH=79.8
ORP=8.12

wizsmaster 10/02/2007 10:48 AM

Re: How to Create a remote LCD for the AC3 (Windows)
 
Quote:

<a href=showthread.php?s=&postid=10886347#post10886347 target=_blank>Originally posted</a> by JB NY
I was going to create a new thread but since Marco already has this thread. I hope he does not mind me posting how I do this on the windows platform.

Nope, I do not mind - Thank You for posting your work up in here!
I will work on it tonight - have to make a few runs for work now.

Sparkss 10/02/2007 10:55 AM

Quote:

<a href=showthread.php?s=&postid=10886614#post10886614 target=_blank>Originally posted</a> by JB NY
Right now, through keypads and RF remotes. I can do anything you can do through the web interface, including turning on Feed Mode.
That is exactly what I was wanting to hear. Thanks. Do you have a thread chronicling that automation ?


8BALL_99
Great idea, thanks for the tip :)

JB NY 10/02/2007 11:28 AM

Quote:

<a href=showthread.php?s=&postid=10886868#post10886868 target=_blank>Originally posted</a> by tinytool
Yup it's polling, but here is what I'm talking about.

I think the data comes out different if you have a PX1000 hooked into the AC3.

Can you telnet to the AC3, type c and capture the results and post it or email it to me? Then I can see what is going on.

manderx 10/02/2007 11:29 AM

once i have the time, i am going to do this with a PDA (i do pda programming for work and have a stack of old ones laying here collecting dust). that way it can do everything all by itself without needing a PC to drive it. and with it's touchscreen, even control the AC3. plus it would also give me the exact same remote access from another pda anywhere it's got wifi.

i was initially going to go so far as to do *all* my AC3 programming inside it for a far more flexible language, timers down to the second (for controlling dosing pumps), day-of-week control, and timer status logs without aquanotes, but i just don't trust it enough to be reliable 24/7 for long periods of time, so i'll just have short-term controls on it like feed mode/lighting overrides/...

melev 10/02/2007 11:37 AM

And when you figure that out, let me know manderx. :D :D :D

wizsmaster 10/02/2007 11:37 AM

Tried it briefly - It didn't work for me Joe - I have 1 (one) PX1000 as well.

My VPN at home must have gone down after i left the house ... now i cannot access my home network to get into the AC3. I will send you a capture tonight.


thanks,

marco

wizsmaster 10/02/2007 11:41 AM

Also, any chance that you could post up the saved "screen" file for CrystalControl2 ? or give directions on how to add the variables you posted up into CrystalControl2.

Thanks again & Great work!

marco

JB NY 10/02/2007 11:42 AM

I don't use a PX1000. The output is different with them. If I can capture the output I can fix the problem for you.

JB NY 10/02/2007 11:45 AM

Quote:

<a href=showthread.php?s=&postid=10887211#post10887211 target=_blank>Originally posted</a> by manderx
but i just don't trust it enough to be reliable 24/7 for long periods of time, so i'll just have short-term controls on it like feed mode/lighting overrides/...
That's what I decieded to do as well. Everytime I thought I was good for 24/7, some little thing would error out or not fire at the right time. Now I just use it for overides and it works great.

Double-J 10/02/2007 11:50 AM

I think this is what you wanted:

<img src="http://www.shallowreef.com/display_image.php?id=372">

JB NY 10/02/2007 12:24 PM

OK I have to find a way to deal with many PX1000.

I modified the script so it should at least correctly pull the pH temp and ORP from the AC3. Please download it again and see if you at least get those three readings.

If you look in the ini file you will see that I have added a section call PX1000. right now it is set to 0 but the idea is to be able to add the amount of px1000 that you have and it will just pull that info out for you.

Double-J 10/02/2007 12:29 PM

I just downloaded again and didn't notice any change to the ini file. Came up with the same error.


All times are GMT -6. The time now is 07:08 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.