You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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.

tuya_bulb.yml
working_dir: /home/developer/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

  • No labels