Skip to content

hao159/tuya-connect-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

tuya-connect-php

Sample connect Tuya cloud

Get started

Tuya IoT Development Platform : Quick start

usage

new obj

require_once 'ConnectTuya.php';

$tuya_obj = new ConnectTuya();

get access token

$response_token = $tuya_obj->get_token();
print_r($resonse_token);

Set command

$commands_off = array(
    array(
        "code" => "switch_1",
        "value" => false
    )
);
# tt ổ điện
$result_switch_off = $tuya_obj->send_commands($device_id, $commands_off, $access_token);
print_r($result_switch_off);

More function at:

Cloud Services API Reference

About

Sample connect Tuya cloud

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages