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

Add Schneider Electric devices #1705

Closed
wants to merge 15 commits into from
Closed

Conversation

axellebot
Copy link
Contributor

@axellebot axellebot commented Aug 23, 2022

@axellebot
Copy link
Contributor Author

current_position_lift_percentage (0x0008) for WindowCovering (0x01202) is reversed

- Use ZCLAttributeDef for attribute
@axellebot
Copy link
Contributor Author

axellebot commented Aug 27, 2022

It might be possible to add PUCK/SHUTTER/1

According to Koenkk/zigbee2mqtt#10318 (comment), the device info are :

Expand
{
  "id": 11,
  "type": "Router",
  "ieeeAddr": "0x00000000000", # ommited
  "nwkAddr": 9000,
  "manufId": 4190,
  "manufName": "Schneider Electric",
  "powerSource": "Mains (single phase)",
  "modelId": "PUCK/SHUTTER/1",
  "epList": [5],
  "endpoints": {
    "5": {
      "profId": 260,
      "epId": 5,
      "devId": 514,
      "inClusterList": [0, 3, 4, 5, 258, 2821],
      "outClusterList": [25],
      "clusters": {
        "genBasic": {
          "attributes": {
            "modelId": "PUCK/SHUTTER/1",
            "appVersion": 1,
            "stackVersion": 5,
            "hwVersion": 1,
            "dateCode": "",
            "swBuildId": "001.005.003 R"
          }
        }
      },
      "binds": [
        {
          "cluster": 258,
          "type": "endpoint",
          "deviceIeeeAddress": "0x00212effff0666f3",
          "endpointID": 1
        }
      ],
      "configuredReportings": [
        {
          "cluster": 258,
          "attrId": 8,
          "minRepIntval": 1,
          "maxRepIntval": 62000,
          "repChange": 1
        }
      ],
      "meta": {}
    }
  },
  "appVersion": 1,
  "stackVersion": 5,
  "hwVersion": 1,
  "dateCode": "",
  "swBuildId": "001.005.003 R",
  "zclVersion": 2,
  "interviewCompleted": true,
  "meta": { "configured": -321561689 },
  "lastSeen": 1640208126132
}

And zigbee info from Jeedom community

Zigbee infos

Volets roulants module Schneider Electric Wiser CCT5015-0002W
Log from Jeedom community

{
    "ieee": "00:0d:6f:ff:fe:cb:52:11",
    "nwk": 31119,
    "status": 2,
    "lqi": "231",
    "rssi": "-65",
    "last_seen": "1617382106.1621628",
    "node_descriptor": "01:40:8e:5e:10:52:52:00:00:2c:52:00:00",
    "endpoints": [
        {
            "id": 5,
            "status": 1,
            "device_type": 514,
            "profile_id": 260,
            "manufacturer": "Schneider Electric",
            "model": "PUCK\/SHUTTER\/1",
            "output_clusters": [
                {
                    "id": 25,
                    "name": "Ota",
                    "attributes": []
                }
            ],
            "input_clusters": [
                {
                    "id": 0,
                    "name": "Basic",
                    "attributes": [
                        {
                            "id": 0,
                            "name": "zcl_version",
                            "value": 3
                        },
                        {
                            "id": 1,
                            "name": "app_version",
                            "value": 2
                        },
                        {
                            "id": 2,
                            "name": "stack_version",
                            "value": 6
                        },
                        {
                            "id": 3,
                            "name": "hw_version",
                            "value": 1
                        },
                        {
                            "id": 4,
                            "name": "manufacturer",
                            "value": "Schneider Electric"
                        },
                        {
                            "id": 5,
                            "name": "model",
                            "value": "PUCK\/SHUTTER\/1"
                        },
                        {
                            "id": 6,
                            "name": "date_code",
                            "value": ""
                        },
                        {
                            "id": 7,
                            "name": "power_source",
                            "value": 1
                        },
                        {
                            "id": 16384,
                            "name": "sw_build_id",
                            "value": "002.004.018 R"
                        }
                    ]
                },
                {
                    "id": 3,
                    "name": "Identify",
                    "attributes": []
                },
                {
                    "id": 4,
                    "name": "Groups",
                    "attributes": []
                },
                {
                    "id": 5,
                    "name": "Scenes",
                    "attributes": []
                },
                {
                    "id": 258,
                    "name": "Window Covering",
                    "attributes": []
                },
                {
                    "id": 2821,
                    "name": "Diagnostic",
                    "attributes": []
                }
            ]
        },
        {
            "id": 242,
            "status": 1,
            "device_type": 97,
            "profile_id": 41440,
            "manufacturer": null,
            "model": null,
            "output_clusters": [
                {
                    "id": 33,
                    "name": "GreenPowerProxy",
                    "attributes": []
                }
            ],
            "input_clusters": []
        }
    ],
    "signature": {
        "manufacturer": "Schneider Electric",
        "model": "PUCK\/SHUTTER\/1",
        "node_desc": {
            "byte1": 1,
            "byte2": 64,
            "mac_capability_flags": 142,
            "manufacturer_code": 4190,
            "maximum_buffer_size": 82,
            "maximum_incoming_transfer_size": 82,
            "server_mask": 11264,
            "maximum_outgoing_transfer_size": 82,
            "descriptor_capability_field": 0
        },
        "endpoints": {
            "5": {
                "profile_id": 260,
                "device_type": 514,
                "input_clusters": [
                    0,
                    3,
                    4,
                    5,
                    258,
                    2821
                ],
                "output_clusters": [
                    25
                ]
            },
            "242": {
                "profile_id": 41440,
                "device_type": 97,
                "input_clusters": [],
                "output_clusters": [
                    33
                ]
            }
        }
    },
    "class": "zigpy.device"
}

