Xenomes / Domoticz-TUYA-Plugin

Implements the special Tuya Home Assistant API.
22 stars 8 forks source link

Cover Status update issue #34

Closed davewins closed 1 year ago

davewins commented 1 year ago

When Domoticz queries the status of a device, the Cover/Blinds/Curtain always returns a status of 3, which is neither open or closed. In this code:

            # Update device
            if dev.state() == False:
                UpdateDevice(unit, 0, 'Off', not dev.available())
            elif dev.state() == True:
                UpdateDevice(unit, 1, 'On', not dev.available())
            else:
                Domoticz.Log('DeviceID='+Devices[unit].DeviceID+' State update skiped. status = '+str(dev.state())+' device type = '+str(dev.device_type()))

I added the device type to show that it is the Cover always reaching the Else block as the state is always 3.

Any ideas how we can get the status of the cover? In my case it's the Q1500 curtain track from Quoya

Xenomes commented 1 year ago

With some testers we are building a new Tuya plugin. https://github.com/Xenomes/Domoticz-TinyTUYA-Plugin Can you create a debug.json by edit/running debug-discovery.py with python3 from the tools directory (Domoticz-TinyTUYA-Plugin).

davewins commented 1 year ago

Ok - here's the json file as requested.

Let me know if I can help any further

dave

On Sun, 18 Dec 2022 at 14:10, Xenomes @.***> wrote:

With some testers we are building a new Tuya plugin. https://github.com/Xenomes/Domoticz-TinyTUYA-Plugin Can you create a debug.json by edit/running debug-discovery.py with python3 from the tools directory (Domoticz-TinyTUYA-Plugin).

— Reply to this email directly, view it on GitHub https://github.com/Xenomes/Domoticz-TUYA-Plugin/issues/34#issuecomment-1356807584, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFC63AI7MH52W6BDI6L5KJ3WN4LNXANCNFSM6AAAAAATCQ22NU . You are receiving this because you authored the thread.Message ID: @.***>

Xenomes commented 1 year ago

Thanks but the file from the mail is not include on github, can you resend the mail to xenomes@outlook.com?

Xenomes commented 1 year ago

The plugin is fixed.