ADICON Support Forum Applied Digital, Inc.
Page 1 of 1 1
Topic Options
#17751 - 03/16/07 05:23 PM Making a One Button Light Switch
sash18 Offline
journeyman


Registered: 08/31/05
Posts: 61
Loc: Melbourne
Hi Guy's

I'm trying to get a light to turn on and off based on a one push of the screen button and then if I push it again, I want it to turn off again. I thought I should do it with respect to the status button but I'm now thinking this is a bit dodgy. I cab get the light to turn on, but not off. Some coding advice would help me here;

IF Variable #0 is >0
IF Variable#63 / Screen # is = 8
AND Touch Object #122, Button Leopard is pressed
THEN X-10 House A / Unit 2, Turn ON

IF Variable #0 is >0
IF Variable#63 / Screen # is = 8
AND Touch Object #122, Button Leopard is pressed
AND X-10 House A / Unit 2, Is ON
THEN X-10 House A / Unit 2, Turn OFF

My other problem seems to be that the pages on the Leo 2 dont not roll over quick enough. That is; when you go from one page to the next it seems to take 1 or 2 seconds to get going. Is there something I'm missing here?

Cheer's
Sash

Top
#17752 - 03/16/07 07:28 PM Re: Making a One Button Light Switch [Re: sash18]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
The "IF Variable #0 is > 0" looks like its part of an initialization routine so it shouldn't be needed here. Testing the screen you're on is also not needed since the touch object (button) will only respond if you're on the right screen to begin with. So what happens if you try this?

IF Touch Object #122, Button Leopard is pressed
AND X-10 House A / Unit 2, Is OFF
THEN X-10 House A / Unit 2, Turn ON
THEN Skip to line xx

IF Touch Object #122, Button Leopard is pressed
AND X-10 House A / Unit 2, Is ON
THEN X-10 House A / Unit 2, Turn OFF

(line xx)
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#17753 - 03/16/07 09:33 PM Re: Making a One Button Light Switch [Re: Guy Lavoie]
sash18 Offline
journeyman


Registered: 08/31/05
Posts: 61
Loc: Melbourne
Thanks Guy, it almost worked. I can see the logic is better your way. But it still doesnt turn the stupid light off. I've monitored the signal via te x-10 monitor thingy. It registers as its gone through but doesn't actually turn off. If I then use my remote control x-10/RF thingy, it works.

Whats up with this? You never answered my question on page speed...thanks in advance.

Cheer's
Sash

Top
#17754 - 03/17/07 07:12 PM Re: Making a One Button Light Switch [Re: sash18]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
I just tried that exact same code on a Leopard and its working fine. What kind of light module are you using?

For the screen speed, it can sometimes take about a second for the screen to actually switch, and it takes a about a second to draw the new screen.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#17755 - 03/18/07 04:27 PM Re: Making a One Button Light Switch [Re: Guy Lavoie]
sash18 Offline
journeyman


Registered: 08/31/05
Posts: 61
Loc: Melbourne
I'm using one of these Marmitek LW12 Dimmable Micro Modules.

Link;

http://www.envioustechnology.com.au/products/product-detail.php?prodCode=LW12

Seems to work with my remote control, but not my Leo 2. I remember once upon a time, it used to work with both. I'm not thinking something is interfering with it.

With regards to the speed between pages, isn't there a variable that can be set to make it scan quicker (i.e. it doesn't have to scan all the lines of code to do its thing).

Cheer's
Sash

Top
#17756 - 03/18/07 04:52 PM Re: Making a One Button Light Switch [Re: sash18]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
The only thing I can think of is if the module has trouble because the command pair would be sent too fast or something like that. Does it work if you code it with two seperate buttons? Or with two single X-10 commands instead of a command pair? Also, does you Leopard have the 50 Hz PIC?

There are no parameters or settings for the screen refresh speed. It is normal for the response to be a bit slower if the total number of lines in the program gets large (like 1000 lines or more).
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#17757 - 03/18/07 06:05 PM Re: Making a One Button Light Switch [Re: Guy Lavoie]
sash18 Offline
journeyman


Registered: 08/31/05
Posts: 61
Loc: Melbourne
I'll try adding another button for the off command tonight and let you know.

50Hz PIC? What is this all about? I need more info. How do I check to see that I have it or not?

