Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To control a smart bulb using ACS we will implement a python component using the Component Generator tool.

Create component's YML template

The component generation tool uses a template in YML to create the component's IDL and implementation.

Code Block
languagecpp
titletuya_bulb.yml
linenumberstrue
working_dir: /home/francisco/workspace
prefix: ACSIOT
module: acsiot
component_name: TuyaBulb
functions:
  - 'void turnOn(in string api_region, in string api_key, in string api_secret, in string device_id)'
  - 'void turnOff(in string api_region, in string api_key, in string api_secret, in string device_id)'


Build and install IDL

Build and install component

Run component