View Full Version : Sending serial commands

July 17th, 2008, 12:04 PM
I am wondering if this is possible?
I am setting up a saltwater aquarium with a LED light system.
The LED's can be controlled individually with serial commands. Now I want to control intensity of the lights depending on the weather in my area (rain, cloudy etc).
I have a weather software that exports weather data in CSV format.

My question:
I know Girder can sent via a plugin serial commands but is it also possible that Girder would read the CSV file and depending on the field "weatherconditions" sent the appropiate serial command?

I know this might be difficult to understand but if you need more details to be able to help me out let me know.

Thanks for any help

July 17th, 2008, 02:07 PM
Unfortunately I do not have an answer to your question. I am interested on how you are controlling LEDs through serial commands!!!

Mark F
July 22nd, 2008, 04:39 PM
I just popped in while watching a Linux kernel compile ....

Using LUA, you can certainly program something to parse a CSV (Comma Separated Variables) file. Once parsed, the value or values you want should be in LUA variables and can be used to determine the commands you need to send through the serial plugin.

Some of the problems in doing this:
I don't know of an "off the shelf" LUA script that parses CSV files (you'd need to write this or convince someone lese to write it). Of course I only did a short google so you may be able to find something I didn't.

You need a serial plugin for your LED controller to be able to send commands to it. If you provide a URL to the command protocol, someone may help you here.

Somehow you need to convince Girder to start parsing the CSV file. I don't know if you want to schedule this every xx seconds or if the weather software can be convinced to trigger a girder event after it exports a new CSV file or if you need to set up a "file watcher" type of event.

July 22nd, 2008, 04:56 PM
Thanks for your reply.