eHouse 1 – Home Automation – controller states in binary form

eHouse Home Automation , Building Management version 1 – frame of system controller status Home Automation .

To Create a fully functional, efficient own software for control panels that require visualization need to implement direct decoding eHouse 1 driver status in binary form .

Depending on the choice of the normal operating mode or extended address (Extended_address) , frame to send the status of the driver is as follows (in brackets marked difference in extended mode address) .

This mode is required to work under the supervision of CommManager driver and sends the message destination address outside events , Own address to the destination device can tell the sender to receive events (hand – shake) .

If the interface rs-485 definitely not recommend direct attempts to connect to the driver , as sending some commands may cause such cleaning program memory (firmware) Controllers which could end their life .

Other commands or random signals in RS-485 may undermine the stability of the system or definitely slow down his work.

Native eHouse Automation Controllers should work under the supervision of producer application “eHouse.exe”.

For security, you can read the status of drivers without connecting to them through the application eHouse.Exe (UDP protocol and LAN).

This is non-invasive reading, not loading neither software nor controllers , and what is more, not intrusive in any way transfer protocol via RS-485 .

The situation is different when eHouse_1 controllers work under the supervision of CommManager .

CommManager controller can send status (eHouse 1 and CommManager in an integrated package), the UDP LAN and access to this data is connectionless and non-invasive as well as directly from CommManager or other Ethernet Ehouse controllers.

Receiving data over UDP status we can not harm drivers , and a maximum of incoming data misinterpret .

EHouse system not to send anything to the UDP driver safety , a driver does not matter whether the client receives the data sent over UDP or not , or whether the count of customers is 0 or 250 .

Receiving data from eHouse home automation system, the UDP is safe and does not load in any way controllers or eHouse software , sending broadcasts (UDP_broadcast) to the LAN .

Status box has the following format:

< ; data_size> ; (< ; The_destination_address_H> ; < ; The_destination_address_L> ; ) < ; Local_addres_H> ; < ; Local_address_L> ; < ; command> ; < ; data_1> ; ….. < ; Data> ; < ; Data_N> ; < ; data_size> ; (< ; The_destination_address_H> ; < ; The_destination_address_L> ; ) < ; Local_address_H> ; < ; Local_address_L> ; < ; command> ; < ; data_1> ; . . . . . < ; Data> ; < ; Data_N> ; < ; 0> ;

Normal Mode / vs. (Extended Address)

1. size of the data (size of the data)

2. Address_H_target (Address_H_target)

3. Address_L_target (Address_L_target)

4. Control_command (Address_H_of_local_controller_return_path)

5. Data_1_byte (Address_L_of_local_controller_return_path)

6. Data_2_byte (Control_Command)

7 Data_3_byte (Data_1_byte)

8 . . the rest of the data for a given command .

If you send the status of the driver's control command ‘s’ .

Continue to follow the data in binary form to minimize the transfer of information through a serial RS-485.

For safety, to the data is attached check-sum to eliminate incorrect broadcasts perform.

Send command status is ‘s’ ,

Frame status of drivers Home Automation eHouse 1 and a description of the byte number (index shift depending on the operating mode (normal or extended_address) .

This constant shifting named below TCP_INDEX_INC . Depending on the mode, it may adopt a value of 3 for the extended address or 0 for normal transmission . When writing software, you might consider this parameter as a variable , because it allows us to easily manipulate the data in later versions if the frame is shifted in one way or another .

Indexes each byte frame status of the drivers eHouse 1 (the start of frame):

STATUS_ADC=1+2+TCP_INDEX_INC ; // The value of A/D_converters_2_bytes_1B=MSB,2B=LSB!! .

STATUS_OUT=17+2+TCP_INDEX_INC; // Digital output states first index

// Each output 1 bit LSB smallest number , MSB largest

STATUS_IN=20+2+TCP_INDEX_INC; // Digital input states LSB smallest number , MSB largest

STATUS_INT=21+2+TCP_INDEX_INC; // States of digital inputs (interrupt) LSB smallest number , MSB largest

STATUS_OUT25=22+2+TCP_INDEX_INC; // Outputs states from 25 . . 32 the same way as the output

STATUS_LIGHT=23+2+TCP_INDEX_INC; // Status of one dimmer dimmer 1B

STATUS_ZONE_PGM=26+2+TCP_INDEX_INC; // No current zone for EM

STATUS_PROGRAM=27+2+TCP_INDEX_INC; // No current program

STATUS_INPUTEXT_A_ACTIVE=28+2+TCP_INDEX_INC; // Input inputextender A in the active state

STATUS_INPUTEXT_B_ACTIVE=32+2+TCP_INDEX_INC; // Input inputextender B in the active state

STATUS_INPUTEXT_C_ACTIVE=36+2+TCP_INDEX_INC; // Input inputextender C in the active state

STATUS_INPUTEXT_A=40+2+TCP_INDEX_INC; // Input inputextender A Alarms and Warning

STATUS_INPUTEXT_B=50+2+TCP_INDEX_INC; // Input inputextender B Alarms and Warning

STATUS_INPUTEXT_C=60+2+TCP_INDEX_INC; // Input inputextender C Alarms and Warning

// Status HeatManager

STATUS_ADC_HEART=1+2+TCP_INDEX_INC; // Temperature measurements from 16 sensors the same way as for the RM

STATUS_OUT_HEART=33+2+TCP_INDEX_INC; // Digital output states similarly to RM

WENT_MODE=51+TCP_INDEX_INC;

RECU_MODE:=50+TCP_INDEX_INC;

CURRENT_PGM:=38+TCP_INDEX_INC;

// Status commmanager – integrated with the status of drivers eHouse 1 (hybrid system) eHouse 1 under the supervision of CommManager

STATUS_EHOUSE1_DEVS=0 ; // Place the status of devices connected to the RS485 (eHouse_1) above 71 bytes

STATUS_ADC_ETH=72; // ADC_measurements_16_inputs*2B A/D_notation_as_for_RM_Vcc=3V3

STATUS_ADC_ETH_END=STATUS_ADC_ETH+32; // End of the A/D measurement

STATUS_OUT_I2C=STATUS_ADC_ETH_END; // 2 times i2c 10*8 // max = 160 module outputs on extension module

STATUS_INPUTS_I2C=STATUS_OUT_I2C+20; //2 times i2c 6*8 // max 96 inputs on extension module

STATUS_ALARM_I2C=STATUS_INPUTS_I2C+12; //input_in the alarm state (with respect to the mask for the current security zone)

STATUS_WARNING_I2C=STATUS_ALARM_I2C+12; // input_warning state (with respect to the mask for the current security zone)

STATUS_MONITORING_I2C=STATUS_WARNING_I2C+12; // input_condition monitoring (with respect to the mask for the current security zone)

STATUS_PROGRAM_NR=STATUS_MONITORING_I2C+12; // Program_number_CommManager

STATUS_ZONE_NR=STATUS_PROGRAM_NR+1 ; // Number_CommManager_zone

STATUS_ADC_PROGRAM=STATUS_ZONE_NR+1 ; // ADC_program_number

STATUS_ADC_PROGRAM STATUS_LIGHT_LEVEL = 2 ; // Status 3 dimmers // Dimmer 3 * 2B

Example calculation of the temperature on the status of HM

i = index analog input 0 . . 15 for HM gettemplm function (msb , lsb) ;

TEMPHM[i]:=gettemplm(str[STATUS_ADC_HEART+i*2+TCP_INDEX_INC],str[STATUS_ADC_HEART+i*2+1+TCP_INDEX_INC])
eHouse_Home_Automation_OpenSource_Delphi