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.

LXX60-CS27LX1.0 and LXN59-CS27LX1.0 smart curtain switch

See original GitHub issue

Hello, I hope someone might be able to help me. Yagusmart started selling really good prices curtain switch zigbee actuators on amazon.de https://www.amazon.de/gp/product/B08BFL1HDN/ref=ppx_yo_dt_b_asin_title_o08_s00?ie=UTF8&psc=1.

I bought one a few weeks ago to do aa test implementation and managed to get up/ down running relatively easily (just treating the device like a switch) using the following code in the devices.js

{
        zigbeeModel: ['LXX60-CS27LX1.0'],
        model: 'LXX60-CS27LX1.0',
        vendor: '3A Smart Home DE',
        description: 'Zigbee Smart Curtain Switch',
        extend: preset.switch(),
        whiteLabel: [{vendor: 'Zemismart', model: 'ZW-EC-01', description: 'Zigbee Smart Curtain Switch'}],
        meta: {configureKey: 2},
        configure: async (device, coordinatorEndpoint, logger) => {
            const endpoint1 = device.getEndpoint(1);
            await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
            await reporting.bind(endpoint1, coordinatorEndpoint, ['closuresWindowCovering'])
            await reporting.onOff(endpoint1);
            device.powerSource = 'Mains (single phase)';
            device.type = 'EndDevice';
            device.save();
        },
  }

now comes the tricky part. Since I got that to work I ordered 13 more to fit all of my switches. I connected the first of the modules and to my suprise they look identical but are a different model number. The first “test” one is LXX60-CS27LX1.0 the new ones are LXN59-CS27LX1.0.

Those new ones don’t respond to anything I do. They seem to send the same messages to the network for example:

Debug Received Zigbee message from 'buero_rollladen_rechts', type 'attributeReport', cluster 'closuresWindowCovering', data '{"currentPositionLiftPercentage":0,"tuyaMovingState":2}' from endpoint 1 with groupID 0 Debug No converter available for 'LXN59-CS27LX1.0' with cluster 'closuresWindowCovering' and type 'attributeReport' and data '{"currentPositionLiftPercentage":0,"tuyaMovingState":2}' Debug Received Zigbee message from 'buero_rollladen_rechts', type 'attributeReport', cluster 'closuresWindowCovering', data '{"currentPositionLiftPercentage":0,"tuyaMovingState":2}' from endpoint 1 with groupID 0 Debug No converter available for 'LXX60-CS27LX1.0' with cluster 'closuresWindowCovering' and type 'attributeReport' and data '{"currentPositionLiftPercentage":0,"tuyaMovingState":2}'

But I can’t control the 59er models only the 60s.

Can anyone give me a hint how to approach this problem? I can provide any data needed please feel free to ask.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:34 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
Koenkkcommented, Jul 15, 2021

You can mark the cover as being inverted by changing meta: {configureKey: 2, disableDefaultResponse: true}, to meta: {configureKey: 2, disableDefaultResponse: true, coverInverted: true},

1reaction
josi0815commented, Jul 19, 2021

Thanks @a-bailey, based on your work i got my LXN59 working . I changed a bit to get rid of a warning and to get better feedback into fhem`

{ zigbeeModel: [‘LXN59-CS27LX1.0’], model: ‘LXN59-CS27LX1.0’, vendor: ‘3A Smart Home DE’, description: ‘Smart Zigbee 3.0 curtain controller’, fromZigbee: [fz.cover_position_tilt, fz.LXN59_cover_state_via_onoff, fz.LXN59_tuya_cover_options], toZigbee: [tz.cover_state, tz.cover_position_tilt], whiteLabel: [{vendor: ‘3A Smart Home DE’, model: ‘LXN59-CS27LX1.0’, description: ‘Smart Zigbee 3.0 curtain controller’}], meta: {configureKey: 2, disableDefaultResponse: true}, exposes: [e.cover_position(), exposes.enum(‘moving’, ea.STATE, [‘UP’, ‘STOP’, ‘DOWN’])], configure: async (device, coordinatorEndpoint, logger) => { const endpoint1 = device.getEndpoint(1); await reporting.bind(endpoint1, coordinatorEndpoint, [‘genOnOff’]); await reporting.onOff(endpoint1); await reporting.bind(endpoint1, coordinatorEndpoint, [‘closuresWindowCovering’]) await reporting.currentPositionLiftPercentage(endpoint1); device.powerSource = ‘Mains (single phase)’; device.save(); }, },

added to “fromZigbee” :

LXN59_tuya_cover_options: {
    cluster: 'closuresWindowCovering',
    type: ['attributeReport', 'readResponse'],
    convert: (model, msg, publish, options, meta) => {
        const result = {};
        if (msg.data.hasOwnProperty('tuyaMovingState')) {
            const value = msg.data['tuyaMovingState'];
            const movingLookup = {0: 'DOWN', 1: 'UP', 2: 'STOP'};
            result.moving = movingLookup[value];
        }
        if (msg.data.hasOwnProperty('tuyaCalibration')) {
            const value = msg.data['tuyaCalibration'];
            const calibrationLookup = {0: 'ON', 1: 'OFF'};
            result.calibration = calibrationLookup[value];
        }
        if (msg.data.hasOwnProperty('tuyaMotorReversal')) {
            const value = msg.data['tuyaMotorReversal'];
            const reversalLookup = {0: 'OFF', 1: 'ON'};
            result.motor_reversal = reversalLookup[value];
        }
        return result;
    },
},
LXN59_cover_state_via_onoff: {
    cluster: 'genOnOff',
    type: ['attributeReport', 'readResponse'],
    convert: (model, msg, publish, options, meta) => {
        if (msg.data.hasOwnProperty('onOff')) {
            return {state: msg.data['onOff'] === 1 ? 'CLOSED' : 'OPEN'};
        }
    },
},`
Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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