Well, I just tested and indeed it works on the Gladys PC…
The plug is properly detected, the switch works. Power consumption info is missing but that will come later.
Well, I just tested and indeed it works on the Gladys PC…
The plug is properly detected, the switch works. Power consumption info is missing but that will come later.
Cool
Thanks for retesting!
@Lokkye keep me posted as soon as the PR reviews look good so I can re-review ![]()
hello @Lokkye
I may be a bit late, but for me my three Tuya devices work correctly for on/off.
It’s never too late for tests, thanks ![]()
For the shutters, I didn’t do the integration but if you send me the Gladys logs when you click « scan », I should be able to add them easily.
As for color, it’s strange because I have a color bulb and it works fine for me. Could you remove the device and send me the logs when you scan the devices?
hello @Lokkye
here are the logs after running a scan,
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "flash_scene_4" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "work_mode" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "colour_data" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "scene_data" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "countdown" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "control_data" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "percent_control" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "cur_calibration" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "control_back_mode" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "tr_timecon" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "percent_control" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "cur_calibration" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "control_back_mode" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "tr_timecon" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "countdown_1" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "tr_timecon" code is not managed
2023-07-03T10:33:35+0200 \u003cwarn\u003e tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
I ran the command « docker logs gladys-test-tuya », I don’t know if that was what you wanted?
voila les logs apres avoir supprimé la smart led couleur et le bandeau led couleur
2023-07-03T10:43:22+0200 <info> tuya.discoverDevices.js:36 (TuyaHandler.discoverDevices) 11 Tuya devices found
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "work_mode" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "bright_value" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "temp_value" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "colour_data" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "scene_data" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "flash_scene_1" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "flash_scene_2" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "flash_scene_3" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "flash_scene_4" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "work_mode" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "colour_data" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "scene_data" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "countdown" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control_data" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "percent_control" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "cur_calibration" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control_back_mode" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "tr_timecon" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "percent_control" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "cur_calibration" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control_back_mode" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "tr_timecon" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "countdown_1" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "tr_timecon" code is not managed
2023-07-03T10:43:24+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:29+0200 <info> device.destroy.js:62 (DeviceManager.destroy) Deleting device tuya-bffe51721bd393b51cq9pr, device has 15 states in DB
2023-07-03T10:43:37+0200 <info> tuya.discoverDevices.js:36 (TuyaHandler.discoverDevices) 11 Tuya devices found
2023-07-03T10:43:37+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "work_mode" code is not managed
2023-07-03T10:43:37+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "bright_value" code is not managed
2023-07-03T10:43:37+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "temp_value" code is not managed
2023-07-03T10:43:37+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "colour_data" code is not managed
2023-07-03T10:43:37+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "scene_data" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "flash_scene_1" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "flash_scene_2" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "flash_scene_3" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "flash_scene_4" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "work_mode" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "colour_data" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "scene_data" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "countdown" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control_data" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "percent_control" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "cur_calibration" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control_back_mode" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "tr_timecon" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "percent_control" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "cur_calibration" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control_back_mode" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "tr_timecon" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "countdown_1" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "tr_timecon" code is not managed
2023-07-03T10:43:38+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:45+0200 <info> tuya.discoverDevices.js:36 (TuyaHandler.discoverDevices) 11 Tuya devices found
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "work_mode" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "bright_value" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "temp_value" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "colour_data" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "scene_data" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "flash_scene_1" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "flash_scene_2" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "flash_scene_3" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "flash_scene_4" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "work_mode" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "colour_data" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "scene_data" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "countdown" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control_data" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "percent_control" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "cur_calibration" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control_back_mode" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "tr_timecon" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "percent_control" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "cur_calibration" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control_back_mode" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "tr_timecon" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "countdown_1" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "tr_timecon" code is not managed
2023-07-03T10:43:46+0200 <warn> tuya.convertFeature.js:17 (convertFeature) Tuya function with "control" code is not managed
Hi @Lokkye!
As I said in the chat I finally managed to pick up a Tuya device by stopping by Action this weekend ![]()
I found an LSC Smart Connect smart plug at €8.99, worth it!
The plug is rather compact and stylish:
I install the Tuya app, and I create an account, then I click on « add a device »:
I press the plug’s button for 5 seconds to reset it:
The Tuya plug becomes visible:
I enter the Wi‑Fi password:
The plug is successfully connected:
I rename it to give it a clearer name:
The plug becomes controllable with one click:
On the Gladys side, after configuring the Tuya developer account, I can see my plug:
And I can control it from the dashboard:
@Lokkye For me it’s a total success
Well played ![]()
Before adding other devices, for me the first step would be to make a first release of this version that already works great
Are you good on the documentation side? And is the PR ready?
So I’m looking forward to it!
Thanks, it’s great that you didn’t have any problems.
Well, the doc is in this post so I think I should put it elsewhere but I don’t know where.
The PR is ready, I just implemented the last feedback you gave.
Hello, @Lokkye
Have you been able to see why the color functions don’t appear on my lamps?
Yes, I can clearly see the problem. For the moment, I haven’t implemented all the features of the connected devices. I just did it in the PR for your lamps. But as @pierre-gilles said, we can easily add them after this first step.
I’m currently rebuilding a Docker image with the latest changes.
Great, nice work ![]()
I’ll wait to test it then
I’d appreciate it if you opened a PR for the documentation ![]()
The documentation is open-source:
Example of a PR to add the documentation for a new integration:
I’ll take a look and give you feedback
@Lokkye I reviewed the PR: https://github.com/GladysAssistant/Gladys/pull/1788#pullrequestreview-1514956754
Nothing serious, it’s a great PR
Congrats on the awesome work!
I think two things are missing:
Once it’s ready, tell me and I’ll do a final test and if it’s good I’ll merge to prod!
For the rest of the integration, if you ever need more hardware @Lokkye, don’t hesitate, I’ll happily send you hardware like the first time ![]()
Nice job ![]()
I just created the PR for the documentation :
I’ve just pushed the fixes from the PR feedback and I’ve just added the tab for the documentation
A new Docker image will be ready in about 1 hour (delogzway/gladys:tuya)
The documentation is fine by me!
However the link on the side causes a front-end crash for me:
Make sure that user is properly defined when you call this component ![]()
Another remark regarding « componentWillReceiveProps »:
It’s the same issue as the other PR — the risk here is that if the props are updated (without the device necessarily changing), it completely resets the device in the state. (After all, in this case it might not be a problem; I just want to make sure you’re aware of the behavior) ![]()
Yes I had just forgotten that for the setup
I fixed it in the PR.
Normally, in this case, there shouldn’t be a problem. (But I’m not a fan of the solution, I’ll see if using a useEffect bound to changes of the prop "device" works. I’ll do that later)
I think it’s fine like this for this component, no need to change ![]()
I’m not very keen on useEffect; React hooks are really a nest of bugs, I find ![]()
Thanks for the fixes @Lokkye, it’s good for me!! ![]()
I just merged the integration into master, which will be included in the next Gladys release
![]()
Available in Gladys Assistant 4.26 :
I’m closing this topic, feel free to create another topic for future developments ![]()