#13093 - 03/28/05 01:31 PM
PDA Front-end for Ocelot & Leopard
|
Rex
active contributor
Registered: 09/15/04
Posts: 106
Loc: UK
|
This was originally posted at the tail end of a thread on the Leopard forum. I've moved it here at Guy's suggestion.
Having written a a few programs to perform various operations on the Leopard from my PDA, I noticed that 99% of the programing time went into designing and coding the user interface. Leopard owners will probably have found the same thing applies to C-Max programming. I started wondering if it was possible to write a program that would allow the user interface to be created automatically - according to parameters that could be adjusted at run-time.
Much code-crunching later, I have ShowCat - a Pocket PC program that can be tailored to display (and optionally modify) any combination of variables, timers and X10 status of a LAN-connected Leopard/Ocelot - without the need to write a single line of code! It includes the ability to display variables in a way that reflects their meaning within the C-Max. For example: Time variables can be displayed as hh:mm rather than just minutes; Boolean values can be shown as On/Off instead of 0/1; Months can be displayed as January, February, etc. With this running on a wireless Pocket PC, an Ocelot can have touch-screen control like a Leopard but without any additional programming!
By design, ShowCat should work equally well on Ocelots or Leopards connected through either wired or wireless servers. In practice I can only test it on my Leopard-II through a WiSER-2400 wireless serial IP Proxy server. If anyone would be interested in trying this on their own system, please drop me an email. You would need to have access to a wireless Pocket PC 2003 (or 2002 plus Compact Framework 1.0) and a Leopard or Ocelot connected to your LAN through an IP Proxy server.
|
|
Top
|
|
|
|
#13094 - 04/05/05 11:26 AM
Re: PDA Front-end for Ocelot & Leopard
|
Rex
active contributor
Registered: 09/15/04
Posts: 106
Loc: UK
|
The original post followed some discussion on programming languages and the cost - in terms of both time and money - of getting equipped to develop code for PDAs. I maybe didn't make it very clear that ShowCat is a finished application. It can be installed on most recent Pocket PCs without the need for any development software.
It does need the Leopard/Ocelot to be on the same network as the wireless access point for the PDA, though. This can be achieved using a serial-port IP server. Guy has an innovative solution for this using surplus print servers. Cables are a problem in my house so I use a wireless server to add the Leopard to the home WLAN.
If Ebay ever run out of suitable print servers, there are a number of purpose-designed serial-port servers on the market. I recently tested a VLINX ESP901 unit (available from www.bb-europe.com). This works really well and required very little configuration. One bonus is that configuration can be done through a normal internet browser. It also comes with serial port mapping software so can be used with C-Max for downloading and debugging the controller program. It doesn't beat Guy's solution for price, though.
|
|
Top
|
|
|
|
#13096 - 04/06/05 09:08 AM
Re: PDA Front-end for Ocelot & Leopard
|
Rex
active contributor
Registered: 09/15/04
Posts: 106
Loc: UK
|
I am looking at adding the facility to show module latched IO status to ShowCat. I don't have any of the modules, though, so I am flying blind. Can somebody tell me the order of the bits returned by the Get Latched I/O serial command? Are I/O bits 0 & 8 in the least-significant bit of the bytes returned by <200><50><0> ... <250>?
|
|
Top
|
|
|
|
#13098 - 04/06/05 04:34 PM
Re: PDA Front-end for Ocelot & Leopard
|
Rex
active contributor
Registered: 09/15/04
Posts: 106
Loc: UK
|
Thanks for that, Guy. I've implemented it as two different display formats: I/O Input(Module/Point) shows the on/off state of the latched input or relay; I/O Output(Module/Point) shows the relay on/off status and allows it to be changed. I think the code is working but I'll have to wait for someone with some modules to test it properly.
Can I assume that if a relay on/off command gets addressed to an input bit it will be ignored?
|
|
Top
|
|
|
|
#13100 - 04/07/05 06:34 PM
Re: PDA Front-end for Ocelot & Leopard
|
Guy Lavoie
Beyond All Hope
   
