"My Home Automation Projects"

xPLMyHouse - Web Server

Please also read the Disclaimer

How the Web Server Works

The web server is user-definable with multiple site layouts

NEW! Now has a built-in iPhone Website

(The iPhone website uses the port and password of the default site)

   

     

A web page consists of 3 items
   An index - a thumbnail of each floor
   Current floor - a clickable image of the current floor
   Device control - options to control the current selected device and a view of information

The index is optional and can be placed left, middle, right, top, center, bottom or not shown

The floorplan is always shown and can be placed left, right, top, bottom (depending on whether the device control section is embedded, otherwise it is irrelevant)

The device control panel can be embedded or be a pop up (and placed left, right, top, bottom if embedded)

You access the internal site as http://192.168.100.50:8310 (substitute your IP/port) to load the default.xml site

You can create as many layouts (with different sizes, positions of panels) as needed. e.g. if you create an xda.xml file you access it as \xda on the end of your url (e.g. http://192.168.100.50:8310/xda). If you don't specify a specific xml file the default.xml file is used

When 1st loading the port to be used for the web server is taken from default.xml only. It uses 2 ports, the one you specify and the next (e.g. 8310 uses 8310 and 8311). The 1st port is considered internal and the 2nd external. The external port requires a password and will not allow access to a site if the password is not defined in the xml file. Some devices will behave differently on the external port to the internal (e.g. webcams and MediaNet Server/Devices)

Layout of an xml definition file

<website>
  <settings port="8310" password="password" image="jpg" background="#C6C3C6" refresh="0" mobile="True" />
    port= is the port to use for internal use, port+1 is used for external use
    password= is the password for the external port, if not specified access is not allowed on external port
    image=jpg or bmp, use jpg for slow external connections and/or hand held devices
    background= RGB colour of page background
    refresh= seconds to refresh page, not really needed, 0 = no refresh
    mobile= True/False, identifies device as a mobile for things like webcams where functionality is limited

  <index position="left" width="50" height="50" />
    position= none, left, right, middle, top, bottom, center to specify location of index on screen
    if device panel not shown then only left, right, top, bottom make sense
    if floor above/below device panel then center not allowed
    if floor left/right device panel then middle not allowed
    width= width of thumbnail
    height= height of thumbnail

<floor width="400" height="300" position="top" />
    width= maximum width of floor image
    height= maximum height of floor image
    image is never increased in size, but will be reduced in size if necessary
    position= top or bottom, only has effect if device panel embedded
<device embedded="True" width="400" height="270" background="#FFFFFF" />
    embedded= True/False, is device panel embedded in page (see below)
    width= width of device panel
    height= height of device panel
    background= RGB colour of device panel background

<state imagesize="32" font="Arial" size="2" bold="True" />
    imagesize= size of current device state image
    font= name of font for state description
    size= html font size
    bold= True/False

<menu font="Arial" size="1" />
    font= name of font for menu items
    size= html font size for menu items

<control imagesize="16" />
    imagesize= size of the action image
</website>

When using a browser that doesn't support iframes then set embedded=False. This is particularly important for mobile devices that don't support iframes

Setting embedded=false will cause the device pane to be a pop up in any browser

Note: Pocket IE does not support iframes, but Opera Mobile does (as of the current stable release of Opera)