Software Development for Control Panels rooms for Windows PADs – Source Code
Smart Home , intelligent Building eHouse – Software development panel discussion of the source code .
This article is another part of the description of software for touch panels Home Automation , Building Automation eHouse , Windows-based .
Earlier articles on this topic: Smart House eHouse – Delphi Library to create their own software for Windows
Description of the main features of the application :
procedure outputbuttonnames(index: integer) ;
//The function reads the name of the digital outputs RoomManager , Program names and the names of measuring inputs of the system configuration .
Saves the configuration directory “%RemoteEhouseDir%\panels\” if there is a default configuration file for the RoomManager creates it with the name and extension RoomManager ‘.txt’.
Files for the control panel are created based on the file extension of the default and have the name as the computer name in windows system.
To remove unused buttons ( outputs and programs) , measuring inputs , programs of the form ( or to limit the authority ) , should be the default file or for the panel to replace the field name blank line (keeping the line numbering) .
In this file are important analog sensor type setting (in square brackets)
[%] Percentage in relation to the supply voltage controller
[C] temperature value ( by default all sensors except the first )
[-%] Reversed a percentage of 100%-X as the ambient light sensor ( sensor 1 by default )
For other connecting analog sensors (to be taken into account is the default file by changing the default settings ) .
procedure TForm1.Program1Click(Sender:TObject) ;
The event handler ” OnClick ” for all virtual buttons for running programs .
Recognizes the key number ( from the group of program changes ) , that has been selected and placed the event start the selected program in the event queue .
procedure TForm1.output1Click(Sender: TObject ) ;
The event handler “OnClick” for all virtual buttons to change the status of the outputs .
Recognizes the key number ( from group to change output status ) , that has been selected and placed the state change event given output event queue on the server eHouse .
procedure RunEvent(eventcode,arg1,arg2,arg3,arg4,Arg5:integer ; str: string) ;
The function writes an event to the queue on the server system eHouse . The parameters given event code for direct mode :
event code , event arguments , description of the information to the log .
procedure update_panel ;
The function updates the contents of the panel – analog measurements and output states (colors virtual buttons ) .
Must be run periodically just for function ” update_status ” ( updating the status of the driver from the server PC eHouse ) .
microprocessor controllers eHouse
home automation manufacturer
room Controller – lighting and heating in rooms .