@axellebot
Copy link
Contributor Author

axellebot commented Aug 28, 2022

Well after resetting shutter controller, whether I push UP or DOWN, the cover was going down. I thought it was about calibration but it finally ended by breaking cover's motor.

EDIT: My motors are back from the dead

@dmulcahey
Copy link
Collaborator

I’m planning to do a release today so that I can PR it to HA. Should I wait for this PR? Or are you ok with this potentially not making it in this release? We can update the lib throughout the beta so no pressure.

@axellebot
Copy link
Contributor Author

axellebot commented Aug 30, 2022

Thanks for asking 🙏

This PR is definitely not ready. I only tested shutter and there is some weird behavior :

  • Shutter device command are greyed out in HA even if quirk is working
  • Shutter device after factory reset is only going down (even when pressing up) and I need to figure out how to properly reset it.

@dmulcahey
Copy link
Collaborator

For the inverted cover we need to deal with that in ZHA

@axellebot
Copy link
Contributor Author

What do you mean ?
Right now the quirk is correctly reading and commanding the standardized values.
There is something else to setup somewhere else to avoid the greyed out entity ?

@dmulcahey
Copy link
Collaborator

What do you mean ?
Right now the quirk is correctly reading and commanding the standardized values.
There is something else to setup somewhere else to avoid the greyed out entity ?

Never mind I misread this:

Shutter device after factory reset is only going down (even when pressing up) and I need to figure out how to properly reset it.

@axellebot
Copy link
Contributor Author

Shutter device after factory reset is only going down (even when pressing up) and I need to figure out how to properly reset it.

I'm stuck with the covering. Didn't figure out how to go back to normal behavior.
Factory reset didn't change a thing and the manufacturer don't want to help me, I might ask a refund for my 10 controllers.

@woodsb02
Copy link

woodsb02 commented Nov 6, 2022

For the inverted cover we need to deal with that in ZHA

I’ve experienced an inverted cover in home assistant (different brand). I do feel like it’s something that should be catered for in zha (not brand specific).

@axellebot
Copy link
Contributor Author

axellebot commented Nov 6, 2022

ZHA is using ZigBee standardized cluster/commands/attributes so it's up to the vendors to implement them properly into each of their device.
But because some vendors don't, we need specific quirks (eg. ZHA, MQTT, etc.) that are implemented in this "device-handler" lib.

@adn34
Copy link

adn34 commented Dec 17, 2022

I installed an NHPB/SHUTTER/1 myself and landed here after going down the rabbit hole of trying to calibrate the lift time from the default (which seems to be 2mn) and trying to get it to report position correctly (currently at -155% for some reason).

Thanks for working on this and if there is anything I can help with having physical access to the device please let me now.

@axellebot
Copy link
Contributor Author

I think RN we really need the Schneider electric gateway to know what unofficial zigbee command are sent to devices (eg. Calibration commands)

@adn34
Copy link

adn34 commented Dec 18, 2022

Price is a tad steep for a brand new gateway but I'll try to find a refurbished or used one, It would be the gateway with the product ID CCTFR6310 right?

Also I've just had something weird happen after a complete system reboot (not just HA), the current_position_lift_percentage (id: 0x0008) in cluster 0x0102 is now reporting live value changes (still false in the sense that it's based on a duration longer than the actual time but at least not stuck in a negative value in HA while being stuck at 255 in the cluster reading). It also seems that what the device reports is not the percentage opened but percentage closed.

