WebServer

The webserver is written in C using

The web server listens on PORT 80. From here you can control most of the Home Automation controller features.

To access any other page but info you will need to authenticate. Logging in as admin you can enter anything as the password and it will be accepted. Not until the admin user password has been setup will it be validated.

More screenshots

There are several settings in the /etc/xap-livebox.ini file that directly affect the webserver or the Livebox itself.

Network / Services

The network section defines what additional services will be enabled and the ports used, whether DHCP or STATIC IP configuration is setup, if the two Ethernet ports should be bridged together into a Switch configuration or addressed individually, the domain name of the Livebox and the NTP time server to stay in sync with.

uiadmin_mgt.jpg

[network]
lan_proto=static
hostname=hahbox
config_bridge=1
ether_0=00:07:3A:11:22:02
ether_1=00:07:3A:11:22:03
ftp_enable=0
domain=
ntp_host=uk.pool.ntp.org
ip=192.168.11.9
netmask=255.255.255.0
gateway=192.168.11.1
dns=192.168.11.1

The power LED indicator, although it appears on the SETUP page, has its own section. This reduces the amount of ON time that this LED has, useful if you keep the Livebox in a room where this brightness would be annoying.

[hardware]
power=0

These network entries allow in-built services such as SSH, TELNET and FTP to be enabled/disabled.

SSH requires that your Livebox can NTP sync to a valid time source before it will work. This is a requirement of SSL, the encryption transport. If you are having internet connectivity issues and your box can't time sync then enable TELNET access. This has no such dependency.

[network]
telnet_enable=0
telnet_port=23
ssh_enable=1
ssh_port=22

Access Security

Access to various pages in the HAH controller can be controlled in the [security] section. For example:

[security]
user=demo
passwd=secret
demo=automation,graph,control

Will create a login user called “demo” with a password of “secret” that only has access to the automation, graph, and control pages.

Up to 10 additional user accounts can be created. Simply separate each with a comma.

[security]
user=demo,foo
passwd=secret,bar
demo=automation,graph,control
foo=automation,control

The page names are derived from the names of the pages as defined in the URL. For example the page setup.kl1 will be “setup”.

There are two other entries that appear in the security section that are update-able via the webserver

info_protect=0
admin_passwd=21232f297a57a5a743894a0e4a801fc3

Info protect controls whether the INFO page is displayed without needing to authenticate as a valid user. The admin_password is an MD5 hash of the special user “admin” who cannot be deleted from the system; it's a hardcoded username much like “root” in a Linux system.

If you forget the “admin” user password simply delete the admin_passwd entry and whatever you enter in the login prompt will be accepted as valid.

Wake on LAN

Wake on LAN is a great way to save power by keeping your PC on 'standby' until it is given a little 'wake up' message. This page allows you to specify the MAC address of a number of PCs. Pressing the 'Wake Up' button sends the command.

More details of regarding WOL can be found here.