Registered: 12/21/02
Posts: 6401
Loc: Montreal, QC, Canada
|
I just finished trying out this neat little application and it works quite well! In just minutes, I was able to set up a screen to monitor a couple of variables, two i/o points (yes Rex, it works fine) and an X10 address's status. You can put up to 6 items per page and up to 20 pages. Once you have it set up, it gets the current values immediately, and also on demand by tapping the "Refresh" button.
This is a nice treat for those who have taken the "trouble" to put their controllers on a network access device since the port is only in use if you actually fire up C-Max or another application that opens the Com port redirector. At other times, the PDA is free to to access the network device and display the information at will. There is also the ability to edit things like a variable's value.
For testing, I used my iPAQ 4350 PDA and my network device is the Lantronix EPS1 print server (at $5 on ebay) that I've discussed previously in other threads.
Thanks Rex.
_________________________
"If you don't know what you're doing, do it neatly..."
|
|
Top
|
|
|
|
#13101 - 04/08/05 01:58 AM
Re: PDA Front-end for Ocelot & Leopard
|
Rex
active contributor
Registered: 09/15/04
Posts: 106
Loc: UK
|
Thanks for the feedback, Guy. I'm happy to hear that the I/O Point code works on real hardware.
|
|
Top
|
|
|
|
#13102 - 04/14/05 02:38 PM
Re: PDA Front-end for Ocelot & Leopard
|
Rex
active contributor
Registered: 09/15/04
Posts: 106
Loc: UK
|
I've realised that one of my home-grown pieces of debug software has a wider application: It works as a software IP proxy server. Here's the setup:
- A PC networked to a wireless access-point
- A Leopard/Ocelot connected to the PC's serial port
- A PDA with wireless access
- CatServer software running on PC
- ShowCat software running on PDA
The result is a wireless PDA front-panel for the Leopard/Ocelot without the need to buy any IP server hardware.
|
|
Top
|
|
|
|
#13103 - 01/18/07 01:51 AM
Re: PDA Front-end for Ocelot & Leopard
[Re: Rex]
|
Mark L
journeyman
Registered: 11/21/03
Posts: 57
Loc: Banbury, UK
|
Hi Rex,
If you have time please take me slowy through this one beacuse I think you have an answer to one of my ponderings. I have a PDA running Windows mobile 5.0 with Wifi, a PC connnected to an Ocelot (which is linked to a pile of Adicon kit and other aasociated HA debris) and a wireless router. I would like to have the PDA set up to look something like a Leopard screen and be able to do all the things a Leopard screen can do but on a PDA. Are you saying this kit does it? (Even better I'd like to not run the PC full time and communicate directly to the PDA or a remote PC via the web but I think this is asking a bit much.)
Can you give me some pointers where to start?
|
|
Top
|
|
|
|
#13106 - 01/20/07 12:16 AM
Re: PDA Front-end for Ocelot & Leopard
[Re: Guy Lavoie]
|
Mark L
journeyman
Registered: 11/21/03
Posts: 57
Loc: Banbury, UK
|
Guy, You're spot on with saying why this is such an interesting idea. I really don't like the idea of relying on a PC having to run 24/7 for me to be able to monitor or communicate with the Ocelot. I'm looking for a Lantronix EPS1 in the UK right now or an ebay source in the USA that will ship but as I understand it the role of the printer server is to "link" to "ends" of a serial connection across a LAN or via the web. So the printer server is 1 half of this project.
The other half is in getting an application that will give a PDA the ability to "Speak" to the Ocelot via a serial connection and give you something that has similar look and functionality to a Leopard screen. (Also the same request for a remote PC - somebody must have done that one surely).
I orginally started my research by asking on the 3rd party software board for software to communicate with the Ocelot via the web or a WLAN and you suggested HAL or Homeseer. I am going to download Homeseer and evaluate it but it seems way over the top for my needs and the Ocelot has to remain able to function indepedently. Also I can't work out what functionality it will give me with respect to the Ocelot (I'm solving that by downloading it and having a play). Finally the last issue is continually running a PC for such a minor task within an application that looks like it is pretty resource intensive.
So I guess the next question to follow the PDA front end idea is can you send me a copy or a link to get Rex's software or similar to try this route out? Also a similar application (or some pointers how to create one) to use a PC remotely in place of the PDA.
|
|
Top
|
|
|
|
#13108 - 01/20/07 12:38 PM
Re: PDA Front-end for Ocelot & Leopard
[Re: Mark L]
|
Rex
active contributor
Registered: 09/15/04
Posts: 106
Loc: UK
|
Here's what works for me: I have a Leopard II which runs automation for the entire house, gardens and outbuildings. The Leopard's serial port is connected to a TCP/IP serial server on the house LAN. I use a B&B ESP901 but Guy's solution with EPS1 also works and costs less. The ESP901 is connected to my main network router using HomePlug adaptors which route the data packets through the house power wiring (similar to X10 but much more reliable!). I use the HomePlug adaptors because there is no easy way to run a Cat5 cable between the Leopard's home and the network router.
The Leopard C-Max program is written so that every important parameter (like times for heating, lights, etc) and every function flag (like we're away for three days, we want the heating on all day, etc) are stored in C-Max variables. The Leopard's screens just display and change the values in the variables or, for manual operations, send X10 commands. Everything that can be done on the Leopard's screens can therefore also be done by remotely changing variables or triggering X10 commands.
The Leopard/Ocelot allows quite extensive remote control from a PC connected to its serial port. When the serial port is connected to a TCP/IP serial server, the same remote control can be performed by a PC connected to the LAN. This is true for both wired and wireless LAN connections. It is also possible from both normal and Pocket PCs.
The main house control is an HP iPAQ HX4700 that sits on a bookcase. Another iPAQ and several PCs can also be used to control the Leopard from anywhere in the house, outbuildings and gardens. The software that runs on the PCs and iPAQs was custom-written for my particular automation.
In my application, a PDA was the ideal user interface to the automation controller. They are small and attractive (so meet with approval from home President), consume little power and make no noise. They'll run for hours on internal batteries and can be carried in a pocket or placed on a table. They are also quite easy to find at good prices on Ebay if you don't want the latest model!
The problem is that the type of PC program required to send and receive the necessary remote control commands is not so simple to write. I have written Visual Basic programs that emulate my particular Leopard screens but it takes a lot of detailed programming - and a lot of time! It gets even worse when you want to use a PDA/Pocket PC because it requires special (read "expensive") programming software.
ShowCat was an experiment to see if it was possible to write a generic program for controlling a Leopard/Ocelot through a LAN. Instead of requiring specific programming for a particular application, ShowCat is configured by the user to display and change particular variables, timers, digital I/O and X10. The functionality and appearance are quite basic but it does work. ShowCat only runs on a Pocket PC. I haven't written a PC version because there are already several very comprehensive HA packages that would do a much better job.
Guy's advice was spot-on as usual: First get your ESP1 working with your Leopard/Ocelot. Next, make sure your Pocket PC connects to your LAN reliably and can communicate with the ESP1. I use a free software package called PocketPing to check this out.
If you want to try ShowCat, send me an email. Remember, though, this was an experiment. It worked and I use it but I haven't spent much time trying to improve it.
|
|
Top
|
|
|
|
Moderator: Dan Smith, Monte G, ADI Tech Support, Guy Lavoie
|
2747 Members
19 Forums
3837 Topics
22713 Posts
Max Online: 67 @ 08/16/11 03:08 PM
|
|
|
|
|
|
1
|
2
|
3
|
4
|
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
|
12
|
13
|
14
|
15
|
16
|
17
|
18
|
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
|
26
|
27
|
28
|
29
|
|
|
|
|
|