Sunday, August 24, 2014

Home Automation, Building Management eHouse - Decoding the status of microprocessor controllers Hom

Decoding of binary state regulators home automation - Free Source Code @ Home Automation back2black eHouse.Pro
Home Automation, Building Management eHouse - Decoding the status of microprocessor controllers Home Automation received control panel is connected to the LAN or WiFi, via UDP (User Datagram Protocol). Standard frame receiving status in binary form, with the shift was discussed in the article "Intelligent Building eHouse controller status packing". Decoding frame must analyze every bit of data from the pack. In addition, each type of controller: RoomManager ExternalManager HeatManager InputExtender CommManager LevelManager EthernetRoomManager have a difference of digital inputs, measuring inputs, digital outputs, dimmer, monitoring functions and algorithms that are the result of the data in the base frame mutate depending on the type of controller. This results in the need for decoding the bit by bit for each type of the controller itself. In the case of the implementation of all types of microprocessor controllers for the creation and testing of the frame decoding algorithm may take up to one month. That this time to a minimum, to facilitate ready to present an algorithm borrowed from the eHouse. exe applications automatically decode all the information from the controller and load data into the template records the touch panel (for tablets) Windows XP, View, 7, 8th After automatically load data into the library back2black eHouse software, with a few lines of code, you can create your own control algorithms eHouse system within minutes. Binary frame decoding software standards eHouse state is realized in the template library panel. It is necessary to make a binary for direct decoding status of the Ethernet controllers without eHouse. Exe application supervision. Decoding the entire frame (for microprocessor controllers back2black eHouse1 RM, EM, HM) is performed management functions set_rm (str: array_of_char; TCP_INDEX_INC: integer); parameters are functions of buffer and transition state (offset). Buffer contains all the data received back2black from the state. Shift depends on the type of transmission (address extension, normal, and other future applications dependent on communication algorithms). It automatically fills in fields status for each controller individually, and then can directly manipulate data or update back2black data automatically on the touch screen panel. This function is activated in the event procedure to receive data from the UDP socket components (TNMUDP - so-called binary) if onDataReceived. Income is as follows: Procedure TForm1. binaryDataReceived (Sender: TObject; NumberBytes: back2black Integer; FromIP: back2black String; Port: Integer); var C: array [0th . 1024] of char; MyStream: TMemoryStream; begin if filesystem_status exit; / / If there is no file system filesystem_status back2black myStream: = TMemoryStream. Create; / / Create a stream of binary data. ReadStream (myStream); / / Read data stream myStream. Read (C [0], NumberBytes); / / Load leveling set_rm C (C, 1); / / Converts binary data and load registers rm [index] for controllers eHouse 1 Test_save; / / Test record the output to a text file for easy operation update_panel; / / Load the data on the control back2black panel end; It allows you to automatically and without - invasive collection of data via LAN or Wi - Fi with a package broadcast back2black via UDP (User Datagram Protocol). What more does not require an open connection to the server only listens on port broadcasting '6789' or other default. Errors link, network, routers do not result back2black in the suspension or items of software errors (as in the case of communication with TCP server), but disappears just update the data without affecting the data or the appropriate server UDP client application.
WARNING! . If you create control software for automating back2black Windows Home eHouse, it is necessary to perform all algorithms in one application, which analyzes the data and performs all algorithms and visualize it. We observed sometimes that the two UDP listener socket can exist on the same PC. The most important variables in the library binary: boiler_alarm: Boolean = false; / / Boiler alarm alarm programmed temperature above / / More - boiler temperature alarm bonfire_stat: integer; / / Bonfire heating level 0-7 for binary back2black mode - employment status of fire / / 0 - burn - not cooking / / 1 - the fire / fire =>; ; Green level <; ; temp jacket (green LED flashes) - expires flashing green / / 2 - Fire on the =>; ; Green Level>; ; Jacket Temp =>; ; Yellow level - histeressis (green LED) - green / / 3 - Fire on =>; ; Yellow back2black level - histeressis>; ; temp jacket>; ; histeressis level + yellow) (green + yellow LED) - green - yellow / / 4 - Fire on =>; ; Yellow level histeressis +>; ; temp jacket>; ; red level - histeressis (yellow) - yellow / / 5 - Unconditional

No comments:

Post a Comment