-
-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
To use Tuya devices with the FastyBird IoT ecosystem, you will need to configure at least one connector. The connector can be configured using the FastyBird IoT user interface or through the console.
There are two types of connectors available for selection:
- Local - This connector uses the local network for communication.
- Cloud - This connector communicates with the Tuya cloud instance.
Before using the Tuya connector, you will need to pair your Tuya devices with the Tuya cloud platform and mobile app. Refer to your device's manual for instructions on how to do this.
In order to use the Tuya connector, you will need to obtain certain access credentials. These can be obtained by following these steps:
To get started, go to iot.tuya.com and either create a new account or log in if you already have one. Note that this account is different from the account you use for the Tuya mobile app.
Note
Tuya frequently updates their portal and the process for obtaining credentials may change. If you have trouble following these instructions, please create an issue or pull request with screenshots so we can update them.
From side menu select cloud platform:
And now click on "Create Cloud Project" button:
Fill in you new project details a do not forget to select all Data Centers you are using in your Tuya application:
Now you have to authorize basic Tuya services. This services enables OpenApi for you cloud project and this API interface will be used by Tuya connector to get devices details.
On the overview page you could find your Access ID and Access Secret. Note these credentials, you will use them later.
Open Devices tab and then open Link Tuya App Account and click on Add App Account
Scan given QR code with you Tuya application, and follow steps shown in you application. When application authorization is finished, you will see your devices in the Devices list.
After your devices are linked with your Tuya cloud account you are able to get Tuya user identifier.
To configure the connector through the console, run the following command:
php bin/fb-console fb:tuya-connector:install
Note
The path to the console command may vary depending on your FastyBird application distribution. For more information, refer to the FastyBird documentation.
This command is interactive and easy to operate.
The console will show you basic menu. To navigate in menu you could write value displayed in square brackets or you could use arrows to select one of the options:
Tuya connector - installer
==========================
! [NOTE] This action will create|update|delete connector configuration
What would you like to do? [Nothing]:
[0] Create connector
[1] Edit connector
[2] Delete connector
[3] Manage connector
[4] List connectors
[5] Nothing
If you choose to create a new connector, you will be asked to choose the mode in which the connector will communicate with the devices:
In what mode should this connector communicate with Tuya devices? [Cloud server mode]:
[0] Local network mode
[1] Cloud server mode
> 0
You will then be asked to provide a connector identifier and name:
Provide connector identifier:
> my-tuya
Provide connector name:
> My Tuya
In the following steps, you will need to input your Access ID and Access Secret, which you obtained previously.
Provide cloud authentication Access ID:
> q3ctsrwvcqdprx5kjtm7
Provide cloud authentication Access Secret:
> dc098fa182774e1ca292e76328f8beb6
Provide which cloud data center you are using? [Central Europe]:
[0] Central Europe
[1] Western Europe
[2] Western America
[3] Eastern America
[4] China
[5] India
> 0
Tip
It is necessary to chose correct data centre which you used during registration.
After providing the necessary information, your new Tuya connector will be ready for use.
[OK] New connector "My Tuya" was successfully created
With this console command you could manage all your connectors and their devices. Just use the main menu to navigate to proper action.
You can also configure the Tuya connector using the FastyBird IoT user interface. For more information on how to do this, please refer to the FastyBird IoT documentation.
Tip
If you find incorrect or missing information, feel free to notify us. You could use the issue tracker or mail or X network for any idea that can improve the project. Thank you for testing, reporting and contributing.
Homepage https://www.fastybird.com and repository https://github.com/fastybird/tuya-connector.