Paludarium software – Need a little help here!

The old Paludarium had a kind of down-to-basics way it was controlled. It did have an application server and a webserver, but everything was very much in “nineties style”. Now I am planning to modernize everything. I want an INTERACTIVE website. An iPhone app. You name it. And I need your help – I know a lot about C and assembly, but java? REST? Spring? I wish I knew more!

How the old system works

The old system was quite simple, and as a result it worked perfectly. But also, it had a lot of limitations: No buttons on the website. No configurable graphs on the website. No search, no preview of tomorrow or look back to yesterday. This is a schematic of how it all ticked::

The logic diagram of how the hard- and software worked together in Paludarium 1.0

The left-side of this graph contains all parts built into the paludarium: Multiple microcontrollers (Atmel AVR series). They control all the hardware components like leds, RGB-leds, underwater lighting, fans, rainpump and mistmaker. Optional (but not yet built) I can add microcontrollers that are able to send measured values as well.

All of these microcontrollers are controlled via a serial link. All controllers are connected to that one RS232 linkup. Via addressing in the packets over this link the controllers know if the packet is for them or not. These packets originate from the application server. This server talks through ethernet to an ethernet-to-RS232 converter. This allows me to have the application server far far away. The “artemis.exe” application actually talks to a virtual RS232 port. This virtual port stretches RS232 over ethernet to the actual paludarium.

The “artemis.exe” application does it all. It times the time, it sends out commands to make it rain, thunderstorm, adjust lighting to dusk, dawn and midday light. Every 30 minutes all controllers get their new values to execute. After that, the controllers are self contained in regulating towards the new setpoint.

The application also produces JPGs and text files; these are simply written to the webserver. The webserver in its turn runs a very simple website that simply displays the JPGs and text files that were produced from the “artemis.exe” application.

What I miss in version 1.0

So what is missing from this application? For one, buttons. I would LOVE to have a button that says “thunderstorm NOW”. Or maybe “STOP raining NOW”. And so on. Also, I would love to have radio buttons that determine which lines are shown on the graph and which are hidden. While I’m at it, I would also like to be able to set times and dates to show on the graph. So maybe a dropdown menu that contains “today, yesterday, tomorrow, past 3 days, past month and custom”.

Ultimately, an app to control and watch over this all via the internet. That would be the coolest.

How to make this a reality?

I realize I need to do things differently if I want to implement all the stuff described above. I need something smarter, a different way of thinking. Maybe a separate database server that contains the recorded weather values, as well as the measured ones. A website should be able to use buttons and display graphs from that database quite easily. Also, the application server should have no trouble inserting new measurements from the paludarium (temperature, relative moisture) into that same database…

The application will have to be able to have buttons. If I click such a button, I’d have to have some way of talking to the application server. The application server in its turn could talk over its virtual RS232 channel to the hardware and make it real. But how to work all this? I know a lot about C and assembly programming, but too little on new things like REST, java and something like frameworks (Spring?).

Need a little help

I need a little help here. Not in implementing (I can read and learn), but in the global architecture to build that will accomplish all that I am looking for. It would make sense to give the website a REST interface, so that an app can easily talk to the website and though to the application. But how to build the website – application link? I am thinking around building the application completely into Java – inluding timing and talking to a (virtual) RS232 serial port. But is that even possible? And if so, can I also build a webserver inside the Java app that will deliver the website and read its buttons/REST stuff?

If you have some knowledge on this, you may spot some errors in the part above. I am looking for input from people who understand modern application building (preferably using frameworks like Spring).

If anyone has ideas on how to go about and build this, please respond to this blog post!

Leave a Reply

Your email address will not be published. Required fields are marked *

ERROR: si-captcha.php plugin: GD image support not detected in PHP!

Contact your web host and ask them to enable GD image support for PHP.

ERROR: si-captcha.php plugin: imagepng function not detected in PHP!

Contact your web host and ask them to enable imagepng for PHP.