Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
12.35k stars 1.69k forks source link

Vimar connected actuator 16A #10101

Closed Nik71git closed 2 years ago

Nik71git commented 2 years ago
try all, that's the debug log: ``` g Received MQTT message on 'zigbee2mqtt/bridge/request/permit_join' with data '{"device":null,"time":254,"transaction":"r5hty-2","value":true}' Info Zigbee: allowing new devices to join. Info MQTT publish: topic 'zigbee2mqtt/bridge/response/permit_join', payload '{"data":{"time":254,"value":true},"status":"ok","transaction":"r5hty-2"}' Info Device '0xf4ce36861f89add6' joined Info MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0xf4ce36861f89add6","ieee_address":"0xf4ce36861f89add6"},"type":"device_joined"}' Info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":{"friendly_name":"0xf4ce36861f89add6"},"type":"device_connected"}' Info Starting interview of '0xf4ce36861f89add6' Info MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"friendly_name":"0xf4ce36861f89add6","ieee_address":"0xf4ce36861f89add6","status":"started"},"type":"device_interview"}' Info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_started","meta":{"friendly_name":"0xf4ce36861f89add6"},"type":"pairing"}' Debug Received Zigbee message from '0xf4ce36861f89add6', type 'readResponse', cluster 'genBasic', data '{"modelId":"Mains_Power_Outlet_v1.0"}' from endpoint 10 with groupID null Debug Skipping message, definition is undefined and still interviewing Debug Received Zigbee message from '0xf4ce36861f89add6', type 'readResponse', cluster 'genBasic', data '{"manufacturerName":"Vimar"}' from endpoint 10 with groupID null Debug Skipping message, definition is undefined and still interviewing Debug Received Zigbee message from '0xf4ce36861f89add6', type 'readResponse', cluster 'genBasic', data '{"powerSource":1}' from endpoint 10 with groupID null Debug Skipping message, definition is undefined and still interviewing Debug Received Zigbee message from '0xf4ce36861f89add6', type 'readResponse', cluster 'genBasic', data '{"zclVersion":2}' from endpoint 10 with groupID null Debug Skipping message, definition is undefined and still interviewing Debug Received Zigbee message from '0xf4ce36861f89add6', type 'readResponse', cluster 'genBasic', data '{"appVersion":1}' from endpoint 10 with groupID null Debug Skipping message, definition is undefined and still interviewing Debug Received Zigbee message from '0xf4ce36861f89add6', type 'readResponse', cluster 'genBasic', data '{"stackVersion":10}' from endpoint 10 with groupID null Debug Skipping message, definition is undefined and still interviewing Debug Received Zigbee message from '0xf4ce36861f89add6', type 'readResponse', cluster 'genBasic', data '{"hwVersion":11}' from endpoint 10 with groupID null Debug Skipping message, definition is undefined and still interviewing Debug Received Zigbee message from '0xf4ce36861f89add6', type 'readResponse', cluster 'genBasic', data '{"dateCode":"20200501"}' from endpoint 10 with groupID null Debug Skipping message, definition is undefined and still interviewing Debug Received Zigbee message from '0xf4ce36861f89add6', type 'readResponse', cluster 'genBasic', data '{"swBuildId":""}' from endpoint 10 with groupID null Debug Skipping message, definition is undefined and still interviewing Info Successfully interviewed '0xf4ce36861f89add6', device has successfully been paired Warning Device '0xf4ce36861f89add6' with Zigbee model 'Mains_Power_Outlet_v1.0' and manufacturer name 'Vimar' is NOT supported, please follow https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html Info MQTT publish: topic 'zigbee2mqtt/bridge/event', payload '{"data":{"definition":null,"friendly_name":"0xf4ce36861f89add6","ieee_address":"0xf4ce36861f89add6","status":"successful","supported":false},"type":"device_interview"}' Info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"friendly_name":"0xf4ce36861f89add6","supported":false},"type":"pairing"}' Debug Received MQTT message on 'zigbee2mqtt/bridge/request/device/rename' with data '{"from":"0xf4ce36861f89add6","homeassistant_rename":true,"to":"presa bagno piccolo","transaction":"r5hty-3"}' Info MQTT publish: topic 'zigbee2mqtt/0xf4ce36861f89add6', payload '' Info MQTT publish: topic 'zigbee2mqtt/presa bagno piccolo/availability', payload 'online' Debug Refreshing Home Assistant discovery topic for '0xf4ce36861f89add6' Info MQTT publish: topic 'zigbee2mqtt/presa bagno piccolo', payload '{"linkquality":236}' Info MQTT publish: topic 'zigbee2mqtt/bridge/response/device/rename', payload '{"data":{"from":"0xf4ce36861f89add6","homeassistant_rename":true,"to":"presa bagno piccolo"},"status":"ok","transaction":"r5hty-3"}' Debug Saving state to file /config/zigbee2mqtt/state.json ``` and this is the 16943.js file I did: ``` 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: ['actuator'], model: 'Mains_Power_Outlet_v1.0', vendor: 'Vimar', description: 'attuatore', 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; ``` ## Information about the device + link Vimar 16493 [..](https://www.vimar.com/en/int/catalog/product/index/code/16493) ## data/database.db entry of the device ``` {"id":14,"type":"Router","ieeeAddr":"0xf4ce364d31442f50","nwkAddr":5854,"manufId":4660,"manufName":"Vimar","powerSource":"Mains (single phase)","modelId":"Mains_Power_Outlet_v1.0","epList":[10,242],"endpoints":{"10":{"profId":260,"epId":10,"devId":9,"inClusterList":[0,3,6,5,4],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"modelId":"Mains_Power_Outlet_v1.0","manufacturerName":"Vimar","powerSource":1,"zclVersion":2,"appVersion":1,"stackVersion":10,"hwVersion":11,"dateCode":"20200501","swBuildId":""}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":1,"stackVersion":10,"hwVersion":11,"dateCode":"20200501","swBuildId":"","zclVersion":2,"interviewCompleted":true,"meta":{},"lastSeen":1638609938309} {"id":15,"type":"Router","ieeeAddr":"0xf4ce36861f89add6","nwkAddr":52856,"manufId":4660,"manufName":"Vimar","powerSource":"Mains (single phase)","modelId":"Mains_Power_Outlet_v1.0","epList":[10,242],"endpoints":{"10":{"profId":260,"epId":10,"devId":9,"inClusterList":[0,3,6,5,4],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"modelId":"Mains_Power_Outlet_v1.0","manufacturerName":"Vimar","powerSource":1,"zclVersion":2,"appVersion":1,"stackVersion":10,"hwVersion":11,"dateCode":"20200501","swBuildId":""}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":1,"stackVersion":10,"hwVersion":11,"dateCode":"20200501","swBuildId":"","zclVersion":2,"interviewCompleted":true,"meta":{},"lastSeen":1639002328986,"useImplicitCheckin":true}.. ``` PLease help me... :-(
Nik71git commented 2 years ago

GREAT UPGRADE !!! IT WORK'S !!! here the file .js

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: ['Mains_Power_Outlet_v1.0'],
    model: '16493',
    vendor: 'Vimar',
    description: 'attuatore',
    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;

The problem is that something is wrong after commented lines, if device is drive by Zigbee2mqtt it works very well, if I drive the device manually it doesn't report the state on/off on zigbee2mqtt... As soon as I correct it (with your help if possible) the device is ready for pull request on supported device (it expose only on/off, really I don't know if it expose consumption too as when it is bluetooth converted...)

Nik71git commented 2 years ago

SOLVED! feedback when manually actuated by reporting endpoint --> cluster onOff --> attribute onOff --> min 1--> max 3600 --> 0