Koenkk / zigbee2mqtt

Zigbee šŸ to MQTT bridge šŸŒ‰, get rid of your proprietary Zigbee bridges šŸ”Ø
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.5k stars 1.63k forks source link

[New device support]: Smart Plug ELIVCO LSPA9 #20518

Open pblgomez opened 6 months ago

pblgomez commented 6 months ago

Link

https://es.aliexpress.com/item/1005005665327210.html

Database entry

{ "id": 2, "type": "Unknown", "ieeeAddr": "0x70b3d52b60045d03", "nwkAddr": 11134, "epList": [], "endpoints": {}, "interviewCompleted": false, "meta": {}, "lastSeen": 1704209845951, "defaultSendRequestWhen": "immediate" }

Comments

Using zigbee2mqtt 1.34.0 and a Sonoff Dongle-P

It gives no info in db or logs

zigbee2mqtt              | Zigbee2MQTT:info  2024-01-02 15:37:25: Device '0x70b3d52b60045d03' joined
zigbee2mqtt              | Zigbee2MQTT:info  2024-01-02 15:37:25: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x70b3d52b60045d03","ieee_address":"0x70b3d52b60045d03"},"type":"device_joined"}'
zigbee2mqtt              | Zigbee2MQTT:info  2024-01-02 15:37:25: Starting interview of '0x70b3d52b60045d03'
zigbee2mqtt              | Zigbee2MQTT:info  2024-01-02 15:37:25: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x70b3d52b60045d03","ieee_address":"0x70b3d52b60045d03","status":"started"},"type":"device_interview"}'
zigbee2mqtt              | Zigbee2MQTT:error 2024-01-02 15:39:44: Failed to interview '0x70b3d52b60045d03', device has not successfully been paired
zigbee2mqtt              | Zigbee2MQTT:info  2024-01-02 15:39:44: MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0x70b3d52b60045d03","ieee_address":"0x70b3d52b60045d03","status":"failed"},"type":"device_interview"}'

External defintion

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    zigbeeModel: ['lspa9'],
    model: 'LSPA9',
    vendor: 'ELIVCO',
    description: '20A Tuya plug',
    fromZigbee: [fz.on_off],
    toZigbee: [tz.on_off],
    exposes: [e.switch()],
    // The configure method below is needed to make the device reports on/off state changes
    // when the device is controlled manually through the button on it.
    configure: async (device, coordinatorEndpoint, logger) => {
        const endpoint = device.getEndpoint(1);
        await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
        await reporting.onOff(endpoint);
    },
};

module.exports = definition;
~
matriphe commented 2 weeks ago

I think it's already covered by TS011F_plug_1