Updated Life360 DTH & unusually named attributes


#1

1) Give a description of the problem
I have a piston which I was using with the webcore presence sensor which uses currentPlace to present current geofence location, but need to update it to use Life360 sensors (using the newer life360 DTH https://community.smartthings.com/t/release-life360-refreshed-every-minute-all-places-more-updated-01-01-2019-all-api-data-available-for-webcore-usage/116681)
This DTH presents currentPlace in address1 which I cannot pick in the webcore IDE when the device is stored in a variable - only standard? attributes appear to be presented

2) What is the expected behavior?
I would like to be able to use address1 (or any of the non standard attributes) as a trigger to a Life360 presence device stored in a variable

3) What is happening/not happening?
The webcore IDE only appears to allow you to pick expected/standard? attributes when the device is stored in a variable

**4) Post a Green Snapshot of the piston![image|45x37]![image|322x500]
A piston screenshot won’t help unless you have Life360 sensors so hopefully screenshots of the attribute picker in the UI when using the device itself versus a variable containing the device will help


Many thanks

Phil


#2

Maybe not exactly the way you want to do it, but this may give you some ideas:


#3

Thanks @TheBearMay. Seems a bit of a hassle to have to do this…but if it works :wink:


#4

It seems to solve half the problem, namely I can get to the attribute. But I’m not sure this helps for being about to react to events on that attribute…

What I’m specifically after is an equivalent to the following:
on events from
{presencedevices}'s presence
or
{presencedevices}'s address1
do
blah blah


#5

The only way I’ve done something like you’re asking is to have a secondary piston kick off when the presence of a specific device changes to not present, and then have it continually submit another generic piston on a timer until the presence reads present again. Could also use the $places[index] to compare a device’s proximity to one of the locations defined in webCoRE (p[0] is latitude, p[1] is longitude, and i is the radius of the inner circle.


#6

Is there a limit to the number of attributes displayed in the webcore drop downs? If my counting is correct when I have multiple devices in a variable, there are 95 elements in that drop down list…could I be hitting a GUI limitation…and that if for example the limit was 96…i’d also be seeing address1 as its the next element in the drop down in the first screenshot?


#7

I’ve never heard of a limit, and don’t see one when taking a quick run through of the code, but…


#8

I had a go at looking at the source on github…but I’m no developer so got lost quite quickly…

There was a section that looked promising in the piston.modules.js ($scope.listAvailableCommands) that if i read it correctly seemed to do something along the lines of:
if it is a device (or list of devices) then for each device get its attributes add them to some collection, otherwise add the list of attributes from $scope.db.commands.physical

To me that looks like what i’m seeing is some stock list as its unable to ascertain that a variable contains devices and therefore doesn’t look at the devices in the variable and build the list from the contained devices and instead just uses some ‘stock’ list…but as I say…I’m no dev and i may have just got hopelessly lost