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

[New device support]: SOMA Smart Shades 3 #23287

Closed ratsept closed 4 months ago

ratsept commented 4 months ago

Link

https://www.somasmarthome.com/products/soma-smart-shades-3

Database entry

{"id":2,"type":"EndDevice","ieeeAddr":"0xf4ce3692b2150df7","nwkAddr":2548,"manufId":4660,"manufName":"WazombiLabs","powerSource":"Battery","modelId":"SmartShades3","epList":[10],"endpoints":{"10":{"profId":260,"epId":10,"devId":514,"inClusterList":[0,3,5,4,1,258],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"dateCode":""}},"genPowerCfg":{"attributes":{"batteryPercentageRemaining":192}},"closuresWindowCovering":{"attributes":{"currentPositionLiftPercentage":0,"currentPositionTiltPercentage":0}}},"binds":[{"cluster":1,"type":"endpoint","deviceIeeeAddress":"0x00124b002a2e2642","endpointID":1},{"cluster":258,"type":"endpoint","deviceIeeeAddress":"0x00124b002a2e2642","endpointID":1}],"configuredReportings":[{"cluster":1,"attrId":33,"minRepIntval":3600,"maxRepIntval":65000,"repChange":10,"manufacturerCode":null},{"cluster":258,"attrId":8,"minRepIntval":1,"maxRepIntval":65000,"repChange":1,"manufacturerCode":null},{"cluster":258,"attrId":9,"minRepIntval":1,"maxRepIntval":65000,"repChange":1,"manufacturerCode":null}],"meta":{}}},"appVersion":1,"stackVersion":25,"hwVersion":5,"dateCode":"","swBuildId":"3.0.17+0","zclVersion":8,"interviewCompleted":true,"meta":{"configured":332242049},"lastSeen":1720430735321}

Comments

I managed to create the external definition and all the exposed data/controls seem to work correctly. I did not create the pull request as I can't seem to get the error to go away even after adding the device to the herdsman converters for some reason. I'm not a JS/node programmer so I'm not sure what I'm doing but what I did was clone both zigbee2mqtt and zigbee-herdsman-converters repositories. I made sure the zigbee2mqtt thing was running and getting this error (changed the serial port to ttyUSB0, enabled frontend). Then I copied the external definition and pasted it into a new file soma.ts in zigbee-herdsman-converters/src/devices and ran npm run build. After that I went back to zigbee2mqtt and ran npm install ../zigbee-herdsman-coverters/ and npm start. After all that I still get the same error.

I don't want to make an external converter. Instead I want to add support for the SOMA devices directly into this project as more than one of our users have asked for this now.

External definition

const {identify, battery, windowCovering} = require('zigbee-herdsman-converters/lib/modernExtend');

const definition = {
    zigbeeModel: ['SmartShades3'],
    model: 'SmartShades3',
    vendor: 'WazombiLabs',
    description: 'Automatically generated definition',
    extend: [identify(), battery(), windowCovering({"controls":["lift","tilt"]})],
    meta: {},
};

module.exports = definition;
Koenkk commented 4 months ago

Added!

Changes will be available in the dev branch in a few hours from now.

Could you also submit a picture for the docs? This can be done by:

  1. Create a fork by clicking here
  2. Go to the public/images/devices directory, Add file -> Upload files
  3. Upload the files and press Commit changes
  4. Press Contribute -> Open pull request -> update title/description -> Create pull request

Make sure that: