Skip to content
Jim Duda edited this page Feb 21, 2015 · 5 revisions

Author: Jim Duda (jim @ duda.tzo.com)

Sourceforge Project

I have checked in the source code into a new sourceforge project. The code is checked into the svn repository as an eclipse project. I highly recommend that you use eclipse to work with the project.

svn checkout svn://svn.code.sf.net/p/misterhouse-app/code/trunk Misterhouse-app

Make sure then when you do the checkout in Eclipse, you select to define it to be an Android Project.

Misterhouse Configuration

  • If you want speak and play events to be pushed to the Android, you need to defined server_android_port=XXXX (default 4444) in your mh.private.ini file. Whatever port number you choose must match the corresponding port number in the Android Host configuration settings. The android host configuration page defaults to 4444.
  • You need to enable the android_server.pl module found in code/common.

Download

You can fetch the early Beta release of the Misterhouse Android app here: https://duda.tzo.com/~jduda/Misterhouse-app.apk

  • The app uses object information provided by the xml_server interface (server/sub?android_xml)
  • The app is a very simple list activity.
  • It doesn't have much style or eye candy at this time.
  • The minimum Android platform requirements are Android Version 2.2 (Froyo) SDK Release 8.

Quick Notes

  • After configuring the Host, you won't see anything happen until you select one of the "Browse" entries on the main menu.
  • Be advised that adding entries to 'password_allow' may represent a security risk.
  • Don't forget to enable the android_server.pl code under 'common code activation' in the MH web interface.

Known Issues

  • Audio (pushed Speak and Play Events) doesn't work for API 2.2 (Froyo)
  • Connecting using SSL doesn't work for API 2.2 (Froyo) with an unauthenticated web server certificate
  • SSH Tunneling of Misterhouse Port (for Service doing Speak and Play Events) doesn't work with numerical IP addresses. I does however work for domain names (very strange).
  • The application doesn't work properly when used in Horizontal mode. For some reason, the changing of List Displays fails to work in Horizontal Mode. (FIXED in Version 1.0.4)
  • Versions before 1.2.0 don't support password authentication using the password_file defined in mh.ini (FIXED in Version 1.2.0)

Future

  • Display Speak events using a Pop Up message.
  • Add support for Cut/Paste in addition to Copy/Paste
  • Better Display Formatting for Tablet devices
  • Add support for Volume Control (geared towards Tablets)
  • More consideration for Security.
  • Improve performance of sending XML data over WAN/LAN

Service Notes

The Service is the communication interface between Misterhouse and the Android App, which uses a separate socket connection on the port identified as Misterhouse Port in the Menu->Host configuration. The Service allows for Speak and Play events to be delivered from Misterhouse asynchronously to all of your Android Applications.

  • The service interface between Misterhouse and Android API 2.2 and 2.2.1 (Froyo) is not working properly. The Android application is having problems playing audio with this API level. I'm working on trying to resolve this situation. I can confirm that Speak and Play events work properly with API 2.3 (Gingerbread). I have tested this configuration on the emulator.
  • You need to enable the android_server.pl code module in misterhouse for the interface to work.
  • You need to enable the Service in the Menu->Settings area within the Android APP.
  • Note that the Service may consume additional battery power in phone environments.
  • The Service supports Speak and Play events, CALLERID Notifications and General Notifications (see methods in android_server.pl)
  • If you want to receive Speak/Play events while the Android is in sleep mode, you need to enable WIFI in sleep. See Android Settings -> WIFI -> Advanced -> Keep WIFI On During Sleep

Basic Usage

  • Nothing will happen until you select one of the "Browse" entries on the main page!!
  • Each list entry is either an Group or an Object.
  • All Groups contain either other Groups or Objects.
  • Default Groups are provided by the xml_server in Misterhouse.
  • Additional Groups can be created to organized Groups and Objects.
  • Objects are the objects created in your Misterhouse code.
  • Currently, only State values in Objects can be manipulated.
  • Voice_Cmd Objects can be activated.
  • Each Group or Item has a context menu. Hold the item in the list for a couple of seconds to get the context menu.
  • The Context Menu allows you to manipulate Groups and Items.

Main Screen

  • The first screen is the Main Group and will display five items; Favorites, Browse_Items, Browse_Groups, Browse_Objects, and Browse_Categories.
  • Favorites is an empty group. It cannot be deleted. You can fill Favorites with Objects or other Groups.
  • Browse_Items, Browse_Groups, and Browse_Objects, contain all of the Objects made available by the xml_server interface. You can use Copy and Paste to organize items from these lists to either the Main Group, Favorites, or other groups you create.
  • Browse_Categories are the list of all created Voice Commands organized according to their Category definition.
  • All of the Browse listing should be familiar as they mimic they same Browse listing available on the Web interface.
  • New groups can be created using the Add Group option in any Context Menu.
  • You can add Items or Groups to Groups using the Copy, Cut, and Paste features in Context Menus.

Notifications

  • The application supports two styles of Notifications; Generic and CALLERID. Please refer to android_server.pl, methods android_notification and android_callerid respectively.

Configuration

When running the app for the first time, you'll need to configure a Host. The Host is you're Misterhouse server. You'll be directed immediately to the Host configuration, which can also be found in Menu->Hosts.

Menu Hosts

  • There can be multiple hosts configured. In most cases, you'll only need one. You may have different hosts if you have different firewall configuration for inside and outside your home.
  • To create a New Host, use the "click to add" button.

Connection Name:

  • The Connection Name is a handle to identify your host. For example MyMisterhouseHost

Internet Host Address:

The Internet Host Address field stores the IP address of your Misterhouse server. For example, MyServerName or 192.168.1.1, etc. Note that the port number must be added to this address, even if you're running the service on the default port (i.e. 8080). If you're running the web service on a non standard port number (i.e. 80 for HTTP, 443 for SSL), then simply modify the port number at the end of the address, like this: MyServerName:80 192.168.1.72:443

Misterhouse Room Name:

If you want to address Speak or Play events to a specific Android device, you can identify the devices uniquely play Room name. This will correspond to the room=> parameter of Speak and Play methods. You can choose to leave this field empty if you don't want to use rooms.

Misterhouse Web Root:

The Misterhouse Web Root field is used to store the additional internet address beyond your Internet Host Address. You'll need this sometimes if you are running your Misterhouse HTTP server behind apache. For example, assume you used http://MyServerName/Misterhouse/ia5/index.html to access your Misterhouse web page. In this example, you need to put Misterhouse in the Web Root field.

Use SSL Connection:

Set this checkbox if your Misterhouse HTTP server uses SSL. If you use https://MyServerName, then you need SSL

Use Web Authentication:

Set this checkbox if you use HTTP Auth and need a username and password to access the Misterhouse HTTP server. When using HTTP Authentication, you must fill in the corresponding Web Login Name and Web Login Password fields.

Use Misterhouse Authentication

Set this checkbox if you use Misterhouse Authentication (having setup a password_file in mh.ini). When using Misterhouse Authentication, you must fill in the corresponding Misterhouse Login Password which matches a password configured via the set_password program.

Misterhouse Port Number

Note: Do Not confuse this with an HTTP port. This field has nothing to do with the HTTP port,

The Misterhouse Port Number is the TCP port used for communication between the Misterhouse server and the Andoid(s). The default is 4444 but can be changed using the server_android_port configuration value in mh.ini. You don't have to expose this port number through your firewall if you also use the SSH tunneling method (see below). The android_server.pl code module needs to be enabled in the Misterhouse server for asynchronous communication between android and misterhouse for Speak and Play events.

SSH Connection:

If you don't want to expose Misterhouse Port Number through your firewall, but your firewall allows SSH, then you want to use the SSH Connection check box. This will tunnel the Misterhouse Port Number through the SSH connection. This is the preferred method when using a firewall. When using SSH, you must also configure the corresponding SSH Port, SSH User, and SSH Password fields.

Saving Settings

To save your new connection, use the OKAY button.

Your new connection will appear in the Host Listing.

The currently selected host will be highlighted. Simply select the host you want to use and the dialog box will close.

Menu Settings

Mute Audio:

Use this checkbox to disable all audio events from Speak and Play from the server.

Enable Object Filters

Each Object has a means to Filter it's display via an item in the Objects context menu. This check box globally controls whether items identified to be filtered will be displayed or not. If You have this check box on and items are filtered, you will never see them until this check box is removed. So, if you filter an object, but want to restore the object, you first need to uncheck this check box in order to find the object you filtered and remove its filtering.

Filter Objects Without State

This check box will filter out all objects which don't have any state information. This check box is useful since the xml_server provides a much larger array of objects, most of which cannot be controlled if they don't have state information.

Enable Service:

This check box enables the Misterhouse Service which performs background communication between the android device and Misterhouse server. This service will run even when the Misterhouse application has been closed. This service provides Speak ad Play events to be pushed to the android device. You might want to disable the service if you dont' want Speak or Play events, or you are concerned that the service is consuming too much battery power. In order to receive speak and play events, you must enable the android_server code application in your Misterhouse server.

Menu About

If you click on the Misterhouse icon in the About dialog, you'll be redirected to your main Misterhouse web page using the internal browser. The browser referes to the ia5 page.

Clone this wiki locally