eHouse4Java Open Source Software for eHouse Home Automation

eHouse Home Automation eHouse4Java – java (Open source) software includes the following modules (.java – source code , .class – The resulting class):

  • Ehouse4java.java – The core of the application and the main interface
  • ehousecommunication.java – communication functions and configuration
  • EhouseTCP.java – communication and configuration of controllers
  • EventsToSend.java – secondary event handling
  • EventToSend.java – the definition of a single event
  • GraphicObject.java – graphical object definitions
  • ISYS.java – includes dedicated functions for vendors
  • RunEvent.java – Sending events from text form
  • StatusEhouse.java – class contains one instance for each eHouse1 controller
  • StatusEthernet.java – class contains one instance for each Ethernet eHouse controller
  • StatusServer.java – Auxiliary TCP/IP Server, sending all controllers status via TCP/IP to client panels (external via LAN , WAN , Intranet , Internet)
  • visualization.java – Visualization/graphical control class in accordance with eHouse visualization and graphical control standard

The functions and global variables are described in the software source code eHouse4Java .

The software includes independent threads , eg.Communication , which are performed in the background in relation to the main application.

This do not stop or delay the application that processes take too long, which resulted to a significant slow down of application and the possibility of suspension while waiting for communication (dead locks) .

The main threads are:

  • TCP Client (to receive the status of the controller, the tcp / ip on the LAN , WAN , Internet , Intranet)
  • UDP Listener (for listening to broadcast status in the connectionless UDP) – only within the LAN , Intranet
  • Speech synthesizer to play any acoustic text messages
  • Multi-thread TCP/IP Server – to route the received status to the connected client panels of any type (via LANs , WIFI , Internet , Intranet , WAN)

Names of communication media with controllers are included with the settings on the form choose the type of connection (LAN TCP , LAN UDP , Internet , Off) .

Other threads are activated using global variables are in classes “EhouseTCP” or “ehousecommunication” .

The application uses a visualization according to eHouse standard , generated from CorelDraw applications using scripts that enable:

  • import eHouse system configuration
  • creation of graphical objects manually or with a script
  • export data for all visualization methods for all panels, web browsers, pc, tablets, smartphones and other systems

This is discussed further in the article:

” creating graphical visualization and control eHouse smart home ” .

visualization software is based on a scalable vector graphics (SVG).

This method allows you “loose-less” of quality drawing curves , text , simple geometric figures , regardless of the size of the enlargement , Screen shift , etc .

It Would not have been possible using the background graphic images such as jpg , bitmaps, etc. .

Software visualization has been optimized in order to reduce the utilization of the CPU and graphics processing time when working online, due to the large amount of data to process. Graphic images are cached and divided into appropriate control signals and processed when receiving the status of the controller , and displayed on the screen much faster from visualization cache of each controller .

This allows:

  • significant reduction in the processed data for visualization with the image changes
  • significantly reduce flicker when changing projected images
  • significant reduction in the load of CPU and data visualization
  • the use of much “weaker” , less efficient and less expensive hardware , graphic panels , tablets, the control panel, etc. , while maintaining a comfortable working
  • reduction in power consumption which is especially important in battery and mobile equipment and length of work on batteries

This is discussed with screenshots in the article:
” Graphical visualization and intelligent home control in Java ”

EHouse4Java communication with controllers home automation

eHouse1 Under the supervision of PC

In this version of the application eHouse.exe works as a receiver status of the RS-485 (with converter RS-485/RS-232) and transmits the status without any changes on the two methods do not collide with each other:

  • eHouse.exe works as a TCP/IP server responds to queries about the status panel, referring further connect the panels and maintain them until disconnected for any reason. This method is particularly valuable with attempts to establish communication with the outside TCP/IP panel via network, such as the Internet where it is not possible to receive UDP status.
  • eHouse.exe sends the broadcast connectionless UDP protocol for any number of clients on the LAN , Intranet . This means that , that the panel is not connecting to the server, but listens broadcast messages from “eHouse.exe” applications. In this way no matter how many recipients panels status does not change the network load, or the computer on which the “eHouse.exe” application runs . Unfortunately it is not possible or is highly difficult to transmit UDP broadcast via the Internet so in this case the first method should be used.

eHouse1 Under the supervision of CommManager

In this version, CommManager receives incoming statuses via RS-485 (from eHouse1 controllers) and transmits the status without any changes on the two methods do not collide with each other:

  • CommManager works as a TCP/IP server responds to queries about the status panel, referring further connect the panels and maintain them until disconnected for any reason. This method is particularly valuable attempts to establish communication with the panel outside the LAN , such as the Internet where it is not possible to receive UDP status.
  • CommManager sends broadcasts (connectionless) UDP protocol are for any number of clients on the LAN , Intranet .
    This means that , that the panel is not connecting to the server TCP CommManager , but listening to the messages broadcast from CM. In this way no matter how many recipients panels of status, it does not change the network load or CommManager CPU utilization. Broadcasting UDP broadcast is not possible, or is heavily impeded through the internet so in this case the first method should be used.

Ethernet eHouse (eHouse4Ethernet)

In this version of Ethernet controllers: CommManager , EthernetRoomManager, etc., independently send their status in two ways, do not collide with each other:

  • Each controller works as a TCP/IP server responds to queries about the status panel, referring further connect the panels and maintain them until disconnected for any reason. This method is particularly valuable attempts to establish communication with the panels outside the LAN , such as the Internet, where it is not possible to receive UDP status .

    However, in the case of multiple Ethernet controllers is necessary to maintain a connection to a TCP/IP each controller , to pick up a complete system status directly from controllers. This can result in a greater load on the processor control panel , severity of problems related to communication. In this case, it is preferable to place on the LAN side application , that receives local UDP status , and forwards the over TCP/IP via Internet. This is realized and discussed in application eHouse4Java , which allows this solution. The disadvantage is the need to maintain additional hardware that performs these functions.

  • Each controller sends a broadcast (connectionless) UDP protocol are for any number of clients on the LAN , Intranet. This means that , that the panel is not connecting to the TCP server controller , but listening to the messages broadcast from all controllers. In this way no matter how many recipients panels status does not change the network load or controller cpu utilization. Broadcasting UDP packages is not possible or is heavily impeded through the internet, so in this case the first method should be used. The possibility of transmission of the UDP is sometimes possible depending on the type of link, Performance. Sometimes it is possible to obtain a broadcast UDP through VPN properly configured link , However, even in this situation, packets may be lost, due to lack of security mechanisms for UDP. Incorrect data is automatically canceled by the software eHouse panels for non check-sum (check sum)