I have started migrating content to my Hugo blog at https://blog.cavelab.dev, already migrated pages will redirect there.
Serial client (SIOS)
This application was primarily used in the rack box project — which was terminated when I moved out of my first apartment.
Serial Client connects to Serial Server, which sends status and commands to the client. Some of these commands have already been processed by Serial Server, so the client only needs to update the GUI. This is true for e.g. analogue values. When a command is sent from Serial Client, it's processed and sent to the correct serial module by Serial Server. The connection between server and client is done using sockets and log files.
Version 1.x of Serial Server was written in Visual Basic and had to run as a program on the client computer. This meant that on a random computer you had to download the software, install and then run it. Not a practical solution. The program has a number of bugs and major difficulties buffering the data from Serial Server. Graphically it was impossible to make a fancy GUI.
Serial Client 2.x was written in Flash, with this follows numerous new possibility's. First the application can be launched in any web browser, without any form of installation. Second; it is possible to make a really sweet GUI, and presenting the data in an easy readably fashion for the user. And third; Flash proved itself to be very good at buffering the data sent over the tcp socket. And there is the option of animations, to make it really sweet.
In version 2.1 live video feed and voice were added. A CCD camera mounted in the living room, connected to the computer via a TV input card, takes a picture every third second. This image is then uploaded to the web server and shown in Serial Client. If a alarm situation should occur a female voice will inform about the situation, if a serial module should go offline the serial number of the module is also spoken.
Serial Client 3.0 is written in actionscript (Flash). This allows it to be used in every internet browser, and over the internet. Serial Client is the front-end of the Serial I/O system, it allows the user to interact with the system and see actual events, temperature etc. The outputs are used to interact with other modules, this allows the manual interactions to work even when the computer is turned off. When a command is sent an input will verify that the command has been carried out, securing real-time control.
A CCD camera mounted in the living room, connected to the computer via a TV input card, takes a picture every third second. This image is then uploaded to the web server and shown in Serial Client. If a alarm situation should occur a female voice will inform about the situation, if a serial module should go offline the serial number of the module is also spoken.
The GUI is divided into six different parts:
- Controlling everyday things like lighting, doors etc.
- System related information, like Rack box information, voltages, and emergency shutdown.
- A picture of my apartment, updated every 2 seconds. The camera is connected to my computer.
- Various system alarms, like power/fuse failure, timeouts, etc.
- A time stamped record of events.
- Shows module status and a small communication log, has the connect and refresh buttons.
In the latest Flash version the socket system has been changed. A request file is now required by the client, without this the login will fail. My Serial Client does not have this, so it doesn't work with the latest Flash version. In version 3.1 this would be implemented, but version 3.1 was never finished.
Serial Client is the front-end of the Serial I/O system, it allows the user to interact with the system and see actual events, temperature etc. When a command is sent an input will verify that the command has been carried out, securing real-time control.
Serial Client 4.0 is written in PHP and HTML with CSS layout. This allows it to be used in every internet browser, and over the internet. But unlike Flash, used in Serial Client 2.x and 3.x, it does not require a direct socket connection. Such a connection is often impossible when behind a proxy, like in schools, library's, etc. Not requiring a socket connection makes the system operate entirely through port 80, thus working everywhere.
The states and values for all I/Os are gathered from log files generated by Serial Server, these files are located on a Windows computer. Samba is used for accessing the files from my Linux web server. The web page is updated every 10. second, making it pretty much real-time. Output commands are sent using the PHP command: shell_exec("echo $command | netcat serialserver_ip port");
All states and values are loaded into arrays, indexed by the I/O number. The reference is looked up in a database to find the correlating I/O, and then displayed using LED pictures or raw analog value. Every analog value, shown in the left navigation box, is linked back to the corresponding mrtg grahp, making it easy to display the value history. Historical data for the digital I/Os is gathered by parsing the main log file into a MySQL database periodically. The history presented to the user, from the database, is only as real-time as the periodical interval.
The right navigation box is used for listing situations such as: alarms, signals, modes, etc. The use of listing is very useful being that all the irrelevant information is hidden. There is no use for a list of possible alarms, only the alarms that are actually triggered. The main content is divided in two categories; control and system. Inputs and outputs are mixed, but only outputs are links.
A simpler version, is available for mobile devices. This page has the same control and information, but without the frames and links. It used the same backbone as the regular website, and is accessible on the net using WAP. This makes it possible to change and check states from wherever your cell phone works, a truly wireless system.