Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
reg-is opened this issue Oct 21, 2016 · 7 comments
Open

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

reg-is opened this issue Oct 21, 2016 · 7 comments

Comments

@reg-is
Copy link

reg-is commented Oct 21, 2016

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

@adamkempenich
Copy link
Owner

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?

@ybarigou
Copy link

Does it control brightness ?

Thanks!

Youcef

@XilefTech
Copy link

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

@adamkempenich
Copy link
Owner

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

@Sidewinder-2011
Copy link

Sidewinder-2011 commented Oct 10, 2019

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
Copy link

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)

@XilefTech
Copy link

XilefTech commented Oct 10, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants