Difference between revisions of "User:Posde"

From LinuxMCE
Jump to: navigation, search
 
(58 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[Category: Zwave_Setups]]
 +
 
=Links=
 
=Links=
 
Modeline generator for X.org [http://xtiming.sourceforge.net/cgi-bin/xtiming.pl]
 
Modeline generator for X.org [http://xtiming.sourceforge.net/cgi-bin/xtiming.pl]
 +
= Notes on element sizing =
 +
There are basically two sizes. One size for phones, and one size for tablets, desktops and maybe the 10ft interface.
 +
 +
There are the following sizes:
 +
 +
* Single Button width and height
 +
* Album/Icon sizes width and height
 +
* List Item width and height.
 +
 +
Width and height can be defined based on percentage of screen pixel.
 +
 +
Another option is, sizing based on default screen font size, as defined by the operating system.
 +
 +
Sizing based on font size and percentage of screen pixels needs to be defined during qOrbiter start, and each and every screen needs to base its sizes based on these numbers.
 +
 +
 +
= Notes on Joggler =
 +
* [http://birdslikewires.co.uk/articles/squeezeplay-os Get] SqueezePlay OS For Joggler
 +
* Install iceWM
 +
apt-get update
 +
apt-get install icewm liblinphone0
 +
* Modify /home/joggler/.xinitrc to not call squeezeplay but icewm-session instead.
 +
* Install the relevant files for Orbiter using wget and dpkg -i --force-all
 +
* Create .icewm/startup to call a batch that executes Orbiter and stays in a while loop. If you call Orbiter directly it works, but Orbiter dies on a quick reload and does not restart. Make sure to add -d xxx where xxx is the device number of the Orbiter created manually in the web admin with the resolution of the Nokia 770 (800x480).
 +
* Create .icewm/preferences and add a ShowTaskBar=0 in there to hide the taskbar.
 +
 +
Enjoy an, imho, fast Orbiter display.
 +
 +
= How To Install qOrbiter On Ubuntu =
 +
* golgoj4 provides ready made builds for Qt 4.8.x and Qt 4.7.x. Both are 32bit builds. Download the one you want from [https://www.dropbox.com/sh/6ucnrflo6w7ry8m/AecFEjsyVS golgoj4's personal site].
 +
* Go to [http://qt-project.org/downloads Qt project page] and download the corresponding SDK.
 +
* Install the SDK as the user that is suppose to run qOrbiter.
 +
* Unpack the qOrbiter build and execute it.
 +
* Follow the [[QOrbiter_Setup]] instructions on running qOrbiter
 +
 +
= Notes On Skins For qOrbiter =
 +
qOrbiter reads skins from http://dcerouter/lmce-admin/skins/<target> first. At the moment target can be:
 +
* desktop
 +
* android
 +
* harmattan
 +
* meego
 +
* [http://apple.com/ iOS](not sure about this one)
 +
 +
If no local config file exists, the default/Main.qml and default/Style.qml file gets loaded. For the desktop target, the files that need to exist for qOrbiter to startup are
 +
* /var/www/lmce-admin/skins/desktop/Main.qml
 +
* /var/www/lmce-admin/skins/desktop/Style.qml
 +
 +
More details on qOrbiter skins can be found under [[QOrbiter#Developing_a_qOrbiter_skin]].
 +
 +
== Basic Style.qml ==
 +
import QtQuick 1.0
 +
QtObject{
 +
    id:classicstyle
 +
    objectName: "orbiter_style"
 +
    //skin description
 +
    property string skincreator: "robert paulsen"
 +
    property string skinname: "Android-Default"
 +
    property string skindir: "default"
 +
    property string skindescription: "Android phone skin, work in progress"
 +
    property string skinversion: "1.0"
 +
    property string skinvariation: "Android 320X480"
 +
    property string maincolor: "grey"
 +
    property string accentcolor: "indianred"
 +
}
 +
== Basic Main.qml ==
 +
 +
= Notes on packages =
 +
 +
* pluto-sample-media
 +
** contains some sample media, not really needed
 +
* pluto-confirm-dependencies
 +
** installs needed packages for devices
 +
* pluto-createdevice
 +
** creates devices based on device templates
 +
* pluto-dcecommon
 +
** contains the DCE library
 +
* pluto-dhcpd-plugin
 +
** contains engine which monitors the DHCP log for network pnp
 +
* pluto-install-scripts
 +
** scripts for installing pluto (are they still needed)?
 +
* pluto-local-database
 +
** sqlCVS dump coontaining alterations for the local pluto_main database
 +
* pluto-messagesend
 +
** command line messagesend utility.
 +
* pluto-newmdinteractor
 +
** needed to setup files for a new MediaDirector
 +
* pluto-orbitergen
 +
** creates the bitmap files for the Orbiter
 +
* pluto-orbiterinstaller
 +
** Contains the installer files for Window orbiters
 +
* pluto-plutodhcp
 +
** Creates DHCP configuration file
 +
* pluto-plutoutils
 +
** Helper libs for lots of pluto progs.
 +
* pluto-pluto-main-db
 +
** pluto_main database dump from sqlCVS
 +
* pluto-qos
 +
** Perl script setting up the firewall
 +
* pluto-remoteassistance
 +
** Remote assistance package (not working atm)
 +
* pluto-serializeclass
 +
** lib to serialize data
 +
* pluto-skins-basic
 +
** bitmaps for the basic skin
 +
* pluto-std-plugins
 +
** contains all the default plugins running in the dcerouter mem space (datagrid,event,infrared,plug'n'play,file_grid,securi
 +
* pluto-system-database
 +
** sqlCVS dumps of the dce,designer,constants,ir,website repos, as well as the city dump containing location information
 +
* pluto-updateentarea
 +
** creates default scenarios for entertainment areas
 +
* pluto-website-admin
 +
** web site, and web orbiter scripts
 +
* pluto-windowsce-libraries
 +
** DLLs needed for the old windows ce tools (?)
 +
* pluto-boot-scripts
 +
** all the scripts pertaining to the bootprocess of LinuxMCE. Lots of those scripts are probably no longer in use.
 +
* mce-diskless-tools
 +
** Diskless image blue print, as well as script files to create new default images
 +
* lmce-skins-titanium
 +
** bitmaps of the titanium skin
 +
* lmce-skins-slate
 +
** bitmaps of the slate skin
 +
 +
 +
= Notes on Orbited =
 +
Orbited is a server providing Comet functionality via HTTP. It needs twisted to run, and is written in Python.
 +
apt-get install python-setuptools
 +
easy_install twisted
 +
easy_install orbited
 +
easy_install stompservice
 +
easy_install simplejson
 +
We need a configuration file for orbited
 +
[global]
 +
session.ping_interval = 300
 +
user = www-data
 +
group = www-data
 +
[listen]
 +
http://:9001
 +
stomp://:61613
 +
[access]
 +
* -> localhost:61613
 +
 +
Above copied from http://thingsilearned.com/2009/06/25/starting-out-with-comet-orbited-part-2-installation-and-stomp/
 +
 +
== Goal with Orbited ==
 +
An interface where clients can register and receive constant information feedback about what is going on in a given room, and/or with a given device.
 +
== Plan of action ==
 +
# Create an Orbiter device on the dcerouter for each of the rooms
 +
# Have a PHP script register to the dcerouter, and receive all messages for the current room. These messages are send to Orbited via STOMP protocol using the [http://code.google.com/p/simplisticstompclient/downloads/detail?name=StompSender.php&can=2&q=Simplistic STOMP Client for PHP].
 +
# Have a Javascript client, modeled after [http://thingsilearned.com/2009/08/03/starting-out-with-comet-orbited-part-3-–-the-client/ STOMP test client], which registers to Orbited to receive each Event message when the router sends it. The JavaScript frontend uses a call to a PHP script modeled after the [http://svn.linuxmce.org/svn/trunk/web/iOrbiter/libMessageSend.php PHP MessageSend lib] of the iOrbiter to send commands to the DCERouter.
 +
== Note ==
 +
* Each time the PHP script starts, it must check if there is an Orbiter (that can be used exclusively by us), is available for each room.
 +
* All data, that is available via MySQL should be requested via MySQL
 +
* It needs to be found out, if we able to receive arrays from DCE via messagesend
 +
 +
= Activate Orbiter from KDE =
 +
This is VERY simple. All that is needed, is a simple message to the DCE router to NOT activate PC desktop:
 +
/usr/pluto/bin/MessageSend dcerouter 0 153 1 912 119 "0"
 +
where 153 is the device ID of the Orbiter on the current machine
 +
= EIB-eibd =
 +
The [[EIB/KNX_with_eibd|eibd based KNX/EIB device template]] is currently not plug and play, and not part of the regular install. The application needs to be build on a builder, and installed manually.
 +
* add the tuwien repo to your builder AND to your core
 +
deb http://www.auto.tuwien.ac.at/~mkoegler/debian eib main
 +
apt-get update
 +
== Build the EIB-eibd package ==
 +
* install the needed client development package
 +
apt-get install libeibclient-dev
 +
* create the binary
 +
cd src/EIB-eibd
 +
make all
 +
== Install eibd-server ==
 +
On your core, you need to install the eibd server package.
 +
apt-get install eibd-server
 +
Modify the eibd configuration files to suit your needs (needs more details).
 +
== Install the EIB-eibd package ==
 +
* First install the EIB device template (PK_DeviceTemplate=49)using the web admin
 +
* Make sure eibd is running (for tests, start it manually, later it should be started during system startup)
 +
* After installing the EIB device template, copy the builders output file EIB to /usr/pluto/bin and quick reload the router
 +
 +
= Thoughts about the Orbiter =
 +
Looking at the current devices Orbiter is running on, the Mobile Orbiter and the Cisco orbiter are special. The Mobile Orbiter, because it needs to intercept incoming calls, and the Cisco orbiter because the phone itself does not have much local intelligence to display stuff
 +
All other Orbiter can be exchanged for a HTML based orbiter without any problem.
 +
And even the Mobile Orbiter could be stripped down to be a small program running in the background, and upon incoming calls call a specific web page.
 +
So, the only thing really causing a problem is the Cisco orbiter
 +
And the Cisco could be used via a proxy based on a browser, transferring touches on the Cisco touchscreen as clicks to the dcerouter
 +
=Media List=
 +
==Who is responsible for filling out the media list?==
 +
It is filled from the table File at the moment. The table File is filled by UpdateMedia. But, there is media, which needs to be added to the list, which is not physically available in the file system.
 +
 +
==How can this be added?==
 +
The principal has been outlined in the [[MediaSourcePlugin]] page.
 +
 +
=Maemo Orbiter=
 +
echo deb http://maemo-sdk.garage.maemo.org/download/host ubuntu-intrepid free>>/etc/apt/sources.list
 +
aptitude update
 +
aptitude install maemo-sdk
 +
maemo-sdk install tools etch-2008
 +
maemo-sdk install rootstrap diablo4.1.2_armel
 +
sb2 -eR apt-get update
 +
sb2 -eR apt-get install
 +
 +
Add a Debian src repository to the scratchbox2
 +
 +
apt-get source libsdl-ttf2.0-dev libsdl-gfx1.2-dev
 +
apt-get source libgle3-dev libsdl-sge-dev libhid-dev
 +
apt-get source libmysqlclient12-dev libhttpfetcher-dev
 +
 +
How to build the above source packages ???
 +
 +
= forcedeth problems =
 +
As my NICs driver (forcedeth) has problems with random MAC addresses, due to a reverse MAC address detection bug (even in 2.26), modify the rules
 +
 +
editor /etc/udev/rules.d/30_persistent_net.rules
 +
remove the last 6 digits of the mac address and replace with *
 +
reboot
 +
 
=Notes On The Orbiter Generation=
 
=Notes On The Orbiter Generation=
 +
== Manipulating what can be seen on the Main menu ==
 +
The idea is, to disable the DesignObj that are not needed. If one does not want telecom, remove the telecom keys. Removing the keys is a bad idea. A better idea is to hide them. Two fields have to be set for the object:
 +
* DesignObjVariation_DesignObj_Skin_Language.CanBeHidden
 +
* DesignObjVariation_DesignObj_Skin_Language.HideByDefault
 +
 +
The way to reach the the DesignObjVariation_DesignObj_Skin_Language, looks like this (but i am not sure)
 +
# DesignObj.PK_DesignObj => DesignObjVariation.FK_DesignObj
 +
# DesignObjVariation.PK_DesignObjVariation => DesignObjVariation_DesignObj.FK_DesignObjVariation_Parent
 +
# DesignObjVariation_DesignObj.PK_DesignObjVariation_DesignObj => DesignObjVariation_DesignObj_Skin_Language.FK_DesignObjVariation_DesignObj
 +
 +
It seems something is missing there. One thing to note is, that multiple result set can be returned.
 +
 
==Scenario Buttons On The Main Menu==
 
==Scenario Buttons On The Main Menu==
 
All scenarios are in the table CommandGroup.
 
All scenarios are in the table CommandGroup.
Line 44: Line 274:
 
The sleeping screen is also defined in the Skin table
 
The sleeping screen is also defined in the Skin table
 
  Select FK_Screen_Sleeping From Skin Where PK_Skin = (SELECT IK_DeviceData As Skin FROM Device_DeviceData D Where FK_Device = <id of orbiter> And FK_DeviceData = 24 {DeviceData ID for PK_Skin})
 
  Select FK_Screen_Sleeping From Skin Where PK_Skin = (SELECT IK_DeviceData As Skin FROM Device_DeviceData D Where FK_Device = <id of orbiter> And FK_DeviceData = 24 {DeviceData ID for PK_Skin})
 +
 +
=== Note ===
 +
At the moment, the main menu is ALWAYS the screen with PK_Screen == 1. Different UIs have different variations, but unfortunately, the Skin tables FK_Screen_MainMenu is NOT taken into account. To change the home page for an Orbiter, it has to be changed in the Device Data for the specific orbiter device.
  
 
==User Status==
 
==User Status==
Line 80: Line 313:
 
* The client tells the server, what the server should display or send back.
 
* The client tells the server, what the server should display or send back.
  
=Personal Goals for 0804=
+
=Personal Goals for 0810=
 
==EPG and channel list on orbiter==
 
==EPG and channel list on orbiter==
 
The average user expects the electronic program guide to be viewable on the orbiter, and not only the on-screen orbiter. (Maemo Orbiter, Web Orbiter, Flash Orbiter [maybe Mobile Orbiter])
 
The average user expects the electronic program guide to be viewable on the orbiter, and not only the on-screen orbiter. (Maemo Orbiter, Web Orbiter, Flash Orbiter [maybe Mobile Orbiter])
Line 87: Line 320:
 
==Python Orbiter==
 
==Python Orbiter==
 
As mentioned on top of this page, I want an orbiter realised in Python, especially for the Symbian S60 phones. But it can also be the basis, for a mobile orbiter runnning under Maemo.
 
As mentioned on top of this page, I want an orbiter realised in Python, especially for the Symbian S60 phones. But it can also be the basis, for a mobile orbiter runnning under Maemo.
 
  
 
=LVM and RAID=
 
=LVM and RAID=
Line 151: Line 383:
 
  <TSCHAK> since I have a supported mobile orbiter
 
  <TSCHAK> since I have a supported mobile orbiter
 
  <TSCHAK> all I did was drop a cam outside, and hook a door phone to an analog telephone adaptor, and set the ATA up to be extension 996
 
  <TSCHAK> all I did was drop a cam outside, and hook a door phone to an analog telephone adaptor, and set the ATA up to be extension 996
 +
 +
996 is the extension for Movement detected...
 +
 
  <TSCHAK> it shows it on my phone, but i also added a respond to events "someone rings doorbell" which triggers my door cam scenario under security.
 
  <TSCHAK> it shows it on my phone, but i also added a respond to events "someone rings doorbell" which triggers my door cam scenario under security.
 
  <simon_bx> aha... ok, will play a little bit...
 
  <simon_bx> aha... ok, will play a little bit...
Line 183: Line 418:
 
== Assigning Screens To MediaTypes ==
 
== Assigning Screens To MediaTypes ==
 
If you want a specific screen to be shown for example for TV, the relevant place is MediaType_DesignObj. That table links a media type to a corresponding screen. FK_SCREEN for UI1, and FK_DesignObj_Popup for UI2.
 
If you want a specific screen to be shown for example for TV, the relevant place is MediaType_DesignObj. That table links a media type to a corresponding screen. FK_SCREEN for UI1, and FK_DesignObj_Popup for UI2.
 +
 +
= What is needed =
 +
== Core ==
 +
2 NICs
 +
== MD ==
 +
PXE bootable
 +
nVidia board
 +
 +
== Home Automation ==
 +
=== Z-Wave dongle ===
 +
* [[Seluxit_viaSENS_Home_Controller|Seluxit]]
 +
* [[MiCasaVerde Z-Wave Dongle|MiCasaVerde]]
 +
=== Z-Wave Switches ===
 +
* [[Merten 505119 single rocker]]
 +
* [[Merten 505219 dual rocker]]
 +
=== Z-Wave Actors ===
 +
* [[Merten 507900 Dimmer]]
 +
* [[Merten 507001 Switch]]
 +
=== Z-Wave Motion Detector ===
 +
* [[ACT Homepro ZIR010]] (Battery lasts between 6month and two years)
 +
* [[Seluxit Multisensor]]
 +
 +
== Security ==
 +
* D-Link IP camera DCS3500 G
 +
* Axis 207 (better low-light performance)
 +
 +
== Telecom ==
 +
* Patton SmartNode for ISDN connectivity
 +
* Cisco 7970 as hardwired phones (and orbiters)
 +
* Grandstream HT-286 ATA for analog door phone
 +
* Door phone (model?)
 +
 +
== Climate ==
 +
* Z-Wave Merten 509201 for radiator set-back

Latest revision as of 14:59, 24 February 2015


Contents

Links

Modeline generator for X.org [1]

Notes on element sizing

There are basically two sizes. One size for phones, and one size for tablets, desktops and maybe the 10ft interface.

There are the following sizes:

  • Single Button width and height
  • Album/Icon sizes width and height
  • List Item width and height.

Width and height can be defined based on percentage of screen pixel.

Another option is, sizing based on default screen font size, as defined by the operating system.

Sizing based on font size and percentage of screen pixels needs to be defined during qOrbiter start, and each and every screen needs to base its sizes based on these numbers.


Notes on Joggler

  • Get SqueezePlay OS For Joggler
  • Install iceWM
apt-get update
apt-get install icewm liblinphone0
  • Modify /home/joggler/.xinitrc to not call squeezeplay but icewm-session instead.
  • Install the relevant files for Orbiter using wget and dpkg -i --force-all
  • Create .icewm/startup to call a batch that executes Orbiter and stays in a while loop. If you call Orbiter directly it works, but Orbiter dies on a quick reload and does not restart. Make sure to add -d xxx where xxx is the device number of the Orbiter created manually in the web admin with the resolution of the Nokia 770 (800x480).
  • Create .icewm/preferences and add a ShowTaskBar=0 in there to hide the taskbar.

Enjoy an, imho, fast Orbiter display.

How To Install qOrbiter On Ubuntu

  • golgoj4 provides ready made builds for Qt 4.8.x and Qt 4.7.x. Both are 32bit builds. Download the one you want from golgoj4's personal site.
  • Go to Qt project page and download the corresponding SDK.
  • Install the SDK as the user that is suppose to run qOrbiter.
  • Unpack the qOrbiter build and execute it.
  • Follow the QOrbiter_Setup instructions on running qOrbiter

Notes On Skins For qOrbiter

qOrbiter reads skins from http://dcerouter/lmce-admin/skins/<target> first. At the moment target can be:

  • desktop
  • android
  • harmattan
  • meego
  • iOS(not sure about this one)

If no local config file exists, the default/Main.qml and default/Style.qml file gets loaded. For the desktop target, the files that need to exist for qOrbiter to startup are

  • /var/www/lmce-admin/skins/desktop/Main.qml
  • /var/www/lmce-admin/skins/desktop/Style.qml

More details on qOrbiter skins can be found under QOrbiter#Developing_a_qOrbiter_skin.

Basic Style.qml

import QtQuick 1.0
QtObject{
   id:classicstyle
   objectName: "orbiter_style"
   //skin description
   property string skincreator: "robert paulsen"
   property string skinname: "Android-Default"
   property string skindir: "default"
   property string skindescription: "Android phone skin, work in progress"
   property string skinversion: "1.0"
   property string skinvariation: "Android 320X480"
   property string maincolor: "grey"
   property string accentcolor: "indianred"
}

Basic Main.qml

Notes on packages

  • pluto-sample-media
    • contains some sample media, not really needed
  • pluto-confirm-dependencies
    • installs needed packages for devices
  • pluto-createdevice
    • creates devices based on device templates
  • pluto-dcecommon
    • contains the DCE library
  • pluto-dhcpd-plugin
    • contains engine which monitors the DHCP log for network pnp
  • pluto-install-scripts
    • scripts for installing pluto (are they still needed)?
  • pluto-local-database
    • sqlCVS dump coontaining alterations for the local pluto_main database
  • pluto-messagesend
    • command line messagesend utility.
  • pluto-newmdinteractor
    • needed to setup files for a new MediaDirector
  • pluto-orbitergen
    • creates the bitmap files for the Orbiter
  • pluto-orbiterinstaller
    • Contains the installer files for Window orbiters
  • pluto-plutodhcp
    • Creates DHCP configuration file
  • pluto-plutoutils
    • Helper libs for lots of pluto progs.
  • pluto-pluto-main-db
    • pluto_main database dump from sqlCVS
  • pluto-qos
    • Perl script setting up the firewall
  • pluto-remoteassistance
    • Remote assistance package (not working atm)
  • pluto-serializeclass
    • lib to serialize data
  • pluto-skins-basic
    • bitmaps for the basic skin
  • pluto-std-plugins
    • contains all the default plugins running in the dcerouter mem space (datagrid,event,infrared,plug'n'play,file_grid,securi
  • pluto-system-database
    • sqlCVS dumps of the dce,designer,constants,ir,website repos, as well as the city dump containing location information
  • pluto-updateentarea
    • creates default scenarios for entertainment areas
  • pluto-website-admin
    • web site, and web orbiter scripts
  • pluto-windowsce-libraries
    • DLLs needed for the old windows ce tools (?)
  • pluto-boot-scripts
    • all the scripts pertaining to the bootprocess of LinuxMCE. Lots of those scripts are probably no longer in use.
  • mce-diskless-tools
    • Diskless image blue print, as well as script files to create new default images
  • lmce-skins-titanium
    • bitmaps of the titanium skin
  • lmce-skins-slate
    • bitmaps of the slate skin


Notes on Orbited

Orbited is a server providing Comet functionality via HTTP. It needs twisted to run, and is written in Python.

apt-get install python-setuptools
easy_install twisted
easy_install orbited
easy_install stompservice
easy_install simplejson

We need a configuration file for orbited

[global]
session.ping_interval = 300
user = www-data
group = www-data 
[listen] 
http://:9001
stomp://:61613 
[access]
* -> localhost:61613

Above copied from http://thingsilearned.com/2009/06/25/starting-out-with-comet-orbited-part-2-installation-and-stomp/

Goal with Orbited

An interface where clients can register and receive constant information feedback about what is going on in a given room, and/or with a given device.

Plan of action

  1. Create an Orbiter device on the dcerouter for each of the rooms
  2. Have a PHP script register to the dcerouter, and receive all messages for the current room. These messages are send to Orbited via STOMP protocol using the STOMP Client for PHP.
  3. Have a Javascript client, modeled after STOMP test client, which registers to Orbited to receive each Event message when the router sends it. The JavaScript frontend uses a call to a PHP script modeled after the PHP MessageSend lib of the iOrbiter to send commands to the DCERouter.

Note

  • Each time the PHP script starts, it must check if there is an Orbiter (that can be used exclusively by us), is available for each room.
  • All data, that is available via MySQL should be requested via MySQL
  • It needs to be found out, if we able to receive arrays from DCE via messagesend

Activate Orbiter from KDE

This is VERY simple. All that is needed, is a simple message to the DCE router to NOT activate PC desktop:

/usr/pluto/bin/MessageSend dcerouter 0 153 1 912 119 "0"

where 153 is the device ID of the Orbiter on the current machine

EIB-eibd

The eibd based KNX/EIB device template is currently not plug and play, and not part of the regular install. The application needs to be build on a builder, and installed manually.

  • add the tuwien repo to your builder AND to your core
deb http://www.auto.tuwien.ac.at/~mkoegler/debian eib main 
apt-get update

Build the EIB-eibd package

  • install the needed client development package
apt-get install libeibclient-dev
  • create the binary
cd src/EIB-eibd
make all

Install eibd-server

On your core, you need to install the eibd server package.

apt-get install eibd-server

Modify the eibd configuration files to suit your needs (needs more details).

Install the EIB-eibd package

  • First install the EIB device template (PK_DeviceTemplate=49)using the web admin
  • Make sure eibd is running (for tests, start it manually, later it should be started during system startup)
  • After installing the EIB device template, copy the builders output file EIB to /usr/pluto/bin and quick reload the router

Thoughts about the Orbiter

Looking at the current devices Orbiter is running on, the Mobile Orbiter and the Cisco orbiter are special. The Mobile Orbiter, because it needs to intercept incoming calls, and the Cisco orbiter because the phone itself does not have much local intelligence to display stuff All other Orbiter can be exchanged for a HTML based orbiter without any problem. And even the Mobile Orbiter could be stripped down to be a small program running in the background, and upon incoming calls call a specific web page. So, the only thing really causing a problem is the Cisco orbiter And the Cisco could be used via a proxy based on a browser, transferring touches on the Cisco touchscreen as clicks to the dcerouter

Media List

Who is responsible for filling out the media list?

It is filled from the table File at the moment. The table File is filled by UpdateMedia. But, there is media, which needs to be added to the list, which is not physically available in the file system.

How can this be added?

The principal has been outlined in the MediaSourcePlugin page.

Maemo Orbiter

echo deb http://maemo-sdk.garage.maemo.org/download/host ubuntu-intrepid free>>/etc/apt/sources.list
aptitude update
aptitude install maemo-sdk
maemo-sdk install tools etch-2008
maemo-sdk install rootstrap diablo4.1.2_armel
sb2 -eR apt-get update
sb2 -eR apt-get install

Add a Debian src repository to the scratchbox2

apt-get source libsdl-ttf2.0-dev libsdl-gfx1.2-dev 
apt-get source libgle3-dev libsdl-sge-dev libhid-dev 
apt-get source libmysqlclient12-dev libhttpfetcher-dev 

How to build the above source packages ???

forcedeth problems

As my NICs driver (forcedeth) has problems with random MAC addresses, due to a reverse MAC address detection bug (even in 2.26), modify the rules

editor /etc/udev/rules.d/30_persistent_net.rules
remove the last 6 digits of the mac address and replace with *
reboot

Notes On The Orbiter Generation

Manipulating what can be seen on the Main menu

The idea is, to disable the DesignObj that are not needed. If one does not want telecom, remove the telecom keys. Removing the keys is a bad idea. A better idea is to hide them. Two fields have to be set for the object:

  • DesignObjVariation_DesignObj_Skin_Language.CanBeHidden
  • DesignObjVariation_DesignObj_Skin_Language.HideByDefault

The way to reach the the DesignObjVariation_DesignObj_Skin_Language, looks like this (but i am not sure)

  1. DesignObj.PK_DesignObj => DesignObjVariation.FK_DesignObj
  2. DesignObjVariation.PK_DesignObjVariation => DesignObjVariation_DesignObj.FK_DesignObjVariation_Parent
  3. DesignObjVariation_DesignObj.PK_DesignObjVariation_DesignObj => DesignObjVariation_DesignObj_Skin_Language.FK_DesignObjVariation_DesignObj

It seems something is missing there. One thing to note is, that multiple result set can be returned.

Scenario Buttons On The Main Menu

All scenarios are in the table CommandGroup.

The list of scenarios displayed on the main menu is derived from

  • CommandGroup_Entertain
    • Media
  • CommandGroup_Room
    • Lighting
    • Security
    • Telecom
    • Climate

Menu Items Which NEED Graphics

  • Media Remote
  • DVD Menue support (graphic is stored in /tmp/file.jpg on the corresponding MD)
  • Security Cameras (latest picture is in /tmp/ip_camera_img<device-id>.png or .jpg on the MD)
  • Floorplan support (floorplans are in /home/floorplans, details about them in the DB)
  • Application Desktop objects (only for On-Screen orbiters)

Media Remote

The media remote is basically just a bunch of buttons, so no real need for graphics here.

DVD Menues and Screenshots

The DVD menu images are stored in the MDs /tmp directory in file.jpg, ie. while watching the DVD menue, every few seconds a new file

/tmp/file.jpg

gets created. That is the file that is sent to the orbiter for display.

Screen Location Of Objects

Text Objects

The location of text objects is stored in DesignObjVariation_Text_Skin_Language via DesignObjVariation_Text.

Other Objects (buttons etc)

The location of other design object is stored in DesignObjVariation_DesignObj_Skin_Language.

Media File List

There is no Goto Screen for the file lists of the medias off the main menu. Instead, it uses Show File List with the PK_MediaType parameter. Show File List looks up the screen to be displayed based upon the current UI and the PK_MediaType in the table MediaType_DesignObj. For example, 47 is the screen that gets displayed. For UI1 it is the variation with ID 4684.

Select FK_Screen_FileList From MediaType_DesignObj Where FK_MediaType = 5

Main Menu

The starting screen is defined in the Skin table

Select FK_Screen_MainMenu From Skin Where PK_Skin = (SELECT IK_DeviceData As Skin FROM Device_DeviceData D Where FK_Device = <id of orbiter> And FK_DeviceData = 24 {DeviceData ID for PK_Skin})

The sleeping screen is also defined in the Skin table

Select FK_Screen_Sleeping From Skin Where PK_Skin = (SELECT IK_DeviceData As Skin FROM Device_DeviceData D Where FK_Device = <id of orbiter> And FK_DeviceData = 24 {DeviceData ID for PK_Skin})

Note

At the moment, the main menu is ALWAYS the screen with PK_Screen == 1. Different UIs have different variations, but unfortunately, the Skin tables FK_Screen_MainMenu is NOT taken into account. To change the home page for an Orbiter, it has to be changed in the Device Data for the specific orbiter device.

User Status

The UserMode table has a list of all available modus of a user.

Floorplan Information

Floorplan images are stored in /home/pluto/floorplans

For each device put onto a floorplan, an entry in Device_DeviceData points to the location. I.e. my light is has a Device ID of 63. To find out, where the light is on a floorplan it is

Select IK_DeviceData from Device_DeviceData Where FK_Device = 63 and FK_DeviceData = 10

FK_DeviceData = 10 is the floorplan info.

Security Camera Images

The latest security camera image(s) are also stored in temp with the name ip_camera_img<device-id-of-camera>.jpg, i.e. for a camera with device ID 164 it is

/tmp/ip_camera_img164.jpg

or if you want better quality

/tmp/ip_camera_img164.png

PythonMO

The PythonMO is going to work on all Nokia Symbian S60v2 and S60v3 phones. S60v1 won't be supported, as one of the main objects (graphics.Image) is not supported on it. As Python is supported on a lot of other devices as well, it should be easy to move it to other devices as well. The PythonMO is a Bluetooth server talking to the BD service running on the LinuxMCE Media Director.

Flow

  • All conversation work the same way. The server and the client talk using the following syntax.
4-byte long CommandID
4-byte long length of CommandText
0x00 delimited CommandText
  • It provides a service names "Pluto"
  • Upon connecting from a client, it sends out
    • A 4 byte version of a long BD_PC_REPORT_MY_VERSION
    • A 4 byte length definition of the BD_VERSION string
    • The BD_VERSION string, delimited with a NULL
  • The client sends back
    • A 4 byte version of a long BD_CP_....*
    • A 4 byte length definition of the command text
    • The word OKAY ended with a NULL
  • The server sends BD_PC_WHAT_DO_YOU_HAVE
  • The client tells the server, what the server should display or send back.

Personal Goals for 0810

EPG and channel list on orbiter

The average user expects the electronic program guide to be viewable on the orbiter, and not only the on-screen orbiter. (Maemo Orbiter, Web Orbiter, Flash Orbiter [maybe Mobile Orbiter])

Working VDR

VDR integration as promised for 0710. LiveTV on all media directors, without an ugly hack.

Python Orbiter

As mentioned on top of this page, I want an orbiter realised in Python, especially for the Symbian S60 phones. But it can also be the basis, for a mobile orbiter runnning under Maemo.

LVM and RAID

Partition The First Disk

Currently, the installer does not work with previously created software RAID devices. Therefor, one of the three disks is used to create the boot device. DVD Install and Custom Partitions

Create a RAID 1

As the boot partition we will create a raid 0 array. First create partitions on two of the disks using fdisk

fdisk /dev/sda
n - new partition
1 - start of partition
+80000M - we take about 80GB of space. Enough for the initial / of LinuxMCE and a couple of MDs
t - change type of partition
fd - to a raid array
w - write changes to disk.

same for /dev/sdb.

Now we create the raid devices

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1

If you receive an error, device /dev/md0 not found, make sure, the kernel module md is loaded, do

modprobe md

and try mdadm --create again.

Now, wait for the array creation to finish. Watch it with

cat /proc/mdstat

Now we have the initial device for LinuxMCE. Look at the wiki page [[2]] regarding custom partitioning, and create the three relevant partitions within the device /dev/md0 instead of /dev/sda and the relevant file and dir.

Now it is time to install LinuxMCE as outlined in the above wiki. When done, come back here.

Create a RAID-5 MD with LVM2 on top

LinuxMCE is installed and Sarah did his show and dance, and most of the stuff is configured. Now we will setup the array for the media. This array will be the foundation for an LVM2. Ontop of LVM2 will be an xfs file system. This will ensure ease in growing our media repository.

Install LVM2

aptitude install lvm2

takes of care of installing the needed programs

Create LVM2

A logical volume consists of physical volume groups and logical volume groups. First we mark our big RAID 5 array as a physical volume.

pvcreate /dev/md1

Next we need to create a volume group consisting of our array

vgcreate mediapv /dev/md1

The name 'mediagroup' is purely out of the blue. Name it pamela if you like. Next, after assigning the RAID array to the volume group, we add a logical volume group ontop of that volume group of physical volumes

lvcreate --name medialv --size 1700G mediapv

If you get an error during the above command, make sure the module dm_mod is loaded.

Format The LVM2 Partition

Now we have an LVM2 partition, that we can format. As we will put mostly large files ontop the drive, and use lots of disk space, we choose xfs

mkfs.xfs /dev/mediapv/medialv

If you get an error during the above command, saying command not found, install the xfsprogs using aptitude install Compared to formatting an ext2 or ext3 file system, the creation of the filesystem with xfs is very fast, as only a little bit of information is written to the disk.

Door bell and security camera

<simn_bx> TSCHAK, all... what does it mean in WIzard-Reaction to sensors, if i set for Generic analog camera under "disarmed" as "as Security??
<TSCHAK> simon_b, that only works if the camera is a child of the motion wrapper
<TSCHAK> simon_b, but if you do that, then motion will watch the camera and try to extrapolate motion, and send security events, that you can trigger off of.
<simon_bx> yes, the camera is a child of motion wrapper
<TSCHAK> okay, sooo
<TSCHAK> that means any time that camera detects motion, you can for example, trigger a security event
<simon_bx> hmmm, ok... trying to uderstand that...

[..]

<simon_bx>[..]i'm trying to add camera notivifacation on the orbiter, when doorbell button is triggered

[..]

<TSCHAK> since I have a supported mobile orbiter
<TSCHAK> all I did was drop a cam outside, and hook a door phone to an analog telephone adaptor, and set the ATA up to be extension 996

996 is the extension for Movement detected...

<TSCHAK> it shows it on my phone, but i also added a respond to events "someone rings doorbell" which triggers my door cam scenario under security.
<simon_bx> aha... ok, will play a little bit...
<TSCHAK> I used DCERouter Execute Command Group command, and gave it the scenario # of the panasonic IP camera scenario button
<simon_bx> well, that is already too deep for me... " DCERouter Execute Command Group command" (sorry for asking)
<TSCHAK> if you look at the list of commands
<TSCHAK> under DCERouter, there is a command, called execute command group
<TSCHAK> a command group, is the internal name for a scenario
<TSCHAK> it takes one parameter, the scenario number to run...
<TSCHAK> which you get by looking at a scenario, it will say, "Scenario #8: Sleep" etc...
<TSCHAK> you get the # ,and put it in that fiel.
<TSCHAK> d.
<simon_bx> guys, is this possible: Scenario, Device (OnScreenOrbiter) -- Command (Goto Screen) -- and then set a path to the camera frame?
<TSCHAK> try it.
<simon_bx> hmmm, but where to put the path in? #10 ID (string) -- #159 PK_Screen (int), nothing seems logical atm
<simon_bx> add. Question: MD in room 1... can i set two commands for it for the same time? 
(like: 1- play sound ring.wav and 2. show picture(object) xy.jpg)?? or should i use for 1. xine and 2. mplayer?

Designing screens and objects

The following is some additional information, that might get handy, if you are working with HADesigner (or the upcoming JAVA-based QuickDesigner) (directly from a chat session with Tschak)

  1. MediaType_DesignObj .. that specifies designobjs and screens for a media type
  2. Screen .. for specifying screens.. changes to this table require running ScreenGen
  3. Screen_DesignObj which specifies what designobj to use for a screen...
  4. and there is DeviceTemplate_MediaType_DesignObj which allows you to override a designobj/screen mapping for a specific type of device.

What media type is MythTV and/or VDR

There are two TV media types. The built in TV is pluto_TV. The other media type np_LiveTV is used for external receivers that bypass the LinuxMCE system and directly connect to a TV set.

Changing Channels

<TSCHAKeee> changing channels isn't that difficult
<TSCHAKeee> command, tune to channel, destination -106, the program parameter is I believe <%=35%> ...
the exact variable is in the onActivate for the instance of the datagrid on the ui2 screen.

Assigning Screens To MediaTypes

If you want a specific screen to be shown for example for TV, the relevant place is MediaType_DesignObj. That table links a media type to a corresponding screen. FK_SCREEN for UI1, and FK_DesignObj_Popup for UI2.

What is needed

Core

2 NICs

MD

PXE bootable nVidia board

Home Automation

Z-Wave dongle

Z-Wave Switches

Z-Wave Actors

Z-Wave Motion Detector

Security

  • D-Link IP camera DCS3500 G
  • Axis 207 (better low-light performance)

Telecom

  • Patton SmartNode for ISDN connectivity
  • Cisco 7970 as hardwired phones (and orbiters)
  • Grandstream HT-286 ATA for analog door phone
  • Door phone (model?)

Climate

  • Z-Wave Merten 509201 for radiator set-back