When HA shows 24% opened the device reports 76% in current_position_lift_percentage. I've mounted the device the right way up (which is with the writing on the back of the module upside down for some dumb reason, there's an arrow behind the button which indicates where up is) and upwards triggered from HA is upwards with the physical buttons as well. Which results in the weird behavior of the "up" command in HA actually making the blind go up but HA thinking it's closed when it's fully opened with current_position_lift_percentage reporting 100.

Stuff you probably figured out already, I'll try to get my hands on a gateway!

@TheJulianJES TheJulianJES added the new quirk Adds support for a new device label Apr 11, 2023
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale Issue is inactivate and might get closed soon label Nov 13, 2023
@github-actions github-actions bot closed this Nov 20, 2023
@dflemstr
Copy link
Contributor

Hey @axellebot, I'm wondering if there's anything I can do to revive this PR. I have a lot of SE devices that I could use to help debug stuff, especially the various dimmer/switch variations. Most devices seem to work fine with ZHA right now for basic functionality, but especially the calibration stuff seems to be entirely unsupported right now (see e.g. #2798)

@axellebot
Copy link
Contributor Author

I just added new informations on #1685.
@dflemstr I only have this shutter device but maybe you can use those new informations to edit test your devices and add commit to my branch.

@alexeiw123
Copy link

There is also now a wiser zigbee fan controller 41ECSFWMZ that I don't think has zigpy support yet.
https://www.se.com/au/en/product/41ECSFWMZ-VW/clipsal-iconic-connected-ac-fan-controller-zigbee/

@woodsb02
Copy link

There is also now a wiser zigbee fan controller 41ECSFWMZ that I don't think has zigpy support yet.

https://www.se.com/au/en/product/41ECSFWMZ-VW/clipsal-iconic-connected-ac-fan-controller-zigbee/

I've got one, and it works out of the box in zha.

@alexeiw123
Copy link

There is also now a wiser zigbee fan controller 41ECSFWMZ that I don't think has zigpy support yet.
https://www.se.com/au/en/product/41ECSFWMZ-VW/clipsal-iconic-connected-ac-fan-controller-zigbee/

I've got one, and it works out of the box in zha.

Oh good to know! Does the backlight configuration work?

@woodsb02
Copy link

There is also now a wiser zigbee fan controller 41ECSFWMZ that I don't think has zigpy support yet.

https://www.se.com/au/en/product/41ECSFWMZ-VW/clipsal-iconic-connected-ac-fan-controller-zigbee/

I've got one, and it works out of the box in zha.

Oh good to know! Does the backlight configuration work?

Yes. Behaviour described below.

When you turn the fan on to low/med/high speed, the backlight correctly shows quarter/half/3-quarter lights.

When you turn the fan off, the backlight correctly shows full (4-quarter) lights. After some time the backlight turns off again.

If the fan is off and you turn the switch on, it just turns the backlight on to full to show it's off. After some time the backlight and switch turn off again.

If the fan is on, and you turn off the switch, the fan turns off and the backlight shows full light. After some time the backlight turns off.

Screenshots attached.

image

image

image

@alexeiw123
Copy link

Oh thankyou, sorry I meant can you configure if the button led stays on or turns off, as you can in the wiser app? This was a driving force for me moving to z2mqtt for the other wiser mechs.

@woodsb02
Copy link

Oh thankyou, sorry I meant can you configure if the button led stays on or turns off, as you can in the wiser app? This was a driving force for me moving to z2mqtt for the other wiser mechs.

I can't see an option for that, no.

@alexeiw123
Copy link

OK Thanks!

@Hedda
Copy link
Contributor

Hedda commented Jan 23, 2024

@axellebot do you plan on updating and re-submitting your quirks in a new pull request?

By the way, also check out #2928 and #2836 which are also about Schneider Electric Wiser

@axellebot
Copy link
Contributor Author

axellebot commented Jan 23, 2024

@axellebot do you plan on updating and re-submitting your quirks in a new pull request?

I think it was a too big PR. It should be split in small PR.
My work have been reused in a other PR (#2928) so this PR will still be closed.

About my shutter device I'm not planning to work on a new PR any time soon.

@uvNikita
Copy link

uvNikita commented Mar 26, 2024

I've got a hold on a few Schneider Electric Zigbee devices specifications.

List of files/devices:

  • ZB Spec - Blind Control Switch - 110422.pdf
  • ZB Spec - Micro Module Dimmer -110422.pdf
  • ZB Spec - Micro Module Shutter Blinds - 110422.pdf
  • ZB Spec - Micro Module Switch - 110422.pdf
  • ZB Spec - Motion Brightness sensor - 200522.pdf
  • ZB Spec - Motion Sensor with Dimmer - 110422.pdf
  • ZB Spec - Motion Sensor with Switch 10A - 110422.pdf
  • ZB Spec - Push-button Dimmer - 110422.pdf
  • ZB Spec - Relay Switch 10A - 110422.pdf
  • ZB Spec - Rotary Dimmer - 110422.pdf
  • ZB Spec - Smart Plug 16A - 110422.pdf
  • ZB Spec - Smoke Alarm -110422.pdf
  • ZB Spec - Socket Outlets - 200522.pdf
  • ZB Spec - Temperature Humidity Sensor - 110422.pdf
  • ZB Spec - Water Leakage Sensor - 110422.pdf
  • ZB Spec - Window Door Sensor - 110422.pdf
  • ZB Spec - Wireless Switch - 110422.pdf

Hopefully can help someone to make better integrations. @TheJulianJES let me know if there is a better place to put them other than google drive.
https://drive.google.com/file/d/1rM9iVhAB-AlWwWhvpEtcReSpEATi7aVH/view

@DanielNagy
Copy link

I've got a hold on a few Schneider Electric Zigbee devices specifications.

This is priceless!

A few of us built alot of this support into zigbee2mqtt based on sniffs from a wiser hub. could have saved spending the ridiculous wiser(cough tuya) hub with that information.

Further, You might want to check out the z2m OTA repo. The Index is now populated with a number of links to latest OTA firmware for the 2AX / 10AX / DIMMER / Fan Controller devices that you could incorporate into ZHA.

@alexeiw123
Copy link

I've got a hold on a few Schneider Electric Zigbee devices specifications.

List of files/devices:

Wow, where did you come across these?

Are there avenues to get these for other SE devices?

@uvNikita
Copy link

Glad you can find it useful 🙂 And thanks for the tip about the OTA repo, will test it out!

I got it from a technical support of a local producer which rebrands Schneider Electric devices. I can try to ask if there is more, but I think they sent me all they've got.

@uvNikita
Copy link

@TheJulianJES let me know if I should create a new issue with this information, I'm not sure what's the best way to handle it.

@alexeiw123
Copy link

Glad you can find it useful 🙂 And thanks for the tip about the OTA repo, will test it out!

I got it from a technical support of a local producer which rebrands Schneider Electric devices. I can try to ask if there is more, but I think they sent me all they've got.

That's fantastic. In Australia/NZ the rebranded Schneider products are sold as 'clipsal' and their tech support doesn't want to help those looking to DIY zigbee implementation outside of their supported hardware.

There are three other push button mechs that would be great to get the spec for, outside of the 'push button dimmer' that you provided. There's a 2A Switch, 10A Switch and an AC Fan controller. For the most part we've been able to work out clusters and attributes but there are still some unknowns around some functionality. Official documentation is always better than none! Great find.

@dflemstr
Copy link
Contributor

I wonder if this issue could be reopened and converted (or a new issue created) into a "tracking issue" so that we can collaborate on getting all of the devices supported in a structured way?

@Hedda
Copy link
Contributor

Hedda commented Mar 28, 2024

Might these be good candidates for converting into a "Quirks V2" quirk instead? See these reference about the new "Quirks V2":

Summary; "Quirks V2" will allow ZHA-quirks developers to add support for a new device that uses non-standard Zigbee clusters and attributes without having to both create a quirk and modify both the codebase of the ZHA component in the Home Assistant code. This "Quirks V2" specifications is still being developers but there is initial "Quirks V2" documentation being worked on, see here -> https://github.com/zigpy/zha-device-handlers/blob/dm/quirks-v2-documentation/quirks_v2.md

@dflemstr
Copy link
Contributor

@Hedda from a review of the specification PDFs, my 2 cents would be that it'd be pretty easy to add support for these devices using the existing quirks architecture, because the devices are pretty ZCL-compliant, and any manufacturer specific stuff is pretty consistent across devices, ie. there'd be a lot of shared code for these devices (shared clusters, attributes, etc).

From a selfish perspective I'd also love to get these devices supported using v1, and maybe later refactored to a v2, rather than waiting for v2 to be "ready," and in the meantime having the devices not be supported at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new quirk Adds support for a new device stale Issue is inactivate and might get closed soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet