Comments (4)
Hi @PaulvdL,
the tuya add-on supports not only IoT devices branded directly by tuya, but also tuya-enabled devices of other manufacturers (e.g. FEIT electric). So I am confident that your Woox devices may work with this add-on out of the box as well (although I obviously cannot guarantee).
As stated in #28, the setup process for tuya devices is still a little more complicated than just pressing the pair button. So please follow the setup instructions given in the README.md to obtain the id and key values of your devices, which you then pass to the add-on in order to recognize them.
If you happen to own some more exotic devices (somebody once had a fireplace heater for instance) or devices which do not follow the common protocols (for instance a light bulb with a colour scheme the add-on does not know about yet), not all the properties may get recognized correctly. In this case, have a look at #9 and open a PR or just reach back to me here :)
Regards
from tuya-adapter.
Hi @PaulvdL,
the Product ID (16 characters)
key Product ID of the device
I am a little confused that you talk about "product ids". This sounds to me like some general property of a certain product. But the key value is rather a secret token generated during the handshake (what you did using tinytuya). This value is, like a password, used to protect your device from unauthorized use, and will be regenerated with every handshake.
Do you have any idea why my devices are not responding to my gateway instructions?
If the key is wrong (and you rather pasted some generic product ID into the add-on config) that's definitely a reason.
Could you please have a look at the log file (located in ~/.mozilla-iot/logs/run-app.log
) and paste the interesting regions of it here?
The TinyTuya software finds my Zigbee gateway, but not the devices connected to it.
I guess that's because your gateway is a tuya device, but the devices connected to it aren't (but rather Zigbee devices).
Do you know how I can connect them to the WebThings gateway?
Since they seem to use the Zigbee protocol rather than the tuya interface, I would suggest you to have a look at the affiliated add-on and maybe file an issue there: https://github.com/WebThingsIO/zigbee-adapter
I am also wondering how I can add new device types (and their properties) to the Tuya Smart Life add-on. Is that through your instructions in #9?
Exactly
I went into that and I noticed that was a process to create a clone of the Smart Life/Tuya android/Ios app. Can you explain what this has to do with the WebThings gateway?
I doubt to fully understand this question. But I guess the answer is: Absolutely nothing. This add-on is not much more than an adapter between the webthings gateway and the tuyapi (an open source library which allows javascript programs (like this add-on) to talk directly to tuya devices). Since that library requires you to obtain the id+key value of your devices, this add-on does so too. And the process involving the tuya developer account is just the most convenient way of obtaining these values afaik.
Regards :)
from tuya-adapter.
Hi everyone,
I have spent some time to find out how you can include Tuya compatible wifi smart devices in your WebThings gateway. Most of the information is available on the forum, but not in one place.
The Webthings gateway has a Tuya Smart Life add-on that enables you to find Tuya (+ compatible) devices in your network and add them to your Webtings gateway in order to monitor and control them.
The main problem is that the Tuya Smart Life add-on needs and id and a local key value of all the devices you want to add to your gateway.
To obtain this device information and to add the devices to the gateway, I did the following:
- Add your devices to your network by means of the proprietary app (Tuya, Smart Life, etc.) on your phone/tablet.
- Create a Tuya developers account on the iot.tuya.com website.
- Create a new project on the website (give it any name, it is not important).
- With the project you get a Access ID/Client ID and a Access Secret/Client Secret which you will need later in the process.
- Click on "Link Devices" on the left side of the screen. This will bring you to the Link Devices screen.
- Click on "Link devices by App Account" in the Link Devices screen.
- Click on the blue "Add App Account" button on the right side of the screen. This will bring up a QR code to the screen.
- Go to the Tuya (or similar) app on your phone go to the "Me" screen of the app.
- Click on the scanner icon in the right top corner of the screen. This will open the phone camera and scan the QR code.
- This will link your app user account to the project and it will connect the smart devices from your app to the project.
- Click on "Device List" on the left side of the screen and this will bring up a screen with the smart devices known to your app.
Attention: I had to change the "Region" field on the screen from China to Europe to make the device list visible! - You will notice that in the first column of the device list contains the Device name and the Device ID. You will need the ID's later in the process.
- Install the Tuya CLI tool on your Raspberry (npm i @tuyapi/cli -g (use sudo in case of error messages).
- Run the Tuya CLI tool (Tuya-CLI wizard). The wizard will prompt you for the following:
API Key: <give in the Access ID/Client ID from the project you created on the iot.tuya.com website>
API Secret Value: <give in the Secret/Client Secret from the project you created on the iot.tuya.com website>
Virtual ID: <give in one of the smart device id's from the device list mentioned above. It does not matter which one> - The tool will respond with a list of all the (Tuya compatible) smart devices in your network with their ID's and local keys.
- Go to the Add-ons screen of the WebThings gateway and add the Tuya Smart Life add-on to the gateway.
- Click on the "Configure" button of the Tuya Smart Life add-on and add an entry for each smart device.
(enter the ID, the local key and the device type (light, switch, etc. from a drop list). - Go to the Things screen of the WebThings gateway and click on the "+" button to search for new devices on the network.
- After scanning you will presented a list of newly found smart devices.
- Click on the "Save" button of all the devices you want to show on the Things screen
That's it folks!
from tuya-adapter.
Hi @PaulvdL,
Thank you for your great work! I have added a separate file with your setup instructions linked from the README.md
. Also, there is now a little more detailed contribution description.
Regards :)
from tuya-adapter.
Related Issues (20)
- Smart Video Doorbell (Wi-Fi) HOT 8
- Toggle action for devices with logical on/off HOT 4
- TreatLife SS02s HOT 2
- Attach tarball to v0.2.1 release HOT 1
- Devices disconnected HOT 9
- Error: Plugin returns the error Cannot find module 'p-queue' HOT 4
- Feit Electric Devices HOT 4
- Simplify setup process HOT 3
- Colour light bulb with different dps layout HOT 120
- Only one Tuya switch? HOT 3
- Devices disconnect and never come back HOT 14
- Jinvoo 2 gang wall switch HOT 1
- flash_scene_[1-4] support HOT 3
- Tuya Thermostat HOT 1
- iot subdomain no longer resolves on Tuya site HOT 1
- Dimmer for Jackyled plug HOT 10
- Lumary Dimmer Switch Configuration HOT 18
- Air conditioner HOT 6
- how to add new missing properties to a device? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tuya-adapter.