Vera Motion Sensor devices and attributes?

Hi

Just looking at all my motion sensor devices in Home Remote and I noticed one of them has an Attribute and none of the other have this, I am wondering why?

Also I am still figuring out what Attributes and Capabilities means fully and in which context.

The motion sensor device that has this “lasttrip” attribute was the last device I paired to Vera recently.

image

None of the other seven motion sensor devices I have show this attribute, they don’t have any attributes at all showing in the Attributes field in the designer GUI.

I am looking at your help page here about Capabilities.

I assume “Attributes” mentioned on this help document is not the same thing as the “Attributes” field on the device in the designer ?

I was expecting to see on the help document titled “Capabilities” what types of Capabilities each device type can have?

However it doesn’t, it instead tells me the device states a device can have e.g. ON or OFF or in the case of a motion sensor Active / Inactive.

Regarding Capabilities in the designer GUI, I see these Capabilities on Motion Sensor devices. All motion sensor devices have MotionSensor, only some have PowerMeter etc.

Battery
MotionSensor
PowerMeter

image

Thanks

The only thing Sync does with existing is update their Capabilities. Attributes are not overwritten. lasttrip was something that was added to the sync probably a month or 2 ago. It was not always part of the Sync. To have Sync overwrite all of the properties would be dangerous because it has to assume you could have made changes.

So if I manually add this attribute to the other motion sensors I’m good.

Thanks.

There isn’t a fixed set of Capabilities for each Device Type. This is intentional. This gives us the flexibility to have virtually any Capability be assigned to any DeviceType. A thermostat, camera, etc, can all have the MotionSensor capability. Not all motion sensors are alike either. Some motion sensors have temperature & humidity capabilities, some don’t.

Yes, that is correct.

1 Like

Learning what Attributes do !

I now have last tripped data for all my Motion and Contact sensors.

image

Got me thinking what else can it do ?

This is a Neo CoolCam Z-Wave motion sensor.

{ "name": "Lounge Motion", "altid": "75", "id": 331, "category": 4, "subcategory": 3, "room": 1, "parent": 1, "armedtripped": "0", "armed": "0", "configured": "1", "batterylevel": "83", "light": "0.0", "watts": "", "pulse": "50988332", "lasttrip": "1605035930", "tripped": "0", "commFailure": "1" }

Knowing if the motion sensor is Armed or not might be handy. Vera has values of 0 for Not Armed and 1 for Armed

So I just added “armed” to a motion sensors attributes in the designer.

image

So added a new Label with a binding off @Device.armed

image

I then added two Data Triggers on the label to change it to friendly text, rather than 0 or 1.

image

image

This is great for read only data in the SDATA stream coming from Vera, I can now add much more information on to my tiles in Home Remote.

However what if I want to actually change this motion sensor device in Home Remote to actually be Armed / Not Armed ?

@bill How would you do it ?

Can I actually create a button with the binding of @Device.armed and send a 0 or 1 back to Vera and have it control that aspect of the motion sensor device?

Only way I know is to sent a http command to Vera to set that devices Armed variable to a 1 or 0.

Armed = 1

http://VERA-IP/port_3480/data_request?id=lu_variableset&DeviceNum=331&serviceId=urn:micasaverde-com:serviceId:SecuritySensor1&Variable=Armed&Value=1

Armed = 0

http://VERA-IP/port_3480/data_request?id=lu_variableset&DeviceNum=331&serviceId=urn:micasaverde-com:serviceId:SecuritySensor1&Variable=Armed&Value=0

I then added a Toggle button with two Event Triggers and two Data Triggers.

image

The Data Triggers work and keep the toggle button in HR in sync with the same Armed / Disarmed button in Vera etc.

The Event Triggers as I suspected don’t work.

image

image

SDATA is only one way read only data and HR can’t control these “attributes” or variables in reverse.

Looks like I will have to fire off those Vera HTTP API commands instead, but that would mean having a different MotionSensorDetails.xaml page for each motion sensor device I have on Vera.

Any better way to do this ?

Thanks.

The next release will allow you to set the “armed” mode. In the current version it is read-only. The command it sends will be a little bit different than the ones you’ve shown. I usually use the actions defined in the LUUP files.

Here’s the command as defined in S_SecuritySensor1.xml

Armed = 1

http://VERA-IP:3480/data_request?id=action&output_format=json&DeviceNum=331&serviceId=urn:micasaverde-com:serviceId:SecuritySensor1&action=SetArmed&newArmedValue=1

Armed = 0

http://VERA-IP:3480/data_request?id=action&output_format=json&DeviceNum=331&serviceId=urn:micasaverde-com:serviceId:SecuritySensor1&action=SetArmed&newArmedValue=0

You may want to test these to make sure they work but I’m pretty sure they will.

1 Like

I’ve just tested them and they do work fine and Arm / Disarm that particular motion sensor device.

Also note, other Vera security sensors like Door / Window contacts and Smoke Dectectors etc also have an Armed / Disarmed function.

Thanks.

1 Like

I can confirm this is working now.

Using the Binding of @Device.armed and values of 0 or 1 I can now Arm or Disarm my motion sensor devices and Door Contacts via a button in Home Remote.

image

Note Attributes appear to be case sensitive so if you added an attribute of “armed”

image

Then you need to use @Device.armed not @Device.Armed which doesn’t work.