[RELEASE] Life360 with States - Track all attributes with app and driver. Also supports RM4 and Dashboards!

New version on GitHub...

App: Changes by @9369292f1992a7d0e654
2.1.1 - 12/01/20 - Applied a more wholesome compare to v 2.0.9 and fixed all the issues resulting
2.1.0 - 12/01/20 - Made a bunch of changes primarily to consolidate multiple functions logic and ensure attributes are in sync

Driver: Changes by @9369292f1992a7d0e654
1.2.1 - 12/01/20 - Avi cleaning up code and applying a more wholesome compare to v 1.1.1 functionality
1.2.0 - 12/01/20 - Avi cleaning up code that I preliminary deem unnecessary (pre-testing)

Thanks to Avi for the improvements and new features! Looking forward to what else he comes up with! :wink:

Oh wow. I wasn’t ready for a public introduction yet :slight_smile:

The versions posted were primarily motivated towards exposing additional device capabilities so I can create a meaningful dashboard in Sharptools using their current hero tile functionality that is constrained to a certain list of capabilities exposed by devices and not to a host of attributes.

These include ability to toggle WiFi active / inactive states, charge active.m, inactive states and the use of their temperature tile and colors rules engine for speed (e.g. green for <55, yellow for <70 and red for above that).

Primarily invented by having two teenagers at home and a bit too much time on my hands wanting to know they are safe.

I will publish a sample dashboard and the capabilities it links to later today to illustrate.

Note that this version includes some major refactoring and have not gone through major testing yet so use at your own peril.

Thanks, Avi

3 Likes

Trial by fire! Only way to live, lol.

2 Likes

With all this confidence I'm upgrading right now! lol

2 Likes

Hey what’s life without a little excitement? It’s merely an app and a driver not an irrevocable firmware that bricks devices so why not spice it up a bit and if not working revert to the 2.0.9 version. That’s what I would do :blush:

1 Like

I was actually joking and being serious... :slight_smile: I did upgrade...mostly to help out people like you and Bryan that spend their time writing the code....I mean someone has to test it right?

1 Like

getting lots of these now...not sure if by design:

Yeah. Found a couple of issues. Working them now. Will update.

1 Like

ok. I pushed some fixes back to @bptworld to examine and republish. This should be a more stable release. Now let me tell you why I got into this mini-project and spent a whole Tuesday reverse-engineering code :slight_smile:
I was looking to create an informative dashboard on Sharptools.io. However, for non-standard devices, some standard capabilities needed to be created beyond presence in order to utilize the hero tile feature that lets you display information and toggle active state based on what they recognize as normative capabilities.
So I needed to create the following capabilities:
switch - to toggle state of wifi tile
contact - to toggle state of charging tile
acceleration - to toggle state of distance tile
temperature - to allow for multiple states of speed tile - that would allow me to define custom speed ranges for each member of the family (wife = leadfoot, me = standard driver & 2 * teens who should be careful as I am watching them)

While going through this, I encountered some inconsistencies in the presence logic and some triggers for updates so I decided to go in deeper and sort things around in a manner that I understand them. I tried to leave some comments to what I changed and streamlined and certainly there may be some issues still lurking which I can take a look at once reported.

In the meantime, below are two screenshots of how my dashboard looks like as a whole and an annotated version that I hope clarifies some things.

Enjoy, Avi

3 Likes

New version on Github...

1 Like

I know it’s early in the day but curious as to how is the latest version behaving for everyone? I’ve been driving around today and it seemed to work well for me.

Note that in this version, I commented out the fixes for the unreliable home reporting that were implemented as part of the MaxGPS code by @bptworld a month or so ago in favor of consolidating multiple code logic snippets into one which I believe may have been the culprit - basically utilized existing logic in the code in a more consistent manner. If you still get inconsistencies it may be prudent to enlarge the home radius a tad in the life360 app itself to compensate for tolerance in your phone’s gps accuracy?

Also note that as of recent iOS releases, every app can be flipped between coarse and fine grain location reporting so make sure you go into your iOS settings -> life360 ~> location and switch on “precise location” setting.

I realize that I may also be mistaken and that commenting out the code may cause the reported issues to return - if that’s the case it can be reinstated.

Thanks, Avi

Well I updated this morning. My wife and I have both been home all day and it has not been jumping randomly to away mode. I'm on Android and she is on IOS. So far things seem good. Though, we haven't tested leaving yet.

Though, I mostly noticed the jumping to away issues when I was home alone for an extended period of time.

@bptworld Just a question, I have updated and now under bpt-statusTile1 is says BTRY - NO WIFI
But if you look at the current states list is shows

wifiState: ON

prev errors gone...not seeing anything else out of whack at this time...

1 Like

This was my bad... Pushed a fix to @bptworld pending release. Thanks for bringing up.

2 Likes

New version up on Github

2 Likes

Found a couple more issues that affect history tracking. Will send fix tonight. Sorry.

2 Likes

Isn't this fun! lol. You're doing great, btw. Really appreciate the new code. :grinning:

(free's me up to add more to Event Engine :eyes:)

1 Like

New version on GitHub :upside_down_face:

1 Like

I do enjoy it. a bit too much... with the advent of time I would have refactored the code from scratch purely as a learning exercise but unfortunately I have a company to run and this "hobby" is way too addictive to a point that my family is starting to disown me :wink:

2 Likes