Samsung Multipurpose Sensor

Hi there,

I just bought one of the Samsung Multipurpose sensors (https://support.smartthings.com/hc/en-gb/articles/205382174-Samsung-SmartThings-Multi-Sensor) to try out with the gateway.

The other Samsung product I’ve connected so far is the Samsung SmartThings Outlet plug which connected to gateway with no issues for me once I set the plug into pairing mode.

I’ve haven’t had the same easy set up to connect to the Gateway with the Samsung multipurpose sensor.

I’m just posting to see if anyone else has connected it to the gateway yet or has any suggestions how to make this work?

Thanks
Loraine

Hi Loraine,

This should get classified as a binary sensor (at least for the door/window sensor part), but I don’t think the Zigbee classifier recognises it yet.

The team is currently in Mountain View and coincidentally @twobraids just drove to Fry’s to buy one of these and @dhylands is working his magic as we speak. Stay tuned!

Ben

ahahaha. Awesome, talk about good timing.
Thanks
Loraine

I have a such “F-SS-MULT-001” sensor (from ST gateway kit) but no Zigbee adapter to try it, can you suggest any (that also support ZWave preferably) ?

Not yet. I have a few zigbee sensors and so far I’ve had issues with all of them. I will be working on this and will figure out what the issue is.

Dave Hylands

Hi everyone,
I have got a related question to this subject: It’s great that the Samsung/SmartThings Multipurpose Sensor can be added now with the Zigbee add-on. It works well as an open/close and temperature sensor. My question is: is there a way to also get the acceleration data? Thanks!

Currently there isn’t. The multipurpose sensor uses a vendor specific cluster which isn’t documented. Although I did find the device handler code for it here:


so it should be possible to figure something out.

Hi Dave, thanks for that. I might have a go at it. Would making some changes in the zigbee-adapter get me anywhere? It looks like the file, zb-classifier has the different zigbee device properties defined in there. OR could you point me to where/what I could do to get acceleration data?
Thanks again!

The classifier looks at a node and the information that has been collected so far to determine which properties that a device should have.

For zigbee, when the classifier adds properties, this also triggers “binding and reporting intervals” which cause cluster changes to be reported back to the gateway. The classifier also registers parsing/setting functions (which come from the zb-property.js file) for encoding/decoding the data going to/from the device.

Since the accelerometer is manufacturer specific, you’ll probably need to add a check on node.modelId (similar to this one: https://github.com/mozilla-iot/zigbee-adapter/blob/c037b4a30dcd8382f6a89c64096d846628f6cb61/zb-classifier.js#L1899) but inside the appropriate initXxxx function that gets called for the multi-purpose sensor (I don’t recall off the top of my head exactly which routine this is).

1 Like

Hi Dave,
Thanks for that.
I followed most of your suggestion/example using the clusterid ‘fc02’ (according to the smartthings groovy) but I think I am still missing something , particularly at the add property part (I pasted my code below). I am not sure what else I am missing. Any ideas? Thank you!

const accelerationEndpoint =
node.findZhaEndpointWithInputClusterIdHex(‘fc02’);
if (accelerationEndpoint) {
this.addAccelerationProperty(node, accelerationEndpoint);
}

addAccelerationProperty(node, accelerationEndpoint) {
//multipurpose sensor
const property = this.addProperty(
node, // device
‘acceleration’, // name
{//property description // property description
@type’: ‘Acceleration’,
label: ‘acceleration’,
type: ‘boolean’,
readOnly: true,
},
PROFILE_ID.ZHA, // profileId
node.ssIasZoneEndpoint, // endpoint
64514, // clusterId
‘’, // attr
‘’, // setAttrFromValue
‘’ // parseValueFromAttr
);
}

You’ll need the clusterId 0xFc02 and the attrId 0x0010.

The zigbee adapter uses the clusterId and attrId to figure out which property a given attribute is associated with.

Which made me realize that you’ll probably need to modify zcl-id to add 64514 as a cluster: https://github.com/dhylands/zcl-id/blob/master/definitions/common.json#L197 and add the attrIds here: https://github.com/dhylands/zcl-id/blob/master/definitions/cluster_defs.json#L1309

Hey Dave,
Sorry to bug you some more. I’m still not quite there yet.

Adding a new clusterId in the common.json file seems quite straightforward. This is what I added:

"smartThingsAcceleration": 64514,

But for adding the attrIds in the cluster_defs.json file, do you have any references to how they should be defined?

Also, I am guessing that I should add a value to CLUSTER_ID in zb-constants.js

SMARTTHINGSACCELERATION: zclId.cluster('smartThingsAcceleration').value

Thanks again!

The zigpy project seems to have a bit of documentation for attributeIds: https://github.com/zigpy/zigpy/issues/87

Along with: https://github.com/SmartThingsCommunity/SmartThingsPublic/blob/PROD_2018.09.11/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy

1 Like

I think I am still missing something or added something incorrectly.

This is the error I am getting:

ERROR : zigbee: Response: readRsp got status: unsupAttribute (134) node: zb-286d97000100d6ca-switch cluster: smartThingsAcceleration (64514) attr: acceleration (16)

To give some additional context, this is what I have done so far:

  • added clusterId in the common.json file
  • added stuff in cluster_defs.json

“smartThingsAcceleration”: {
“attrId”:{
“Acceleration”:{“id”:16,“type”:“uint16”},
“threeAxisX”:{“id”:18,“type”:“uint32”},
“threeAxisY”:{“id”:19,“type”:“uint32”},
“threeAxisZ”:{“id”:20,“type”:“uint32”}},
“cmd”:{“enrollRsp”:0,“initNormalOpMode”:1,“initTestMode”:2},
“cmdRsp”:{“statusChangeNotification”:0,“enrollReq”:1}}

  • also added this in zb-constant.js

makeAttrIds(‘SMARTTHINGSACCELERATION’, [
‘acceleration’, // 16 (0x10)
‘threeAxisX’, // 18 (0x12)
‘threeAxisY’, // 19 (0x13)
‘threeAxisZ’, // 20 (0x14)
]);

  • created an ‘addProperty’ component for acceleration in zb-classifier (I could past my code if that helps).

Hope most of that made sense.

Would you have any ideas or suggestions of what else I might be missing or did wrong?

Thank you!