Life360 Live Map

I have been using your Live360 Map tile on Fully Kiosk everyday. Today, it seems itā€™s broken for all Android and Chrome platforms it can no longer show where anyone is. The only thing we see is just a map of the entire U.S. I tried on all Samsung tablets and Amazon Fire HD, and all showing just the US map. MacOS Safari doesnā€™t work either. It !looks like OpenStreet Map changed something today or last night.

However, all Apple iOS Safari do NOT have this problem. How can we fix the problem on Android or Fully Kiosk?

Any help is greatly appreciated.

Does it center around this point? Iā€™ve found that occasionally the Life360 API gets a bit wonky. Sometimes when the issue happens, I can go through the original authorization link from the first post and the various test commands there donā€™t work either.

If youā€™re on a computer, you could even try opening the Console in the browserā€™s developer tools and sometimes youā€™ll see the related error message (eg. Cross Origin issues).

I just tried installing this custom tile but I am unable to authorize.

I believe this is because Life360 updated and broke their API authorization over the last 30 days.

FYI - Life 360 login help - #61 by lpakula - Devices - Hubitat

The experience on Hubitat is that you are already authorized it might continue to work. But new authorizations are failing.

There is a post that refers to a fix that was used in one of the Hubitat plugins - Life 360 login help - #14 by tonesto7 - Devices - Hubitat

Not sure if something similar can be done here? Thanks.

Yes, I suspect it could. I just worked with @James to get the code transferred into our main SharpTools organization on GitHub and will try the tweaks out and let you know. :smiley:

It looks like the only tweak that was needed was on the authorization side, so the Glitch app has been updated accordingly: :slight_smile:

https://smart-life-360.glitch.me/

@josh

Life360 and hubitat has gone down, probably for good.

gomce62.web has created this:

Which allows me to have this:

I have posted over in hubitat to see how this iframe can be added to sharptools, and am awaiting a reply. Could you possibly assist? His device works ace, I just need to have this in sharptools instead of hubitatā€™s default ui.

/ hopes

What are you trying to show the location of?

Did I understand that it just takes location/latitude attributes from a target device and maps them?

1 Like

Hiya. Thanks for the reply.

I can read the lat/long from virtually anywhere. The device created by gomce happens hhas some clever code which then takes this lat/long, creates an frame with the ability to set the zoom level on a Google map.

If I were using the default hubitat UI, I could have this device on it showing the map section in my image above. When you click the map, it open fullscreen in Google maps itself. You can update the frame location/image at any time via webcore or whatever.

If I could simply add this to sharptools, then job done.

I canā€™t. It only shows a bit of html code or whatever.

The reason it to have a map showing family location.

I think the Life360 map custom tile was potentially OK, but instead of taking lat and long, it asks for access tokens etc. Not relevant now, unfortunately

While the original Hubitat Map Custom Tile was designed around a Life360 driver, it should work with any driver which reports a latitude and longitude attribute.

You can use the Hubitat HTML Attribute Custom Tile to display attributes that stuff HTML into an attribute. The linked thread explains the what and why. :slight_smile:

1 Like

Thanks for adding info to the hubitat thread. Hopefully someone will come up with a fix :+1:

Iā€™m absolutely useless with this kind of thing, I just end up flopping around in the dark.

I did take a crack at this:

image

That was using:

However, if my hubitat deviceā€™s lat/long changes, I canā€™t see this reflected in the sharptools tile unless I do a screen refresh.

Additionally, the zoom is a problem and the tile isnā€™t clickable.

-=edit=-

I think I can get away with this if thereā€™s an easy way to

  1. call for a refresh via external means) and also,
  2. if the same can be done for altering the zoom, plus
  3. if the tile can be clickable, to allow the usual choice of options

It refreshes every 5 minutes. Itā€™s the very last line with the setTimeout() call if you want to adjust it, but I would caution you not to adjust it too low since itā€™s effectively polling the Maker API. (5 minutes * 60 seconds * 1000 millis = 300,000)

The default zoom level and how you could tweak things is discussed here: Hubitat Map Tile (Life360 or Latitude/Longitude) - #29 by josh

In theory, the custom tile code could be adjusted to have some sort of overlay on it that you could click. Iā€™m heads down on some larger projects at the moment, so I donā€™t have the spare cycles available but itā€™s all open source if someone wants to take a crack at it.


Edit: I figured I should probably also clarify the two approaches again too.

  1. Hubitat Map Tile - this is a custom tile that directly renders a map in a tile and grabs the latitude/longitude values from a device and maps them

    • It does not use the iframe attribute from the gomce62.web thread you mentioned, just the lat/long
  2. HTML Attribute Custom Tile - this takes an attribute from a device which was stuffed with HTML (an unofficial ā€˜hackā€™ that some community drivers use) and renders that attribute in a sandbox

    • This can use the iframe attribute from the gomce62.web thread you mentioned, so any zoom levels or hyperlink features would be retained, but it hasnā€™t specifically been tested with that driver.

It refreshes every 5 minutes. Itā€™s the very last line with the setTimeout() call if you want to adjust it, but I would caution you not to adjust it too low since itā€™s effectively polling the Maker API. (5 minutes * 60 seconds * 1000 millis = 300,000)

can this be updated at will via say, a webcore command?

The rest, remains, out of my skillset.

Cheers josh

Not as itā€™s currently designed. The Custom Tile is a bit of code that runs directly within your browser. So in this case, that 5 minute timer is running directly in your browser and you canā€™t really ā€˜sendā€™ an update to it.

Thereā€™s a feature request to make Custom Tiles have direct access to Things which would make it so the latitude / longitude attribute updates would be realtime rather than relying on polling the Maker API within the Custom Tile. Personally, itā€™s a feature I would love to implement, but it hasnā€™t quite picked up enough votes from the community yet.

Changing the zoom level might seem a bit more intimidating than it actually is. Iā€™m pretty confident you should be able to tweak the polling interval and zoom level. Feel free to post in the other thread for the Hubitat Map Tile if you need help with that.

Have you tried the HTML Attribute Custom Tile approach? That would use the existing zoom and clicking features of the driver, but also relies on the polling. :point_down:

Hello - Quick question - - - Am I on the only one whoā€™s having issues with this Life360 integration? I intermittently see the ā€œfailed to get circleā€ error multiple times per day. See the screenshot below. Iā€™ve visited the Life360 link on the 1st post of this thread to try to reauthorize a token but it the authorize button doesnā€™t allow do anything when clicked (also shown below)

No youā€™re not. That integration was not an official. Life360 made changes to the API that is preventing us from using it. I am currently building a custom tile that will mimic this, however it will require the use of an Android app called Tasker to transmit the location data.

2 Likes

Thanks just_jake. That would be hugely helpful. Iā€™m aware of Tasker but havenā€™t used it directly in the past. This change by Life360 is frustrating. They abandoned their Alexa skill last year too. There was a key thing that was awesome with that skill. I was able to create a routine where I could ask Alexa where either of my kids were and Alexa via the Life360 skill would tell me their location. I miss that :-).

They killed the integration for Google as well. I miss asking where is my family.

I use Geofency on iPhone - works very well. FYI - the Life360 connection still seems to run on my Hubitat despite all of the other things working. There is a long thread on this and I canā€™t figure out why it still works - even after I switched to a new hub, etc.

1 Like

UGH - it doesnā€™t seam that Geofency is supported officially or unofficially for Smarthings. THX!