Skip to content
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

[Feature request]: Lonsonho TS110E_2gang (_TZ3210_wdexaypg) - add power_outage_memory, switch type and min/max brightness level controls #12952

Closed
gorbunovav opened this issue Jun 26, 2022 · 2 comments · Fixed by Koenkk/zigbee-herdsman-converters#4393
Labels
feature request Feature request

Comments

@gorbunovav
Copy link

gorbunovav commented Jun 26, 2022

Is your feature request related to a problem? Please describe

https://www.zigbee2mqtt.io/devices/TS110E_2gang.html#lonsonho-ts110e_2gang

https://github.com/Koenkk/zigbee-herdsman-converters/blob/2faa0abbb2c65d7f49f4a32bf640706b0ea70e16/devices/lonsonho.js#L220

  1. This device supports tuya power outage memory command, so we probably can just use the existing moes_power_on_behavior definition (works for me).
    The option is device-wide (not per-endpoint).
    It seems that after the reboot the device always reports 1 (on) to Read Attributes request, but the behavior is not reset - the choosen value is still in effect. So it can be confusing to expose the refresh option.

  2. It also has ability to configure the switch type on per-endpoint base. The Read Attributes response is consistent.

    Field Value
    Cluster genLevelCtrl (0x0008)
    Command Write Attributes (0x02)
    Attribute 0xfc02
    Data Type 8-Bit Unsigned Integer (0x20)
    Possible values 0 - momentary ("kick-back switch"), 1 - toggle ("Seesaw Toggle Switch"), 2 - state ("Seesaw Sync Switch")
  3. Tuya Smartlife plugin also allows to configure the minimal and maximal brightness level for each endpoint. Doesn't seem to affect the ability to set brightness to a higher / lower level, so no point to implement.

    Field Value
    Cluster genLevelCtrl (0x0008)
    Command Write Attributes (0x02)
    Attribute 0xfc03 - min, 0xfc04 - max
    Data Type 16-Bit Unsigned Integer (0x21)
    Value brightness value in percent with one decimal point converted into integer by multiplying by 10 (e.g. 76.5 => 765)
  4. Attempt to refresh Brightness leads to the Unsupported Attribute error.

Describe the solution you'd like

Update the device converter.

Describe alternatives you've considered

None

Additional context

None

@gorbunovav gorbunovav added the feature request Feature request label Jun 26, 2022
gorbunovav added a commit to gorbunovav/zigbee-herdsman-converters that referenced this issue Jun 28, 2022
gorbunovav added a commit to gorbunovav/zigbee-herdsman-converters that referenced this issue Jun 28, 2022
…w to exclude `power_on_behavior` converters since they can conflict with manufacturer-specific ones
gorbunovav added a commit to gorbunovav/zigbee-herdsman-converters that referenced this issue Jun 28, 2022
gorbunovav added a commit to gorbunovav/zigbee-herdsman-converters that referenced this issue Jun 29, 2022
…s_power_on_behavior` coverter with `tuya_switch_power_outage_memory` since we don't want to expose the `READ` capability (returns incorrect value)
gorbunovav added a commit to gorbunovav/zigbee-herdsman-converters that referenced this issue Jun 29, 2022
… read command in the `configure` section
gorbunovav added a commit to gorbunovav/zigbee-herdsman-converters that referenced this issue Jun 29, 2022
gorbunovav added a commit to gorbunovav/zigbee-herdsman-converters that referenced this issue Jun 29, 2022
gorbunovav added a commit to gorbunovav/zigbee-herdsman-converters that referenced this issue Jun 29, 2022
…_on_behavior` converters for the rest of light variants
Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Jul 1, 2022
…ang (#4393)

* Refs Koenkk/zigbee2mqtt#12952: `Lonsonho TS110E_2gang` - allow to configure switches type

* Refs Koenkk/zigbee2mqtt#12952: `extend.light_onoff_brightness` - allow to exclude `power_on_behavior` converters since they can conflict with manufacturer-specific ones

* Refs Koenkk/zigbee2mqtt#12952: `Lonsonho TS110E_2gang` - allow to configure `power_on_behavior`

* Refs Koenkk/zigbee2mqtt#12952: `Lonsonho TS110E_2gang` - replace `moes_power_on_behavior` coverter with `tuya_switch_power_outage_memory` since we don't want to expose the `READ` capability (returns incorrect value)

* Refs Koenkk/zigbee2mqtt#12952: `Lonsonho TS110E_2gang` - remove extra read command in the `configure` section

* Refs Koenkk/zigbee2mqtt#12952: fix linter errors

* Refs Koenkk/zigbee2mqtt#12952: revert formatting changes

* Refs Koenkk/zigbee2mqtt#12952: `lib/extend` - allow to exclude `power_on_behavior` converters for the rest of light variants

* Update lonsonho.js

* Update fromZigbee.js

* Update toZigbee.js

* Update lonsonho.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
@ndbroadbent
Copy link

Hi @gorbunovav, do you know if Moes dimmer modules also support this switch type option? I have been looking for this for a while: #12684 (comment)

I have a mix of the following dimmer modules:

I believe they are all using tuya chips and firmwares, so I would love to know if the “switch type” option is a standard feature supported by all of these devices. Thanks!

Mephistofeles pushed a commit to Mephistofeles/zigbee-herdsman-converters that referenced this issue Dec 13, 2022
…ang (Koenkk#4393)

* Refs Koenkk/zigbee2mqtt#12952: `Lonsonho TS110E_2gang` - allow to configure switches type

* Refs Koenkk/zigbee2mqtt#12952: `extend.light_onoff_brightness` - allow to exclude `power_on_behavior` converters since they can conflict with manufacturer-specific ones

* Refs Koenkk/zigbee2mqtt#12952: `Lonsonho TS110E_2gang` - allow to configure `power_on_behavior`

* Refs Koenkk/zigbee2mqtt#12952: `Lonsonho TS110E_2gang` - replace `moes_power_on_behavior` coverter with `tuya_switch_power_outage_memory` since we don't want to expose the `READ` capability (returns incorrect value)

* Refs Koenkk/zigbee2mqtt#12952: `Lonsonho TS110E_2gang` - remove extra read command in the `configure` section

* Refs Koenkk/zigbee2mqtt#12952: fix linter errors

* Refs Koenkk/zigbee2mqtt#12952: revert formatting changes

* Refs Koenkk/zigbee2mqtt#12952: `lib/extend` - allow to exclude `power_on_behavior` converters for the rest of light variants

* Update lonsonho.js

* Update fromZigbee.js

* Update toZigbee.js

* Update lonsonho.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
@cwvschaik
Copy link

Hey, Is there any update on the modules using TS0601 (such as Moes ones mentioned above)
Would be great if this could be exposed there as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Feature request
Projects
None yet
3 participants