Versions Compared

Key

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

...

  1. A single component cannot control multiple physical devices. The component must control a unique physical device, so it must have a "device_id" characteristic, instead of passing it as a parameter.
  2. The "api_region", "api_key", and "api_secret" parameters must also be characteristics of the component, since they are static data as well.Actions "turnOn" and "turnOff" will be implemented asynchronously for simplicity. In another section we will implement an asynchronous component
  3. We will need a BACI property called "status", to check the device's current status (On/Off).

Repository

This is the repository with all the code and external libraries needed: https://bitbucket.sco.alma.cl/users/fcaro/repos/acs-baci-smart-bulb/browse. You should be able to insert your API credentials in the component's implementation and run this code as is.

...