eHouse Intelligent Building – programming Delphi

Intelligent Building eHouse Software Development for Windows – The Basics

Smart Home eHouse . High-level programming using Windows software package eHouse.

Automation eHouse can be further software , using programs ” overlay ” running parallel to the smart home software eHouse in non colliding of the way .

Examples will be in the programming language Delphi 5 ( Pascal ) , to be able to use the free version of this software already for amateurs and for the home.
Professionals and Developers , especially having licenses for newer versions of Delphi can of course use the newer and richer version, or rewrite examples in other programming languages ​​like C++ , C# etc..

High level programming for eHouse system involves the creation of home control software without interfering with the transmission protocols and communication drivers using existing software eHouse. This will ensure correct operation of such a solution, even in the case of major changes the transmission protocols and transmission medium.

EHouse software package (application eHouse.exe ) provides , inter alia:

  • Monitoring of external applications that interact with the system (configuration in the directory “%EHOUSE_DIR%\exec\” ) Especially KillEhouse.exe
  • Updates the data and status outputs, input, measurement inputs of all electronic controllers
  • Creates text logs directory “%EHOUSE_DIR%\logs\”
  • Creates a tags file enabled inputs and outputs according to the numbers assigned names when configuring the controller , output , input , etc.
  • Periodically checks the queue of events to be sent to drivers “%EHOUSE_DIR%\emails\” in a text file

Application ( KillEhouse.exe ) enables you to:

  • monitoring other applications of eHouse system (configuration in the directory “%EHOUSE_DIR\killexec\” )
  • Force application for timeout , suspension , lack of response by the programmed time
  • KillEhouse application can be monitored by “eHouse.exe” , to ensure the continuous operation of the system under the supervision of eHouse PC

application Monitoring , stability and continuity of the work of software

The software package has built-in eHouse software Watch Dog Timer ( WDT ) to monitor the work of all applications and continuity of communication with drivers .

Configuration files for the Watch Dog Timer (WDT) must have the extension “.runs” to be read by eHouse applications .
Configuration File Format “*.runs” application eHouse.Exe and KillEhouse.exe is as follows:

Example for eHouse.exe checking updates –
microprocessor controller called ” Salon ” :

eHouse Manager Application name in Task Manager windows
ehouse.exe File name of the program . It must be in the directory “%EHOUSE_DIR%\bin\”
/ne /nr /nt /nd The parameters on the command line application
100000 Maximum operating time
120 Maximum inactivity time of application
c:\eHouse\logs\salon.txt File name checked (change the recording date – indicating the correct operation of the application )
empty – future applications
empty – future applications
empty – future applications
empty – future applications
empty – future applications
empty – future applications
empty – future applications
empty – future applications
empty – future applications

Sending events to eHouse system microprocessor controllers – run commands

Key events in the system for each driver are exported to the directory “%EHOUSE_DIR%\AllEvents\” formatted text files .

Event to run stored in a text file , simply copy the system event queue eHouse , or directory “%EHOUSE_DIR%\emails\” .

Filename events in this directory for information includes the name microprocessor controller or equipment, and the event name . This name is generated by replacing Polish regional basic ASCII characters and is only relevant information .

The file extension must be “.run” that it was captured from the event queue after copying . File contents do not change , because it has a specific format and in case of incorrect event record , they will be removed or result in system instability and . It is best to copy the event file rather than create it themselves in the event queue directory .
The contents of this file is: Salon ; Lighting Central 2 where Salon – driver name RoomManager – to
Lighting Control and
heating devices room

Lighting Central 2

The separator between the device name and the name of the event is a semicolon and a space ” ; ”

Other examples of file contents :

Salon ; IR (Video – PLAY)
// launch event to send the learned IR code for the VCR to rewind

Salon ; program 2
// run the program number 2 driver living room

It is a very simple way to start the basic event for controllers by simply copying .

Starting more complex events is to create a file with the following format (direct events):

Event List mode “Direct Event” is , for example, in the catalog “%EHOUSE_DIR%\Mobile\”.
The files with the extension “.TXT” is the name of the event , a “.DXT” event code direct hexadecimal.

Create events in the queue should be done as soon as possible , not to disturb the normal operation of the application eHouse and attempts to read is not the end of the saved file .

intelligent Building