ADICON Support Forum Applied Digital, Inc.
Page 1 of 1 1
Topic Options
#13093 - 03/28/05 01:31 PM PDA Front-end for Ocelot & Leopard
Rex Offline
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 Offline
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
#13095 - 04/05/05 12:02 PM Re: PDA Front-end for Ocelot & Leopard
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
Well I, for one, will be giving this a look. This could also be a handy application for people with slave Ocelots or Leopards whose serial ports might otherwise normally go unused (except for when updating their internal C-Max program or screens).
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#13096 - 04/06/05 09:08 AM Re: PDA Front-end for Ocelot & Leopard
Rex Offline
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
#13097 - 04/06/05 10:23 AM Re: PDA Front-end for Ocelot & Leopard
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
Yes, the bit image reflects all 16 i/o points from i/o point 0 in the least significant bit to i/o point 15 in the most significant bit. This also means that for a SECU16, you get to see the current state of the relays, with a 1 bit for a relay that is turned on.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#13098 - 04/06/05 04:34 PM Re: PDA Front-end for Ocelot & Leopard
Rex Offline
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
#13099 - 04/06/05 08:43 PM Re: PDA Front-end for Ocelot & Leopard
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
As of C-Max 2.00, it is not possible to send an output command to an input. The command wizard only allows the 8 output relays to be selected in an action (THEN or ELSE) i/o point statement. It is still possible to try sending such a command manually with the C-Max module utilities, but I'm quite sure that such a statement would simply be ignored.

I have some expansion modules so if you want, send me your newer version of Showcat that adds this new functionality. I'll test it out...
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#13100 - 04/07/05 06:34 PM Re: PDA Front-end for Ocelot & Leopard
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
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 Offline
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 Offline
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 Offline
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
#13104 - 01/19/07 07:16 PM Re: PDA Front-end for Ocelot & Leopard [Re: Mark L]
Lumpy Offline
journeyman


Registered: 10/23/04
Posts: 57
Loc: Red Deer, AB Canada
Very interested.... Still working on controlling my
Ocelot wireless. To add a PDA into the mix would be
AWESOME!.

Where is Guy to explain all this to me/us as if we
were 3 year olds. lol

Top
#13105 - 01/19/07 07:40 PM Re: PDA Front-end for Ocelot & Leopard [Re: Lumpy]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
Explain what exactly? The EPS1 setup?

I'd suggest that you start by getting the EPS1 to work with C-Max. Once that is working ok, then you can try out Rex's program. The good thing about the PDA utility is that it connects to an IP port directly so there is no need for a PC to act as a server or relay program. All you need to do is configure Rex's program to connect to port 3001 of the EPS1's IP address.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#13106 - 01/20/07 12:16 AM Re: PDA Front-end for Ocelot & Leopard [Re: Guy Lavoie]
Mark L Offline
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
#13107 - 01/20/07 10:19 AM Re: PDA Front-end for Ocelot & Leopard [Re: Mark L]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
Quote:


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).





The PDAs we're discussing here are the ones with WiFi connectivity. No serial ports on a PDA are involved. A PDA with WiFi has TCP/IP connectivity built-in and Rex's software opens an IP socket connection directly to the EPS1 in order to communicate with its serial port (tcp port 3001). In configuring Rex's program, you need to tell it the EPS1's (or whatever device type you're using) IP address and the port number that you want to connect to. It does a telnet-like connection.

The EPS1 is a device that you can establish a connection to over TCP/IP and acces its serial and parallel ports. The serial port is port 3001 and the parallel port is port 3000. Lantronix and other companies also make "device servers", which are like the EPS1 but that can also originate a connection too. The EPS1 can only be the object of a connection originated by something else, which is what we're doing here anyways.

Quote:


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.




In his original message, Rex asks that anyone interested in obtaining his program to send him an email. You can see his email address by clicking on his name. As for developing you own code, it depends on the programming language that you have. My own projects use VB5, which is getting old by today's standards. For socket connectivity I use the freeware version of SocketWrench by Catalyst Development. This handy tool was introduced to me by Jim Beersman.

http://www.catalyst.com/products/socketwrench/freeware/index.html
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#13108 - 01/20/07 12:38 PM Re: PDA Front-end for Ocelot & Leopard [Re: Mark L]
Rex Offline
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
Page 1 of 1 1


Moderator:  Dan Smith, Monte G, ADI Tech Support, Guy Lavoie 
Hop to:
Who's Online
0 registered and 49 anonymous users online.
Recent Posts
Ocelot not working
by JPO
11/08/17 06:02 AM
Shout Box

Newest Members
brigiel, vevevie, zhutree, 416, saiqul
3003 Registered Users
Forum Stats
3003 Members
19 Forums
4004 Topics
23442 Posts

Max Online: 132 @ 11/13/16 10:07 AM
November
Su M Tu W Th F Sa
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 30