0x5e / homebridge-tuya-platform

Make homebridge-tuya-platform great again.
MIT License
206 stars 58 forks source link

All curtains doubled, even in single-curtain configurations #412

Open pickanothername opened 7 months ago

pickanothername commented 7 months ago

Prerequisite

Cache

Version

1.7.0-beta.52

Device Infomation JSON File

Not sure where to find this, sorry. Let me know how if it's needed.

Device Control Mode

DP Instruction

Logs

[11/27/2023, 1:20:13 AM] Loaded plugin: @0x5e/homebridge-tuya-platform@1.7.0-beta.52
[11/27/2023, 1:20:13 AM] Registering platform '@0x5e/homebridge-tuya-platform.TuyaPlatform'
[11/27/2023, 1:20:14 AM] [TuyaPlatform] Initializing TuyaPlatform platform...
[11/27/2023, 1:20:14 AM] [TuyaPlatform] Initializing child bridge [REDACTED]
[11/27/2023, 1:20:19 AM] [TuyaPlatform] Launched child bridge with PID 13949
[11/27/2023, 1:20:22 AM] Registering platform '@0x5e/homebridge-tuya-platform.TuyaPlatform'
[11/27/2023, 1:20:22 AM] [TuyaPlatform] Loaded @0x5e/homebridge-tuya-platform v1.7.0-beta.52 child bridge successfully
[11/27/2023, 1:20:22 AM] [TuyaPlatform] Loading accessory from cache: H1 Room Blackout Curtains
[11/27/2023, 1:20:22 AM] [TuyaPlatform] Loading accessory from cache: Garage Shade
[11/27/2023, 1:20:22 AM] [TuyaPlatform] Loading accessory from cache: H1 Room Flood Light 4
[11/27/2023, 1:20:22 AM] [TuyaPlatform] Loading accessory from cache: H1 Room Flood Light 1
[11/27/2023, 1:20:22 AM] [TuyaPlatform] Loading accessory from cache: H1 Room Flood Light 2
[11/27/2023, 1:20:22 AM] [TuyaPlatform] Loading accessory from cache: H1 Room Flood Light 3
[11/27/2023, 1:20:22 AM] [TuyaPlatform] Loading accessory from cache: H1 Room Sheer Curtains
[11/27/2023, 1:20:22 AM] [TuyaPlatform] Log in to Tuya Cloud.
[11/27/2023, 1:20:22 AM] [TuyaPlatform] [TuyaOpenAPI] Login to: https://openapi.tuyaus.com
[11/27/2023, 1:20:22 AM] [TuyaPlatform] [TuyaOpenAPI] Request:
endpoint = https://openapi.tuyaus.com
  "schema": "tuyaSmart"
[11/27/2023, 1:20:23 AM] Homebridge v1.6.1 (HAP v0.11.1) (TuyaPlatform) is running on port 43390.
[11/27/2023, 1:20:23 AM] [TuyaPlatform] [TuyaOpenAPI] Response:
    "platform_url": "https://openapi.tuyaus.com",
[11/27/2023, 1:20:23 AM] [TuyaPlatform] Start MQTT connection.
[11/27/2023, 1:20:23 AM] [TuyaPlatform] Fetching home list.
[11/27/2023, 1:20:23 AM] [TuyaPlatform] [TuyaOpenAPI] Request:
endpoint = https://openapi.tuyaus.com
[11/27/2023, 1:20:23 AM] [TuyaPlatform] [TuyaOpenAPI] Request:
endpoint = https://openapi.tuyaus.com
[11/27/2023, 1:20:23 AM] [TuyaPlatform] [TuyaOpenAPI] Response:
    "url": "ssl://m1.tuyaus.com:8883",
