magichome-python icon indicating copy to clipboard operation
magichome-python copied to clipboard

turn_on and turn_off aren't working with RGB-LED-Strip

Open reg-is opened this issue 9 years ago • 7 comments

I was able to get everything to work apart turn_on and turn_off which aren't working with my RGB-LED-Strip. I'm able to change the color but not to turn it on or off

reg-is avatar Oct 21 '16 15:10 reg-is

Thanks for posting this! I've been away from the development of this as I get settled in at a new job, city, and lifestyle. I've been ramping up a bit more lately to get back into home automation again.

For some reason, the RGB strips seem to exhibit strange behavior across the board, even when I send raw packets to the device. What version firmware is your RGB device on?

adamkempenich avatar Nov 22 '16 23:11 adamkempenich

Does it control brightness ?

Thanks!

Youcef

ybarigou avatar Sep 19 '19 20:09 ybarigou

Got the same problem, but at the moment my app isn't working so if there is another way to get the firmware version except for the app please tell me

XilefTech avatar Oct 04 '19 20:10 XilefTech

Sorry --- I've been away from this. Maybe the Flux python package that Home Assistant uses will work?

adamkempenich avatar Oct 10 '19 14:10 adamkempenich

Got the same problem, but at the moment my app isn't working so if there is another way to get the firmware version except for the app please tell me

to turn on and off , i edited magichome.py

and changed on/off to this

def turn_on(self): """Turn a device on.""" if self.device_type <= 1:

        self.send_bytes(0x71, 0x23, 0x0F, 0xA3)

    elif self.device_type == 2:
      
       
         self.send_bytes(0x71, 0x23, 0x0F, 0xA3)

    elif self.device_type == 3:
        
       
         self.send_bytes(0x71, 0x23, 0x0F, 0xA3)

    elif self.device_type == 4:
        
          self.send_bytes(0xCC, 0x23, 0x33)
    else:
        # Incompatible device received
        print("Incompatible device type received...")

def turn_off(self):
    """Turn a device off."""
    if self.device_type <= 1:
       
        
        
        self.send_bytes(0x71, 0x24, 0x0F, 0xA4)

    elif self.device_type == 2:
      
       
         self.send_bytes(0x71, 0x24, 0x0F, 0xA4)

    elif self.device_type == 3:
        
       
         self.send_bytes(0x71, 0x24, 0x0F, 0xA4)

    elif self.device_type == 4:
        
          self.send_bytes(0xCC, 0x24, 0x33)
    else:
        # Incompatible device received
        print("Incompatible device type received...")

my device type 0 and it works now

Sidewinder-2011 avatar Oct 10 '19 18:10 Sidewinder-2011

Does it control brightness ?

Thanks!

Youcef

brightness is do like this eg for bright red controller1.update_device(255, 0, 0). for dimmer reduce the red to a lower value eg controller1.update_device(50, 0, 0)

Sidewinder-2011 avatar Oct 10 '19 18:10 Sidewinder-2011

Hi,

Thanks for a reply! A little while after I have written this, I found out, that it worked with turn_on() and turn_off() I just forgot to post it/remove my reply on that thread.

Felix

[image: Mailtrack] https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5& Sender notified by Mailtrack https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5& 10.10.19, 21:28:44

http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virenfrei. www.avg.com http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Am Do., 10. Okt. 2019 um 16:30 Uhr schrieb Adam Kemepnich < [email protected]>:

Sorry --- I've been away from this. Maybe the Flux python package that Home Assistant uses will work?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/adamkempenich/magichome-python/issues/4?email_source=notifications&email_token=AMPINJAQ5S3A7V622HCSMB3QN44A3A5CNFSM4CTVKPU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA4SDKI#issuecomment-540615081, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMPINJCWOW23PWNV7KOHBSTQN44A3ANCNFSM4CTVKPUQ .

XilefTech avatar Oct 10 '19 19:10 XilefTech