eHouse RS-485 building, hotel automation linux software

eHouse 1 support for Ubuntu, Debian and other Linux distributions – Lazarus open source code

“eHouse 1” Smart House RS version – 485 Open Source Software for Linux.

Support for working with serial interface RS – 485 requires the parent host.
From the point of view of the hardware it may be, for example any hardware equipped in:

  • RS-485 full duplex
  • RS-232 to RS-485 converter
  • USB->RS-232 dongle and RS-232 to RS-485 converter


In this post we take a look at programming under Linux for eHouse One System.
Linux is the most popular system beside Windows.
There are dozens of Linux distributions , the most popular of them are :

  • Linux Mint
  • Ubuntu
  • Fedora
  • Debian
  • openSUSE
  • Arch Linux
  • PCLinuxOS
  • CentOS / Red Hat
  • Mandriva
  • Slackware

The variety of these distributions allowed for their use on any computer equipment or having a microprocessor:

  • PC
  • PADs
  • smartphones
  • PDA
  • computer cards
  • control panels
  • satellite decoders
  • routers

There is possibility to write software practically on any hardware.

Requirement is the ability to connect the eHouse 1 system ie. RS – 232 or USB. It is also necessary to have a disk or flash memory card resource.

RS – 485 port is not standard equipment in the PC, so we need RS-232C/RS-485 converter for this.
If no RS – 232C serial port exists in hardware, we need also connect the USB/RS – 232 adapter (dongle).
It is necessary to test the transmission by the adapter as most of the adapters available in the market is poor quality, break the connection, overheat, have problems with drivers for different systems especially Linux.

Interlace is required in relation to the other devices on the RS-485 bus from supervising host. Lines TX turns to RX lines.

Since the original software, eHouse smart home is written in Delphi, it is possible on the basis of the creation of software Pascal on other hardware platforms and system having the full functionality of eHouse 1 under the supervision of the application eHouse.Exe (In addition to configuring drivers , uploading firmware and other administrative functions) .

There is a free development environment Lazarus allowing you to create software for Linux , windows in Pascal. The development of a complete software for PC eHouse is pointless because it is made ‚Äč‚Äčavailable free software package for eHouse1.
It makes sense, however, creating software for small board computer, that manage eHouse 1 controllers, and perform your own advanced control algorithms for eHouse building automation not implemented in controllers itself. Additionally, they can implement the functions of communication with control, management and visualization panels over various transmission media.

Serial port for transmission of eHouse1 must be configured by selecting

  • 115200
  • parity ” even ”
  • 1 stop bit
  • no compression
  • no flow control

Transmission frame format from the controller is dependent on normal mode and “extended address *”.
The importance of the bits in a frame is as follows:

  • 1 . data size ( data size )
  • 2 . Address H driver (Address of the target H *)
  • 3 . Address L Driver (Address of the target L *)
  • 4 . Control command ( Address H of source controller *)
  • 5 . Data 1 byte ( Address L of source controller *)
  • 6 . Data 2 byte (Command Control *)
  • 7 . Data 3 byte ( Data 1 byte *)
  • 8 . … the rest of the data frame (data n – 2 *)

For eHouse system 1 is best to limit to the extended address mode only.
This will allow complete transfer events between controllers via parent host.
When receiving a frame from the driver should pay attention to the control command:

  • ‘s’ is a marker status
  • ‘l’ means the transmission of log data from the controller

Ready source code can be found at Smart House eHouse 1 – Linux programming Support RS – 485 Pascal for eHouse1 .
For more information check post: Smart House eHouse – decoding status