Closed jcf6288 closed 6 years ago
I cannot be sure, but if you look at the method comments for set, starting at line 210 in index.js, there is an example for using the option, dps. I believe this is the 'index' for the outlets on the device. When not specified, it looks to default to 1, which makes sense in single outlet devices. I have no multi-outlet devices so I cannot confirm, but should be easy enough to try.
Yes, it's possible. First, you should get the schema of your device by calling get({schema: true})
. Then, set the DPS index you want to change with set({dps: 2, set: true})
. See the docs for more details.
Is there a way to control individual outlets on a power strip? I can with pytuya but no with tuyapi. Thanks