[11/27/2023, 1:20:24 AM] [TuyaPlatform] [TuyaOpenAPI] Response:
[11/27/2023, 1:20:24 AM] [TuyaPlatform] Got home_id=[REDACTED], name=My Home ..
[11/27/2023, 1:20:24 AM] [TuyaPlatform] Fetching device list.
[11/27/2023, 1:20:24 AM] [TuyaPlatform] [TuyaOpenAPI] Request:
endpoint = https://openapi.tuyaus.com
[11/27/2023, 1:20:24 AM] [TuyaPlatform] [TuyaOpenAPI] Response:
[11/27/2023, 1:20:24 AM] [TuyaPlatform] [TuyaOpenAPI] Request:
endpoint = https://openapi.tuyaus.com
[11/27/2023, 1:20:24 AM] [TuyaPlatform] [TuyaOpenAPI] Response:
[11/27/2023, 1:20:24 AM] [TuyaPlatform] [TuyaOpenAPI] Request:
endpoint = https://openapi.tuyaus.com
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [TuyaOpenAPI] Response:
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [TuyaOpenAPI] Request:
endpoint = https://openapi.tuyaus.com
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [TuyaOpenAPI] Response:
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [TuyaOpenAPI] Request:
endpoint = https://openapi.tuyaus.com
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [TuyaOpenAPI] Response:
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [TuyaOpenAPI] Request:
endpoint = https://openapi.tuyaus.com
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [TuyaOpenAPI] Response:
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [TuyaOpenAPI] Request:
endpoint = https://openapi.tuyaus.com
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [TuyaOpenAPI] Response:
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [TuyaOpenAPI] Request:
endpoint = https://openapi.tuyaus.com
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [TuyaOpenAPI] Response:
[11/27/2023, 1:20:25 AM] [TuyaPlatform] Fetching scene list.
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [TuyaOpenAPI] Request:
endpoint = https://openapi.tuyaus.com
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [TuyaOpenAPI] Response:
[11/27/2023, 1:20:25 AM] [TuyaPlatform] Got 7 device(s) and scene(s).
[11/27/2023, 1:20:25 AM] [TuyaPlatform] Device list saved at /var/lib/homebridge/persist/TuyaDeviceList.az1596664381934He5tx.json
[11/27/2023, 1:20:25 AM] [TuyaPlatform] Restoring existing accessory from cache: H1 Room Flood Light 2
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Flood Light 2] Light type: RGBCW
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Flood Light 2] Set props for ColorTemperature: { minValue: 140, maxValue: 500, minStep: 1 }
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Flood Light 2] Adaptive Lighting disabled.
[11/27/2023, 1:20:25 AM] [TuyaPlatform] Restoring existing accessory from cache: H1 Room Flood Light 1
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Flood Light 1] Light type: RGBCW
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Flood Light 1] Set props for ColorTemperature: { minValue: 140, maxValue: 500, minStep: 1 }
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Flood Light 1] Adaptive Lighting disabled.
[11/27/2023, 1:20:25 AM] [TuyaPlatform] Restoring existing accessory from cache: H1 Room Flood Light 3
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Flood Light 3] Light type: RGBCW
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Flood Light 3] Set props for ColorTemperature: { minValue: 140, maxValue: 500, minStep: 1 }
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Flood Light 3] Adaptive Lighting disabled.
[11/27/2023, 1:20:25 AM] [TuyaPlatform] Restoring existing accessory from cache: H1 Room Blackout Curtains
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Blackout Curtains] Curtain amount: 1
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Sheer Curtains] Curtain amount: 1
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Blackout Curtains] Override schema {
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Blackout Curtains] Override schema {
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Blackout Curtains] Override schema {
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Blackout Curtains] Override schema {
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Blackout Curtains] Override schema {
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Blackout Curtains] Override schema {
[11/27/2023, 1:20:25 AM] [TuyaPlatform] Restoring existing accessory from cache: H1 Room Sheer Curtains
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Sheer Curtains] Override schema {
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Sheer Curtains] Override schema {
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [Garage Shade] Curtain amount: 1
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Sheer Curtains] Override schema {
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Sheer Curtains] Override schema {
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Sheer Curtains] Override schema {
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Sheer Curtains] Override schema {
[11/27/2023, 1:20:25 AM] [TuyaPlatform] Restoring existing accessory from cache: Garage Shade
[11/27/2023, 1:20:25 AM] [TuyaPlatform] Restoring existing accessory from cache: H1 Room Flood Light 4
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Flood Light 4] Light type: RGBCW
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Flood Light 4] Set props for ColorTemperature: { minValue: 140, maxValue: 500, minStep: 1 }
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Flood Light 4] Adaptive Lighting disabled.
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Blackout Curtains] Override status { code: 'percent_state', value: 0 } => { code: 'percent_state', value: 100 }
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Sheer Curtains] Override status { code: 'percent_state', value: 100 } => { code: 'percent_state', value: 0 }
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Blackout Curtains] Override status { code: 'percent_state', value: 0 } => { code: 'percent_state', value: 100 }
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Blackout Curtains] Override status { code: 'percent_control', value: 0 } => { code: 'percent_control', value: 100 }
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Sheer Curtains] Override status { code: 'percent_state', value: 100 } => { code: 'percent_state', value: 0 }
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Sheer Curtains] Override status { code: 'percent_control', value: 100 } => { code: 'percent_control', value: 0 }
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Blackout Curtains] Override status { code: 'percent_control', value: 0 } => { code: 'percent_control', value: 100 }
[11/27/2023, 1:20:25 AM] [TuyaPlatform] [H1 Room Sheer Curtains] Override status { code: 'percent_control', value: 100 } => { code: 'percent_control', value: 0 }

Other Infomations

It seems that 1.7.0-beta.49 introduced a bug where all cover/curtain accessories are doubled (double curtain accessories), even when there's only one curtain attached to that accessory. The second curtain sub-accessory is non-functional and completely useless. I've attached screenshots of the issue. Note that I renamed the sub-accessories for clarity.

The issue was previously documented in this comment: https://github.com/0x5e/homebridge-tuya-platform/pull/339#issuecomment-1653648753

Screenshots:

7m9nLaVyQQ-7AJyIrbvKTQ -vfyzUYlQuC4e2oghfvgIA ZFiz211CQkC2QN7wiXd5Hg

pickanothername commented 7 months ago

Here is a screenshot showing that all of the accessories are under the same bridge, so it is not a caching issue. I split two of the accessories into multiple so I can control the functional one, but I left "Garage Shade" combined so you can see how the accessories look when first added.

Something else to mention- all of my curtain motors are YH002/zemismart curtain motors, and incidentally, needed to have their state inverted in order to work. Please let me know if you need any other information.

IMG_79B92B5607DA-1 copy

Joaav commented 5 months ago

I have the same issue - any fix?