question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding Support for GLEDOPTO GL-C-001P

See original GitHub issue

GLEDOPTO have a new “5 in 1” Zigbee LED Controller, which can change modes between RGBCCT, RGBW, RGB, CCT and just dimming by physically pressing a button on the controller. Although the device itself has a model number of GL-C-001P printed on it, it identifies itself as a GL-C-003P in zigbee2mqtt.

I’ve been able to add a new local device definition for this, and it is working for me in RGBCCT mode. However, i’m a little unsure how to contribute this back with full support for detecting which mode it is in. GLEDOPTO’s support have said that the model will vary depending on the current mode, however i’ve not been able to see this happen unless I add a basic device definition. Without one, regardless of mode the modelID in the database under the genBasic endpoint’s attributes is always GL-C-007P. After adding the following basic device definition, the genBasic modelID does get updated when changing the mode, although this does force a re-pair. To see this model change in the database file, I have to go and run a query for genBasic modelID, then send a configure request.

const definition = {
    zigbeeModel: ['GL-C-003P'], // The model ID from: Device with modelID 'lumi.sens' is not supported.
    model: 'GL-C-003P', // Vendor model number, look on the device for a model number
    vendor: 'Gledopto', // Vendor of the device (only used for documentation and startup logging)
    description: 'Zigbee 5 in 1 Smart LED Controller', // Description of the device, copy from vendor site. (only used for documentation and startup logging)
    extend: extend.light_onoff_brightness_colortemp_color(),
};

GLEDOPTO support said the mapping is as follows;

GL-C-001P is the model of the controller and this controller can realize the five types of RGBCCT\RGBW\RGB\CCT\DIMMER. Each type of lamp searched for is different. Corresponding to GL-C-008P\GL-C-007P\GL-C-003P \GL-C-006P\GL-C-009P

Which would map to;

  • RGBCCT: GL-C-008P
  • RGBC: GL-C-007P
  • RGB: GL-C-003P
  • CCT: GL-C-006P
  • Dimmer: GL-C-009P

Any ideas on how best to add support for this? I think I need to use the fingerprint functionality, but all the existing examples match on endpoints. Would it be possible to match on the genBasic modelID instead?

Sample database entry, captured in RGBCCT mode;

{
    "id": 12,
    "type": "Router",
    "ieeeAddr": "0xcc86ecfffebfb226",
    "nwkAddr": 15450,
    "manufId": 4687,
    "manufName": "GLEDOPTO",
    "powerSource": "Mains (single phase)",
    "modelId": "GL-C-003P",
    "epList": [
        1,
        242
    ],
    "endpoints": {
        "1": {
            "profId": 260,
            "epId": 1,
            "devId": 258,
            "inClusterList": [
                0,
                3,
                4,
                5,
                6,
                8,
                768,
                4096
            ],
            "outClusterList": [
                25
            ],
            "clusters": {
                "genBasic": {
                    "attributes": {
                        "modelId": "GL-C-008P",
                        "manufacturerName": "GLEDOPTO",
                        "powerSource": 0,
                        "zclVersion": 3,
                        "appVersion": 0,
                        "stackVersion": 0,
                        "hwVersion": 0,
                        "dateCode": "",
                        "swBuildId": "10276801"
                    }
                },
                "lightingColorCtrl": {
                    "attributes": {
                        "colorCapabilities": 31,
                        "colorTempPhysicalMin": 158,
                        "colorTempPhysicalMax": 495,
                        "colorMode": 1,
                        "currentX": 22378,
                        "currentY": 11189,
                        "enhancedCurrentHue": 0,
                        "currentSaturation": 0,
                        "colorTemperature": 158
                    }
                }
            },
            "binds": [],
            "configuredReportings": [],
            "meta": {}
        },
        "242": {
            "profId": 41440,
            "epId": 242,
            "devId": 97,
            "inClusterList": [],
            "outClusterList": [
                33
            ],
            "clusters": {},
            "binds": [],
            "configuredReportings": [],
            "meta": {}
        }
    },
    "appVersion": 0,
    "stackVersion": 0,
    "hwVersion": 0,
    "dateCode": "",
    "swBuildId": "10276801",
    "zclVersion": 3,
    "interviewCompleted": true,
    "meta": {
        "configured": 2
    },
    "lastSeen": 1631359856262
}

