Open smarthomesydney opened 3 years ago
Can you give me some direction on whats involved in twerking the app to work🥺
I have tried the obvious (changing manufacturers id and model is, adding the additional capabilities in the interview. No luck) Don't fully understand the code below manufacturers I'd, model is and clusters/capabilities numbers.
Would be keen to work with you to update to support more devices like water sensor, newer motion sensors and buttons from smartthings and then add to community store for more usage.
I have all the below devices, and could test. If they all work, could add other devices from groovy. (Happy to help with icons, descriptions etc. Its just the capabilities and cluster coding I don't understand)
https://store.homey.community/
SmartThings Motion Sensor (2018) Manufacturer id Samjin Model id motion
SmartThings Button (2018) Manufacturer id Samjin Model id button
SmartThings Moisture Sensor (2018) Manufacturer id Samjin Model id water
SmartThings Power Outlet Australia (2018) {this will use same capabilities as US model below, but interviews as below naming) Manufacturer id LDS Model id ZB-ONOFFPlug-D0005
SmartThings Power Outlet US (2018) Manufacturer id Samjin Model id outlet
Hi!
It's been a while since I worked on this.
Essentially the manifest (app.json) needs to list a device with the correct id's
https://apps.developer.homey.app/wireless/zigbee#manifest
And then either a simple inheritance of the driver can be created for that device, or a copy with modifications can be made.
In the Homey SDK some common attributes are supported via easy functions while others need a more complicated mapping.
To get these working the groovey file was of good help to me when I did this for my devices but for some of the functionality I had to play a bit around.
For the first device it might be something like this:
"drivers": [ { "id": "motion2018", "name": { "en": "Motion Sensor (2018)" },
"zigbee": { "manufacturerName": "Samjin", "productId": [ "motion" ], "deviceId": 1026, "profileId": 260,
I could maybe make a branch one day with those values so you can try them to see if that driver works ok for that one.
Can you have a look at the branch called feature/motion-2018 (pull request #9 ) and see if it works for your device?
Can you have a look at the branch called feature/motion-2018 (pull request #9 ) and see if it works for your device?
Device pairs, but no function. Battery is blank, motion alarm not detected and no temperature reading.
FYI: I had to drop the SDK field in app.json from 3 to 2, as the code wouldn't install with error. Also, the battery in this motion sensor 2018 is a CR2.
I have 10 of them, so am keen to work with you. I am techie, but not great coder... limited capabilites
/INTERVIEW EXPORT/
"ids": { "modelId": "motion", "manufacturerName": "Samjin" }, "endpoints": { "endpointDescriptors": [ { "endpointId": 1, "applicationProfileId": 260, "applicationDeviceId": 1026, "applicationDeviceVersion": 0, "_reserved1": 0, "inputClusters": [ 0, 1, 3, 32, 1026, 1280, 2821 ], "outputClusters": [ 3, 25 ] } ], "endpoints": { "1": { "clusters": { "basic": { "attributes": [ { "acl": [ "readable", "reportable" ], "id": 0, "name": "zclVersion", "value": 2, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 1, "name": "appVersion", "value": 17, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 3, "name": "hwVersion", "value": 0, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 4, "name": "manufacturerName", "value": "Samjin", "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 5, "name": "modelId", "value": "motion", "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 7, "name": "powerSource", "value": "battery", "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 16384, "name": "swBuildId", "value": "", "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 65533, "name": "clusterRevision", "value": 1, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } } ], "commandsGenerated": [], "commandsReceived": [ "factoryReset" ] }, "powerConfiguration": { "attributes": [ { "acl": [ "readable", "reportable" ], "id": 32, "name": "batteryVoltage", "value": 25, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 33, "name": "batteryPercentageRemaining", "value": 120, "reportingConfiguration": { "direction": "reported", "attributeDataType": 32, "minInterval": 1, "maxInterval": 65534, "minChange": 0, "status": "SUCCESS" } }, { "acl": [ "readable", "reportable" ], "id": 65, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 65533, "name": "clusterRevision", "value": 1, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } } ], "commandsGenerated": [], "commandsReceived": [] }, "identify": { "attributes": [ { "acl": [ "readable", "writable", "reportable" ], "id": 0, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 65533, "name": "clusterRevision", "value": 1, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } } ], "commandsGenerated": [ 0 ], "commandsReceived": [ 0, 1 ] }, "pollControl": { "attributes": [ { "acl": [ "readable", "writable", "reportable" ], "id": 0, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 1, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 2, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "writable", "reportable" ], "id": 3, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 65533, "name": "clusterRevision", "value": 1, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } } ], "commandsGenerated": [ 0 ], "commandsReceived": [ 0, 1, 2, 3 ] }, "temperatureMeasurement": { "attributes": [ { "acl": [ "readable", "reportable" ], "id": 0, "name": "measuredValue", "value": 2462, "reportingConfiguration": { "direction": "reported", "attributeDataType": 41, "minInterval": 1, "maxInterval": 65534, "minChange": 0, "status": "SUCCESS" } }, { "acl": [ "readable", "reportable" ], "id": 1, "name": "minMeasuredValue", "value": 0, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 2, "name": "maxMeasuredValue", "value": 0, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 65533, "name": "clusterRevision", "value": 1, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } } ], "commandsGenerated": [], "commandsReceived": [] }, "iasZone": { "attributes": [ { "acl": [ "readable", "reportable" ], "id": 0, "name": "zoneState", "value": "notEnrolled", "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 1, "name": "zoneType", "value": "motionSensor", "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 2, "name": "zoneStatus", "value": { "type": "Buffer", "data": [ 33, 0 ] }, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "writable", "reportable" ], "id": 16, "name": "iasCIEAddress", "value": "00:00:00:00:00:00:00:00", "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 17, "name": "zoneId", "value": 255, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 65533, "name": "clusterRevision", "value": 1, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } } ], "commandsGenerated": [ "zoneStatusChangeNotification", 1 ], "commandsReceived": [ "zoneStatusChangeNotification" ] }, "diagnostics": { "attributes": [ { "acl": [ "readable", "reportable" ], "id": 0, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 1, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 256, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 257, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 258, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 259, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 260, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 261, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 262, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 263, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 264, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 265, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 266, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 267, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 268, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 269, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 270, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 271, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 272, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } } ], "commandsGenerated": [], "commandsReceived": [] } }, "bindings": { "identify": { "attributes": [ { "acl": [ "readable", "writable", "reportable" ], "id": 0, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } }, { "acl": [ "readable", "reportable" ], "id": 65533, "name": "clusterRevision", "value": 1, "reportingConfiguration": { "status": "NOT_FOUND", "direction": "reported" } } ], "commandsGenerated": [ 0 ], "commandsReceived": [ 0, 1 ] }, "ota": { "attributes": [], "commandsGenerated": [], "commandsReceived": [] } } } } }
SmartthingsMotionInterview.txt
Attached is the output from the interview with all required details.
https://github.com/SmartThingsCommunity/SmartThingsPublic/blob/master/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy
Device is Samjin / motion in the groovy 👍 (same groovy as motionv5) Name Can be SmartThings Motion Sensor (2018)
Thanks mate