Control Homeseer Door Lock - Object Reference error

Hi, I’m using Homeseer and trying to create a button to lock/unlock a door.

On the event trigger, I set the action to bind to the Lock capability and tried to set it to Lock (also tried true, 1 and 255 - 255 came from something I saw in HomeSeer)

When I run this in the simulator and click the button, I see a message saying object reference not set to an instance of an object.

Did I forget to configure something required to make this work or am I going about it the wrong way?

The Lock attribute for the Lock capability only has 2 possible values: Locked / Unlocked. Setting it to Lock or an integer will not work. If you want to use an integer, then use the HSValue attribute. HSStatus may accept Lock.

I’m not entirely certain that’s the reason you are seeing “Object Reference” errors though.

More details about capabilities & possible values can be found in the docs.

Thank you!! I see what I was doing wrong, I was trying to control it by setting the HSStatus value (and tried HSValue also), and the control entry for those items used “Lock”. Instead I needed to use the capability “Lock” and set it to “Locked” or “Unlocked”