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

color change on led strip #481

Open
Dadzzio opened this issue Apr 1, 2024 · 3 comments
Open

color change on led strip #481

Dadzzio opened this issue Apr 1, 2024 · 3 comments

Comments

@Dadzzio
Copy link

Dadzzio commented Apr 1, 2024

hey i have no idea how to send a cloud command to my bulb device (led strip) to change a color via rgb. i tried many ways, hsv to hex, dec to hex idk really i nueed help to create a command.
properties:

{
  'result': {
    'category': 'dd',
    'functions': [
      {
        'code': 'switch_led',
        'desc': '{}',
        'name': '开关',
        'type': 'Boolean',
        'values': '{}'
      },
      {
        'code': 'work_mode',
        'desc': '{"range":["white","colour","scene","music"]}',
        'name': '模式',
        'type': 'Enum',
        'values': '{"range":["white","colour","scene","music"]}'
      },
      {
        'code': 'colour_data',
        'desc': '{"maxlen":255}',
        'name': '彩光',
        'type': 'String',
        'values': '{"maxlen":255}'
      },
      {
        'code': 'scene_data',
        'desc': '{"maxlen":255}',
        'name': '场景',
        'type': 'String',
        'values': '{"maxlen":255}'
      },
      {
        'code': 'countdown',
        'desc': '{"min":0,"max":86400,"scale":0,"step":1}',
        'name': '倒计时剩余时间',
        'type': 'Integer',
        'values': '{"min":0,"max":86400,"scale":0,"step":1}'
      },
      {
        'code': 'music_data',
        'desc': '{"maxlen":255}',
        'name': '音乐灯',
        'type': 'String',
        'values': '{"maxlen":255}'
      },
      {
        'code': 'control_data',
        'desc': '{"maxlen":255}',
        'name': '调节',
        'type': 'String',
        'values': '{"maxlen":255}'
      }
    ],
    'status': [
      {
        'code': 'switch_led',
        'name': '开关',
        'type': 'Boolean',
        'values': '{}'
      },
      {
        'code': 'work_mode',
        'name': '模式',
        'type': 'Enum',
        'values': '{"range":["white","colour","scene","music"]}'
      },
      {
        'code': 'colour_data',
        'name': '彩光',
        'type': 'String',
        'values': '{"maxlen":255}'
      },
      {
        'code': 'scene_data',
        'name': '场景',
        'type': 'String',
        'values': '{"maxlen":255}'
      },
      {
        'code': 'countdown',
        'name': '倒计时剩余时间',
        'type': 'Integer',
        'values': '{"min":0,"max":86400,"scale":0,"step":1}'
      }
    ]
  },
  'success': True,
  't': 1711995496458,
  'tid': ''
}
@jasonacox
Copy link
Owner

Hi @Dadzzio - did you happen to try/adapt the bulb.py script? https://github.com/jasonacox/tinytuya/blob/master/examples/bulb.py

@Dadzzio
Copy link
Author

Dadzzio commented Apr 2, 2024

@jasonacox hey i wat to send a cloud command because my led strips aren't on my lan.

@Dadzzio
Copy link
Author

Dadzzio commented Apr 2, 2024

@jasonacox nvm, i looked at BulbDevice.py and there is an converter. In 5h i'll post an update.

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

2 participants