Homey App for the Tuya cloud.
This app was based on the Home Assistant implementation. Tuya has an undocumented API for Home Assistant that differs from the official API. This API supports login with credentials only with that API. The official API is also supported now. It requires an extra development account and keys. The API is also returning keys for local control, so maybe it’s in the future also possible to local control devices. But commands are not yet available.
- PIR sensor
- Smoke sensor
- Contact sensor
'Existing legacy devices can be used as long as they are paired, but can’t be added anymore
- Legacy Light ( On/Off, some devices brightness and color)
- Legacy Switch( On/Off)
- Legacy Cover
The official API( non legacy devices) is using push messages, so changes to devices should be direct visible, so no more 10 minutes waiting for updates.
Color settings are not supported for all legacy devices, if it’s not working for your light, it’s not supported by legacy API. The new light devices have better support, but it’s still possible that your device is not supported yet.
Only when device is supported by API, it’s possible to add the device to this app. because I don’t own all device types, it’s hard to implement a device type which I don’t own. Contributions to code are welkom to add unsupported devices.
This app support the use of scenes. In the mobile Tuya/Smart life app you can make ‘Tap to run’ actions( In the past they where called scenes). Those actions can be called in a flow from this app.
The scenes for the official API are not automatically updated, for now new scenes will only appear after a restart of this app.
- Go to the setup page in mobile app or develloper portal
- Set Username, Password and CountryCode These are the same as with first login of the mobile app
It won’t work with linked Cloud accounts like Google, Facebook or other
- Set Business. This is Smart life or Tuya and corespondents with mobile app you use
The colormap can be leaved empty. this is experimental and is used to correct the colors between Homey and the lights. It also only works for legacy lights and not for the new device types. If you want to use it, it has the flowing format:
The values are between 0-360. You have to include 0:0 and 360:360 Example:
This corrected for me the yellow color
To use the new API you should follow the same basic instruction as for Home assistant/ Homebridge.
- Tuya IoT Platform Configuration
- Set the APi to use to both or Official
- The authorization key acces key and secret from step 1have to be filled in on the settings page.
The country code is used to determine which datacenter has to be used and must match with your android app and region of your project. Only the number is allowed, no leading zero’s or + sign. Look in the link for correct numbering, it can be different for some countries then the known phone prefix.
Mappings Between OEM App Accounts and Data Centers-Documentation-Tuya Developer
- Username, Password are the same as with first login of the mobile app
It won’t work with linked Cloud accounts like Google, Facebook or other!!!
It’s your mobile phone app login credentials, and not develloper portal credentials!!!
AFTER creating and linking the IoT cloud project, one day you’ll receive an email message from Tuya.
They write: Your Tuya service subscription is about to expire and you’ll have to renew it.
It is safe to ignore. This API is free of charge.
You have to add the devices again to use the functionality of new API.
If You don’t need the legacy devices anymore, you can delete the legacy devices. When you don’t have legacy devices anymore, set the API dropdown to official only.
- Add other possible device types
- Support renaming of devices (so Tuya device names and Homey device names stay in sync)
- Translation of texts
- Fixed text are now moved to language files
- Dutch and English now supported
- Add other manufacturer Tuya apps
- Replace settings page by setting device
The last point is needed to support Homey Cloud, until this is fixed, Homey Cloud isn’t supported and only Homey PRO is supported.