Please login or register.

Login with username, password and session length

Author Topic: all lights on  (Read 11696 times)

iraj.shafagh

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
all lights on
« on: December 11, 2008, 03:24:03 AM »

Hi every body.
I am new in x10 VB code writer.
I could send on and off command to a1 unit. unfortunately I don't know how to send all lights on command.
my code is like this
activehome1.object.sendaction "sendplc","alllightson"

is there any body to make a solution?

 >*<
Logged

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 305
  • Posts: 13259
Re: all lights on
« Reply #1 on: December 11, 2008, 06:48:19 AM »

The All Lights On command needs a house code. So maybe you have to send like AAlllightson.
So if you have lets say a House Codes A C and D in use. An All Lights On to A will not do the C or D.
Same goes for All Units Off and All Lights Off. All are House Code related.
Logged

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com
Re: all lights on
« Reply #2 on: December 11, 2008, 11:04:14 PM »

Hi every body.
I am new in x10 VB code writer.
I could send on and off command to a1 unit. unfortunately I don't know how to send all lights on command.
my code is like this
activehome1.object.sendaction "sendplc","alllightson"

is there any body to make a solution?

 >*<

The alllightson and allunitsoff commands address all unit codes (number) on only a single house code (letter).  So, if you have modules on other house codes, you will have to send those commands to one address in each of those house codes.

Example:

Code: [Select]
ActiveHome1.SendAction("sendplc", "a1 alllightson")
ActiveHome1.SendAction("sendplc", "b1 alllightson")
ActiveHome1.SendAction("sendplc", "c1 alllightson")
ActiveHome1.SendAction("sendplc", "d1 alllightson")

ActiveHome1.SendAction("sendplc", "p1 alllightson")

That's how it works for me anyway.  ;)

 >!
« Last Edit: December 14, 2008, 02:32:47 AM by -Bill- (of wgjohns.com) »
Logged
-Bill- (of wgjohns.com)
bill@wgjohns.com

In the real world, the only constant is change.

When I'm online you can find me in the Home Automation Chat Room!

iraj.shafagh

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Re: all lights on
« Reply #3 on: December 12, 2008, 02:10:42 AM »

Dear Sir. (Brian H & Bill)
thankyou for ur kind help.
would you plz let me know ur suggestion .

what is difference betwen these code

ActiveHome1.SendAction "sendplc", "a1 alllightson"
ActiveHome1.SendAction "sendplc", "b1 alllightson"

ActiveHome1.SendAction "sendplc", "a1 on"
ActiveHome1.SendAction "sendplc", "b1 on"

another thing.
if we send on command to all unit we should wait to much time for example if we have 20 unit we should wait 20*10sec at least to complete our work.

by the way Mr. Brian H told that

"All Lights On command needs a house code.So maybe you have to send like AAlllightson.
So if you have lets say a House Codes A C and D in use."
 
I cheeked that code . i don't know why , but it doesn't work for all light . it only works for our last unit that we send a command.

for example if we send on command to a2,  allllights command send same command to a2 only.

i find it by this code :

Private Sub ActiveHome1_RecvAction(ByVal bszAction As Variant, ByVal bszParm1 As Variant, ByVal bszParm2 As Variant, ByVal bszParm3 As Variant, ByVal bszParm4 As Variant, ByVal bszParm5 As Variant, ByVal bszReserved As Variant)
Debug.Print bszAction, bszParm1, bszParm2, bszParm3, , bszParm4, , bszParm5, bszReserved

End Sub

recvplc       a1            On                                                                                 
recvplc       a1            Off                                                                                 
recvplc       a1            AllLightsOn                                                                         
recvplc       a1            AllLightsOn                                                                         
recvplc       a2            On                                                                                 
recvplc       a2            Off                                                                                 
recvplc       a2            AllLightsOn                                                                         

also another problem.

this code doesn't on a unit:

ActiveHome1.SendAction "sendplc", "A AllLightsOn"
I am locking forward to hear more from you as son as possible.
regards
iraj
 >!
Logged

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com
Re: all lights on
« Reply #4 on: December 12, 2008, 10:16:07 PM »

Dear Sir. (Brian H & Bill)
thankyou for ur kind help.
would you plz let me know ur suggestion .

what is difference betwen these code

ActiveHome1.SendAction "sendplc", "a1 alllightson"
ActiveHome1.SendAction "sendplc", "b1 alllightson"

ActiveHome1.SendAction "sendplc", "a1 on"
ActiveHome1.SendAction "sendplc", "b1 on"

The top two will issue a single All Lights On command to house codes A and B (respectively) and all lamp modules on those codes will respond to it.  The module address "1" must be provided for the command to work, but it is actually ignored when the command is sent out.

The bottom two will issue an On command to modules addressed as A1 and B1 (respectively) only.

another thing.
if we send on command to all unit we should wait to much time for example if we have 20 unit we should wait 20*10sec at least to complete our work.

The All Lights On and All Units Off commands are special in that they only send the command and a house code, so they don't take much time.

Yes, if you sent a separate command to each unit, it would take more time.

Logged
-Bill- (of wgjohns.com)
bill@wgjohns.com

In the real world, the only constant is change.

When I'm online you can find me in the Home Automation Chat Room!

iraj.shafagh

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Re: all lights on
« Reply #5 on: December 13, 2008, 12:11:05 PM »

Dear Sir,
I am sorry but I have SDK CM15 and it dos'nt rply to this code:

  .sendaction "sendplc","a1 alllightson"
 >*<
regards
iraj
Logged

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com
Re: all lights on
« Reply #6 on: December 14, 2008, 02:36:44 AM »

Dear Sir,
I am sorry but I have SDK CM15 and it dos'nt rply to this code:

  .sendaction "sendplc","a1 alllightson"
 >*<
regards
iraj


Sorry, I just realized my code examples above were missing the "()"!

I just corrected that above.   :'

It should be:
.SendAction("sendplc", "a1 alllightson")

Woops!
« Last Edit: December 14, 2008, 02:40:23 AM by -Bill- (of wgjohns.com) »
Logged
-Bill- (of wgjohns.com)
bill@wgjohns.com

In the real world, the only constant is change.

When I'm online you can find me in the Home Automation Chat Room!

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com
Re: all lights on
« Reply #7 on: December 14, 2008, 03:34:20 AM »

Another thought just occurred to me.   -:)

alllightson will be ignored by appliance modules and camera power supplies.

What kind of module are you testing with?   ???
Logged
-Bill- (of wgjohns.com)
bill@wgjohns.com

In the real world, the only constant is change.

When I'm online you can find me in the Home Automation Chat Room!

iraj.shafagh

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 5
Re: all lights on
« Reply #8 on: December 14, 2008, 01:24:36 PM »

dear bill,
yes , ur write, my appliance modules is ka-226 and its not a light controlunit.
I found it when i were tiered and I went to batchroom. ifind it when i take ashower.
thank u very much and best regards.
iraj
 #:)
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.