eHouse smart home decode controller status

eHouse Intelligent Building decoding CommManager status – Delphi source code

Smart Home , intelligent Building eHouse – Data format CommManager status in binary code .
CommManager Is microprocessor controller of eHouse system , which performs communication functions and is the gateway to the world based installation system drivers eHouse version 1 (RS-485 ) . It allows you to dispense with your PC while maintaining high functionality (standard built-in drivers). In addition replaces the version of ExternalManager eHouse 1 and 3 InputExtender , acting fully functional driver blinds , gates and awnings , enabling the integrated alarm control by SMS or LAN . It also has a built-in SMS notification of alarms – The Rollers , Gates, Gateways Driver Automation This controller make hybrid version of system ( eHouse 1 under the supervision of CommManager ) collects all the statuses of RoomManager ( control lighting and heating , Audio , video – control rooms ) And HeatManager ( boiler controller , recovery , Automation of green energy sources ) And forwards them to the control panels over TCP/IP.

In addition, allows you to send these statuses in the form of broadcast UDP to all devices on the LAN , allowing for connectionless link and the and sending output states , inputs and measurements status of eHouse system by any number of control and visualization panels . This kind of broadcast does not involve additional processor and network utilization of CommManager , no matter how much the panels receives the above data.
In addition to the data received from the eHouse 1 controllers ( working on RS485 ) , CommManager attach its current status, which is the state of the alarm system.

Although the status may be sent both TCP/IP and UDP in the same form, we will only broadcast UDP , due to the lack of need to log in to the driver and increase the Controller CPU load. Connectivity over TCP/IP and socket free servers, leave yourself space for mobile clients , working outside the LAN – Internet ( Smartphones , GSM phones, PADs ) , because the use of UDP, via Internet can be difficult and involves a lot of errors, preventing correct decoding status , due to the low quality, speed of the links, and the lack of confirmation mechanism and repetitions of UDP session .

To do this in Delphi in ready to use template control panel that was discussed earlier in posts : smart home ehouse , source code control panels for tablet working on Windows XP , Vista , 7
Capability to receive data change of binary status by adding support UDP CommManager

procedure TForm1.binaryDataReceived (Sender: TComponent ;
NumberBytes : Integer ; FromIP : String ; Port : Integer) ;
var C : array [ 0..1024 ] of char ;
Mystree : TMemoryStream ;
numberb : integer ;
if filesystem_status then exit ; // only when UDP is active
Mystree : = TMemoryStream.create ;
binary.ReadStream ( Mystree ) ;
numberb : = NumberBytes ;
if numberb > 1023 then numberb : = 1023; // limiting number of bytes received – we cut to the size of the data buffer
Mystree.Read ( C[0] , numberb ) ;
set_rm ( C , 1 ) ; // decode ehouse 1 controllers status – decode the status of drivers RM , HM
set_status_commmanager ( C , 0 , 254) ; // decode commanager controller status – decode status CommManager
Test_save ; // test save data to text files for each RM , HM – save for test results to a text file for all the drivers eHouse 1 (RM , HM )
Test_save_eth ; // test save data to text file for CommManager and each Ethernet Controller – save for test results to a text file for CommManager and all the drivers EtherneteHouse
update_panel ; // update date panel for selected controller – updating the data controller panel
end ; :

Complete realization of the process of decoding the frame status for CommManager and other drivers eHouse Ethernet performs the procedure

set_status_commmanager ( C , 0 , 254) ; // parameter give the name and address of the data buffer controller (the last two components of the IP address) .

This procedure performs the decoding of the binary status of the frame and then loads the decoded data to record the Ethernet controller which is an instance of a record ” ethernet_rm_hm_cm_lm ” named ” ethrm ” . The index is searched automatically linked to the IP address contained in the status .

This allows us to :

  • direct analysis of the data of all drivers
  • create your own algorithms depending on the status of the outputs , input , measurements
  • execution of dedicated control systems analyze any number of parameters found with the system
  • log analyzer software development and system status eHouse
  • software allows the calculation of energy consumption
  • allows the execution of individual control panels and visualize all drivers based on a predefined template
  • no need for knowledge of the ways of communication and data frames
  • writing high-level software (a few lines of source code ) through the implementation of the system software libraries eHouse .