-
Notifications
You must be signed in to change notification settings - Fork 413
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
Roller shutters recognized as ir_remote_sensors #228
Comments
The Tuya Developer portal has a function in the API Explorer, under "Device Control" in the first pane, the last "Get Device Specification Attribute" function. That one returns the local dp indexes for the above list of functions and status. Also, it looks like there are more datapoints there than are in the API docs. You can find information about the others by clicking on your Cloud Project, Devices, and selecting your Device (you may need to Link Tuya App Account if it is not showing in the list). Then click on Debug Device, and Device Logs. Open the Browser's Developer Tools menu on the Network page, and in the "Select DP ID" dropdown at the top, select each of the options that did not appear in the API Explorer docs and press search, then look in the Developer Tools window for a "list" request, the "code" parameter is the local dpId for that function (the name may be in Chinese, but Google translate can give some idea of what it might be). |
If you paired directly to your Cloud Project using tuya-cli, you may see "Details" instead of "Debug Device" in the Device page. In that case you can re-pair the device using the Tuya or Smart Life app (the local key will need updating, but you can find it in the developer portal) that is linked to your iot.tuya.com account (Link Tuya App Account on that Cloud Project screen) to get the more powerful Debug Device option. |
Thanks @make-all. Here are the details from "Get Device Specification Attribute" as well as "Get Device Specification" which return all the details without having to go in Developer Tools.
|
Thanks, I hadn't noticed before that the Get Device Specification returns more details about the enum values, which is useful when they are not descriptive like this. Do you have a link to a user manual, or even just a manufacturer/model name I can use for the config file naming? |
I'm glad I could contribute in some way. :)
|
Issue #228 - cover: add support for "reversed" dp (control_back in tuya docs), assuming the purpose is to indicate/control when the direction of open/close is reversed.
Thanks a lot for the implementation and sorry for the delay testing it. Some of the values of the DPs should be adjusted. I've added comments in the PR and also added them below. Also, the implementation of the controls is a bit laggy. Sometimes it takes 2-3 seconds to get the command. This doesn't happen with the Tuya cloud integration or localtuya. And the device becomes unavailable at times while controlling it. I've disabled all the other Tuya related integrations and made sure the Tuya App is not open on my mobile. Additionally, the implementation doesn't seem to take into account that DP 102 sets the position and DP 112 reads the current position. The cover entity only displays the set position, not the current one. P.S. Would it be possible to allow controlling the cover only when DP 111 (Has Border) is set to true? Otherwise, the motor would turn until it breaks the shutter.
|
- swap stop and close command values. Order does not match iot.tuya.com docs - add Venetian blinds at start and remove Other at end of style values. - restrict open and closed commands to when border is set to avoid destroying blinds. position will still be available for fine setting at user's risk. Issue #228
Included in 0.19.0 release along with the suggested adjustments. |
@make-all the devices become unavailable after 2-3 commands and the only way to make them available again is to restart HA. |
@make-all I've just realized that the command which seems to break the integration is the "stop" command even if it is the first command I send.
|
There seems to be a general issue with the tinytuya 1.6.6 library. I have reverted to 1.6.5 and released tuya-local 0.19.2. Hopefully this will work better (recover after devices go offline for a period after a command). |
Hi @make-all,
Thank you for your integration.
My roller shutters are recognized as ir_remote_sensors and log a warning in HA.
I've pasted below the details of the device from Tuya Developer.
The text was updated successfully, but these errors were encountered: