Difference between revisions of "Main Page"

From xPL
Jump to: navigation, search
(RESTful web service)
(MediaWiki editing)
Line 96: Line 96:
 
On the other machine, install and launch the service as explained in the corresponding page.
 
On the other machine, install and launch the service as explained in the corresponding page.
  
= MediaWiki editing =
+
= Contact =
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
+
 
 +
My name is Francois Corthay.
 +
I teach [http://wiki.hevs.ch/fsi/ digital electronics] in an [http://www.hevs.edu/en/ engineering school] in Switzerland.
 +
If you have problems installing xPL, you can contact me at first_name&#46;last_name&#64;domain_name (without this web page's leading '<code>www.</code>').
  
 
[[Category: all]]
 
[[Category: all]]

Revision as of 09:49, 20 July 2015

The xPL protocol allows different devices to exchange information in a simple manner. The devices broadcast their messages to the others and register to a hub in order to receive the messages sent by others.

The protocol is light enough to run on simple machines such as the BeagleBone. Some setup insructions show how to prepare a BeagleBone to use with xPL. A comparison of different single-board computers gives an idea of speed and power consumption issues.

The hub and the devices can be installed on different platforms. The system shown here run with Perl, which is part of the Linux and Mac OS operating systems and can easily be installed on Windows. It is based on John Bent's xPL ToolKit for Perl.

Install xPL

Hub

The first step to xPL automation is to install a hub.

This has to be done on each machine that participates to the xPL network.

Serial port

Many devices are controlled over an RS-232 serial port.

For this, the xPL serial port device can be instantiated as many times as needed. The xPL infrastructure supports this by the fact that these devices are differentiated by their name.

Audio output

In the same way as your PC, your home wants to alert you from time to time.

For this, the xPL alert device can emit alert sounds. This can fro example be triggered by other xPL messages.

Controlled equipment

The xPL scripts found here allow to control:

Triggered actions

An xPL device sends clock ticks every minute. A xPL dawnDusk device sends messages at dawn and at dusk.

A central xPL device monitors all the messages and is configured to trigger specific actions on specific messages. This allows:

The location of the personal mobile phone can be used to trigger actions, such as opening the garage door. A distance calculator sends xPL messages on any receipt of a NMEA position message.

RESTful web service

A RESTful web service allows to query and modify the state of the home using HTTP methods.

It works in conjunction with the home state xPL device.

Browser control

An HTML web page can also be used to control the home.

It works in conjunction with a CGI script capable of sending xPL messages. This implies to install a web server on a machine in the same local domain as the xPL system.

Obviously, the home control pages have to be tailored to the user's wishes. These pages, in turn, can be generated by a CGI script, based on an XML description of the buttons and their associated commands.

Moving xPL services

Movng services require to stop them on a given device and starting them on another.

Stop a service on a given device:

su
ll /etc/init/xpl-*
initctl list | grep running | grep xpl-
SERVICE='xpl-central'
SERVICE_CONF="/etc/init/$SERVICE"
echo -e "\n$SERVICE_CONF.conf\n"
echo ; cat $SERVICE_CONF.conf ; echo
service $SERVICE stop
echo "manual" >> $SERVICE_CONF.override
reboot

su
SERVICE='xpl-central'
initctl list | grep $SERVICE

On the other machine, install and launch the service as explained in the corresponding page.

Contact

My name is Francois Corthay. I teach digital electronics in an engineering school in Switzerland. If you have problems installing xPL, you can contact me at first_name.last_name@domain_name (without this web page's leading 'www.').