Kewl, speed cannot be changed, I'll live with it.

Cheer's
Sash

Top
#17758 - 03/18/07 06:49 PM Re: Making a One Button Light Switch [Re: sash18]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

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


50Hz PIC? What is this all about? I need more info. How do I check to see that I have it or not?





The PIC chip inside the Ocelot or Leopard handles IR and X-10. For countries with 50 Hz power, you need the version that has the proper timing for this. If you bought your Leopard locally it should have come with the right PIC, but lets just make sure. To know which version you have, use C-Max to attach to the controller and look at the "Firmware" version at the lower left of the screen (eg: V8.23/158). Report here what you see.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#17759 - 03/18/07 07:10 PM Re: Making a One Button Light Switch [Re: Guy Lavoie]
sash18 Offline
journeyman


Registered: 08/31/05
Posts: 61
Loc: Melbourne
Ok, great, I'll check it out tonight and tell you want I see.

Cheer's
Sash

Top
#17760 - 03/20/07 04:11 AM Re: Making a One Button Light Switch [Re: sash18]
sash18 Offline
journeyman


Registered: 08/31/05
Posts: 61
Loc: Melbourne
Ok, I have Firmware V8.23/158 and Application V3.08

I guess it doesnt really matter anyway since the unit started to work when coded with two buttons (one for on and one for off). Not sure what was happening to it but yeah, its all good for now. I'll check it with the above code now to see if that will work.

Cheer's
Sash

Top
#17761 - 03/20/07 06:54 AM Re: Making a One Button Light Switch [Re: sash18]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
Well the 158 in your firmware version shows that its a 60 Hz PIC. That might be the source of your unusual X-10 operation. The toggle button function is relying on the status table to know if the light is already on or off, and the status table is updated from X-10 commands recieved over the powerline. Maybe the X-10 still works when recieving 60 Hz timed signals from the Leopard, but the Leopard might not be recieving its own 60 Hz timing correctly. I'm just guessing here though. You should contact whoever you got the Leopard from and ask about getting the right PIC for 50 Hz power.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#17762 - 03/20/07 01:33 PM Re: Making a One Button Light Switch [Re: Guy Lavoie]
sash18 Offline
journeyman


Registered: 08/31/05
Posts: 61
Loc: Melbourne
60Hz....I cant contact the person I got it from anymore. I dont think they no longer exist. I was an ebay job. Man, I spewing now. What exactly is involved in changing it over? Can I take it to some place locally that has the knowledge to do it?

Cheer's
Sash

Top
#17763 - 03/20/07 02:50 PM Re: Making a One Button Light Switch [Re: sash18]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
Its just a chip (in a socket) that needs to be swapped. Try sending an email to adiinfo@appdig.com and ask about it. They might be able to get you one directly, or redirect you to a local reseller that can get you one. Here is a reseller in the US that has it:

http://www.automatedoutlet.com/product.php?productid=406&cat=0&page=1

Its the same chip for an Ocelot or a Leopard.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
#17764 - 03/20/07 03:06 PM Re: Making a One Button Light Switch [Re: Guy Lavoie]
sash18 Offline
journeyman


Registered: 08/31/05
Posts: 61
Loc: Melbourne
Yep, I'll send them an email today....

Thanks for that. BTW, what should it say to be sure its a 50Hz PIC?

Cheer's
Sash

Top
#17765 - 03/20/07 08:47 PM Re: Making a One Button Light Switch [Re: sash18]
Guy Lavoie Administrator Offline
Beyond All Hope
*****

Registered: 12/21/02
Posts: 6548
Loc: Montreal, QC, Canada
I think the number would be 159 instead of 158.
_________________________
"If you don't know what you're doing, do it neatly..."

Top
Page 1 of 1 1


Moderator:  Dan Smith, Monte G, ADI Tech Support, Guy Lavoie, Bobkat 
Hop to:
Who's Online
0 registered and 65 anonymous users online.
Recent Posts
Ocelot Battery
by ADI Tech Support
Today at 07:38 AM
Comms Retry Error
by HDTVPete
09/18/17 04:04 PM
Cmax Message: Failed to set data for a 'delay'
by HDTVPete
09/16/17 04:36 PM
Shout Box

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

Max Online: 132 @ 11/13/16 10:07 AM
September
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