-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tuya Update. #3218
Tuya Update. #3218
Conversation
Tuya device need manufacture name to be reconized, and it s not possible with API actual code so I m using 2 tips
Tuya covering are now working open/close/stop/lift and reverse as setting. |
And all is working, adding 2 tuya covering, a router and an end device. |
Any reason why is not included? Atm only way to use it is moving to z2mqtt ;/ |
Am I correct that other PRs created after this one got merged? WTF? This is not cool at all :(
Does this mean that this PR (created 15 days ago, way before 10th) will not get in to stable till November? Can someone explain? |
Yep, sorry, Dresden have no problem with the code but the version 81 is a stable version with lot of improvements, the tuya code is not a "light code" so it was too dangerous to put it in a stable version. |
I'm using official Docker image with Conbee2, on HA side I'm using https://www.home-assistant.io/integrations/deconz. BTW, I think this info should be here as soon as it was clear that this PR will not be merged into next beta. |
Because the 82 was out almost in same time than the 81 (less than 2 days) I think the PR will be validated in same time, an alpha will be available to test it (or a beta). |
We have no way, will wait. |
I pulled down your updated tuya branch, recompiled, and moved over the new lib. I deleted the old device, ran a rescan, and I'm seeing the motor come in on the VNC client, but nothing is showing in Postman. The model is a ZM25TQ according to the label on it. G |
Ok so I have checked the code again, I have missed something, but you need to have a bulb device for it ATM. It s a long story, but to make short tuya device need 2 inclusions, 1 to write on database usefull information, but the device can be bad reconized, and a second one where deconz read the previous data to make the correct inclusion. If it still don't work with the actual code, can you make this test :
If it s still not working I need the manufacture number to force the detection, on the node info panel. |
Also noticed this error in the compilation - not sure if it's relevant/important, but just in case. specs/linux-g++ -o release/green_power.o green_power.cpp |
Also noticed this one.. tuya.cpp: In member function ‘bool DeRestPluginPrivate::SendTuyaRequestThermostatSetWeeklySchedule(TaskItem&, quint8, QString)’: G |
OK, tried several times, and it's still not including properly. Looking at #3161 @andysaab has the same motor as me, but it looks like his is/was being included as a light, where my one seems to be including as a smart plug. He also seems to have a different manufacturer name and model Identifier from my one And mine is a ZM25TQ, as is his. G |
There is a difference beetween your both device, his have the cluster 0x0006 and the tuya cluster is hidden, yours haven't the cluster 0x0006 but have the cluster tuya visible. To create the "device" the code search for cluster 0x0006 (this is the native working mode) or tuya cluster (I think the problem is from here ^^). The warning are not dangerous. I have modified the code to force the device creation, even if the code don't see the tuya cluster (I think it s the problem). Don't delete the node beetwen 2 inclusions. If it s still not working I need the debug log during the inclusion ( 30s before up to 2 mn after)
Edit:
You are seing the plug ? If yes it s a good new, it mean the code is working. |
OK. It's still showing as a Smart Plug rather than a light. I'll do the inclusion again after breakfast with the debugging and update here. Just as a sanity check, here's the motor I'm using. So it looks the same as the one @andysaab has - at least from the outside. |
Yeah ! Exactly the same model ... BTW, if the "plug" device is visible, do you have the device json ? |
The plug is visible in the GUI via VNC, but Postman doesn't show anything sadly. G |
Now, I do have 3 of these motors (the other 2 are mounted and a pain to get to the pairing button). I paired the first one I got with either .84 or .85, and it DID pair - doesn't work via deConz though. This is the JSON for the one that paired previously. "17": { G |
OK. Just did a git pull, and I see the code has been updated.
Copied the updated the lib file and rebooted. Still nothing showing in Phoscon or Postman. Going to try and run the debug version now. G |
OK, I'm missing something.... /usr/bin/deCONZ --dbg-error=2 --dbg-info=2 --http-port=80 QCoreApplication::arguments: Please instantiate the QApplication object first |
Try with but it have worked with version 84 and 85, but not the last one ? Edit: |
I've just done that, and also added StandardOutput=file:/home/pi/logs/deCONZ-output.log into the service startup, but it didn't generate the log files. There's a whole load of data in syslog if that's of any use? G |
Both are working, It will depend of size I think BTW, I have just edited my previous post The working is "_TYST11_wmcdj3aq" |
That's correct on the working vs non working. However, both are ZM25TQ motors. I'm guessing there was some change in the logic of the inclusion, and it's not being detected incorrectly? G |
Ok have find the problem, give me 10 mn |
Ok, no bad idea, I will check your log, because I realy don't see what is missing. I think the working device have the cluster 0x0006, I know where the problem is from, but I don't understand why. |
Here's the syslog. I'll have another run one this posts. G |
Ok, this time I have found. It s an old code that I have removed, and was back because of a mistake in PR, to resume it blacklist the mac adress of this device |
OK. Did the pull From https://github.com/Smanar/deconz-rest-plugin And we get a compilation error. rest_sensors.cpp: In member function ‘int DeRestPluginPrivate::changeSensorConfig(const ApiRequest&, ApiResponse&)’: |
OK. Removed rest_sensors.cpp from my local copy and did a git pull again. Clean compilation this time, not sure why I was getting an error last time. The GUI still shows it as a Smart_Plug Phoscon seems to think it's a thermostat But the JSON looks respectable "21": { |
I'm guessing the errors are because it still thinks it's a plug, rather than a light, even though the JSON looks correct? curl -H 'Content-Type: application/json' -X PUT -d '{"lift": 50}' http://192.168.42.130:80/api/XXXXXXXXXX/lights/2/state curl -H 'Content-Type: application/json' -X PUT -d '{"bri": 50}' http://192.168.42.130:80/api/XXXXXXXXXX/lights/2/state Now, the "on" command is accepted, but doesn't do anything on the motor. curl -H 'Content-Type: application/json' -X PUT -d '{"on": true}' http://192.168.42.130:80/api/XXXXXXXXXX/lights/2/state G |
It s because I m on several device in same time, and use the github to transfert the code from a machine to another, the code have moved 10/15 time just today ^^, you have made a "git pull" just beetween a corrective. For the plug type, it s something normal, look at the node title in deconz "Smart Plug" it s the real value, send by the device itself, I m using a hack for the type was "Window covering device" but for zigbee standard, this device is a plug. But why a thermostat in phoscon ? Here, I realy don't have idea ... And you have made a mistake with your commands, you are using the id = 2, and on the json the id = 21. |
Dang, yup... 2 does not equal 21. SO, changing that to 21... Open true turns the motor one way. Close, either true or false does nothing. I can't find a way to stop the motor from turning - I presume once I set the limits it will stop, but there should be a command to stop it? The remote control does stop it, which is what I'm using at the moment. Lift and Bri generate a success error message, but don't do anything with the motor. Is that expected? G |
As for Phoscon, I just use that for doing the inclusion, and making sure that the lights work. In the DeConz GUI, it's still showing as a Smart Plug - is that how it should be? And not a light? G |
Yep, hack not possible in deconz ^^, deconz is a "zigbee management software" not a domotic app, so the zigbee rules need to be respected at maximum for me, that you see in deconz need to be the reality. To stop the covering And yes, it depend of device, but generally they need a calibration step, to stop itself and to enable the "bri"/"lift" command. But if you still have problem for calibration pls use a similar issue or create a new one, we have realy abused with PR usage ^^. |
Yes, "stop": true does stop the motor. I should have tired that - I was expecting to see something in the state area for that; my bad. Once I get my screen hung, I'll get the limits set, and see if the bri/lift start working at that point. If not, then I'll open a new issue, as you are correct, we (I), have probably abused this PR. One last question, will these updates hit 5.87 at the start of November, or will they need to wait till the beta of 5.88 in the middle of the month? G |
Lol, not possible to be sure
if the code is to much sensible for a stable, they can decide to validate then only for the beta. |
Ok so with lot of help from @vegetate7 some improvements, but not all are used yet.
curl -H 'Content-Type: application/json' -X PUT -d '{"windowopen_set":[true,20,20]}' http://IP:PORT/api/KEY/sensors/21/config
To set windows open mode (Valve/temperature/timer).
Or low battery, but I don't find how to have 'false" as defaut value, I always have "null"