Dimmer mode (but with the same device definition above, which may explain the presence of lightingColourCtrl attributes?);

{
    "id": 12,
    "type": "Router",
    "ieeeAddr": "0xcc86ecfffebfb226",
    "nwkAddr": 44722,
    "manufId": 4687,
    "manufName": "GLEDOPTO",
    "powerSource": "Mains (single phase)",
    "modelId": "GL-C-003P",
    "epList": [
        1,
        242
    ],
    "endpoints": {
        "1": {
            "profId": 260,
            "epId": 1,
            "devId": 258,
            "inClusterList": [
                0,
                3,
                4,
                5,
                6,
                8,
                768,
                4096
            ],
            "outClusterList": [
                25
            ],
            "clusters": {
                "genBasic": {
                    "attributes": {
                        "modelId": "GL-C-009P",
                        "manufacturerName": "GLEDOPTO",
                        "powerSource": 0,
                        "zclVersion": 3,
                        "appVersion": 0,
                        "stackVersion": 0,
                        "hwVersion": 0,
                        "dateCode": "",
                        "swBuildId": "10276801"
                    }
                },
                "lightingColorCtrl": {
                    "attributes": {
                        "colorCapabilities": 0,
                        "colorTempPhysicalMin": 158,
                        "colorTempPhysicalMax": 495,
                        "colorMode": 1,
                        "currentX": 22378,
                        "currentY": 11189,
                        "enhancedCurrentHue": 0,
                        "currentSaturation": 0,
                        "colorTemperature": 158
                    }
                }
            },
            "binds": [],
            "configuredReportings": [],
            "meta": {}
        },
        "242": {
            "profId": 41440,
            "epId": 242,
            "devId": 97,
            "inClusterList": [],
            "outClusterList": [
                33
            ],
            "clusters": {},
            "binds": [],
            "configuredReportings": [],
            "meta": {}
        }
    },
    "appVersion": 0,
    "stackVersion": 0,
    "hwVersion": 0,
    "dateCode": "",
    "swBuildId": "10276801",
    "zclVersion": 3,
    "interviewCompleted": true,
    "meta": {
        "configured": 2
    },
    "lastSeen": 1631360220867
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:42 (39 by maintainers)

github_iconTop GitHub Comments

2reactions
MartBcommented, Feb 2, 2022

Slightly offtopic, but seeing as these device enter the wild i wanted to add sth:

I got the GL-C-002P (mini version of the 001P) based on a Telink TLSR8258 and its beyond busted in my setup. It initially pairs once and after a power loss loses the connectivity and can never be re-paired again.

Is this the same for the 001P? It also does the model switching exactly like described here.

I bought an older GL-C-007 pro controller to verify if this also drops of the network with a leave message. Also talking with gledopto support to hopefully shine some light on this issue.

Pairing the thing with an amazon alexa echo show works fine.

1reaction
MartBcommented, Feb 8, 2022

If we already go through all these steps we could also include the 5in1 mini aka GL-C-002P. We need to mention that it is broken despite being detected as supported at the moment, as it does the same “identifying” model changing magic.

The gledopto mini 5in1 seems to be our only false positive “supported” device right now if im not mistaken

Read more comments on GitHub >

github_iconTop Results From Across the Web

ST-compatible RGBW LED Strip Controller Reviews (2020)
It looks like it supports all the normal capabilities including power meter, but I don't see any of the configuration settings added.
Read more >
gledopto
1.Battery power on the wall switch or manual. remote control. · 2.Within 3s when power on the gledopto light. source,press zone "l"(of any...
Read more >
Gledopto Gl-c-001p New Zigbee 5 In 1 Led Controller
A: Add it smarthings as normal and it will show up as a thing, Then got to the IDE device list and change...
Read more >
GLEDOPTO 5 in 1 Zigbee3.0 LED Strip Controller RGBCCT ...
Amazon.com: GLEDOPTO 5 in 1 Zigbee3.0 LED Strip Controller RGBCCT RGBW WWCW RGB Dimmer ... Add to Cart ... Support: Free Amazon tech...
Read more >
ZigBee Gledopto 5 in 1 LED Controller "Node has not ...
Somebody could also add this device to supported/tested devices. I like it because it supports much more than 3 colors between yellow and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found