You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// we can retrieve all the scenes (including their id)
58
+
$response = $tuya->getScenes();
59
+
echo '<pre>';
60
+
print_r($response);
61
+
echo '</pre>';
62
+
63
+
// and we can start a scene
64
+
$response = $tuya->startScene('the_scene_id');
56
65
} catch (Exception $e) {
57
66
echo 'Error: ' . $e->getMessage();
58
67
}
59
68
?>
60
69
```
70
+
71
+
The different commands can be foundby going to your project in the [Tuya Cloud Development platform](https://eu.platform.tuya.com/cloud/), then click on the device and you can find the options.
72
+
73
+
Examples:
74
+
- a curtain can have the `command``open`, `close`, or `stop`
75
+
- a light will have `switch_led` with `true` or `false`
76
+
- a power strip with 2 outlets with have `switch_1` with `true` or `false`, and the same for `switch_2`
0 commit comments