| Author | 
         | 
          
      
        
         
         objector Newbie 
          
  
  Joined: August 20 2011 Location: United States
 Online Status: Offline Posts: 31
          | 
        
         
          
           | Posted: September 09 2021 at 07:50 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Hi All,
 
 Searched all over but not having any luck...
 I'm trying to write a macro that will turn on an x10 
 switch to a brightness level of 100%. This switch has 
 the soft start and also can be dimmed/brightened by 
 holding the switch button in. Problem is that if it's 
 been dimmed and turned off, it resumes the previous 
 dim level when it is turned back on. I want it to turn 
 on to 100% by this macro.
 
 Any and all help appreciated.
 
 Thanks
 Derek
         | 
        
       
        | Back to Top | 
         
          
          
         | 
        
       
       
        |   | 
       
        
         
         dhoward Admin Group 
          
  
  Joined: June 29 2001 Location: United States
 Online Status: Offline Posts: 4447
          | 
        
         
          
           | Posted: September 09 2021 at 21:45 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Derek,
 
 Been a long time since I used X10 so I hope I remember the proper method.  You should be able to use this formula:
 
 ph_x10btn("X10ID",100,100)
 
 The "X10ID" is the ID of your device as defined in the PowerHome Explorer under PowerHome->Devices->X10->Units.
 
 If you wanted to send raw X10 commands, you should be able to do this:
 
 ph_x10("X10CTLRID","HC",UNIT,0) + ph_x10("X10CTLRID","HC",102,0) + ph_x10("X10CTLRID","HC",105,100)
 
 Check the help file for usage but "X10CTLRID" would be the ID of your X10 Controller, "HC" is the housecode of the device, and UNIT is the unit 
 number (1 to 16) of the device.
 
 If your X10 device supports extended commands or preset dim, then there would be other options as well.
 
 Hope this helps,
 
 Dave.
 
 
         | 
        
       
        | Back to Top | 
         
          
          
         | 
        
       
       
        |   | 
       
        
         
         objector Newbie 
          
  
  Joined: August 20 2011 Location: United States
 Online Status: Offline Posts: 31
          | 
        
         
          
           | Posted: September 10 2021 at 08:46 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Hi Dave,
 
 Thanks for responding. I'm still one of those with a 
 ton of x10, some over 20 years old!! Also have insteon 
 here and there.
 
 This code - ph_x10btn("X10ID",100,100) works fine on 
 most of my switches but on this particular one it 
 doesn't do anything. PH shows it as being on at 100% 
 but the actual light is still off. I believe I 
 remember that this switch supports extended commands 
 and I "think" direct dimming but not sure how to 
 attempt those either. I guess along with my switches 
 my brain has aged too!!
 
 Anyway, I certainly appreciate any and all help!!
 
 Derek
         | 
        
       
        | Back to Top | 
         
          
          
         | 
        
       
       
        |   | 
       
        
         
         objector Newbie 
          
  
  Joined: August 20 2011 Location: United States
 Online Status: Offline Posts: 31
          | 
        
         
          
           | Posted: September 12 2021 at 19:32 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
I'm a little late closing this off but the code:
 
 ph_x10("X10CTLRID","HC",UNIT,0) + 
 ph_x10("X10CTLRID","HC",102,0) + 
 ph_x10("X10CTLRID","HC",105,100)
 
 worked exactly as I needed.
 
 Thanks again Dave!!
 
 Derek
         | 
        
       
        | Back to Top | 
         
          
          
         | 
        
       
       
        |   | 
       
        
         
         dhoward Admin Group 
          
  
  Joined: June 29 2001 Location: United States
 Online Status: Offline Posts: 4447
          | 
        
         
          
           | Posted: September 16 2021 at 20:14 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Derek,
 
 Glad that worked for you  
 
 Dave.
 
         | 
        
       
        | Back to Top | 
         
          
          
         | 
        
       
       
        |   |       
      | 
    
   
  |