Homey Community Forum

Devloping a new App that communicates with Life360

Thank you, but i still get an error: ReferenceError: timeout is not defined, do i need to do something else?

Maybe restart the app en try again.

Did you also install the android app and create an account?

Restarting the app did the trick! Thanks!

Hi, I am experiencing some issues. I also get the “timeout error” when I’m trying to enter my credentials in the homey app. After a few times there is no possibility to press the save button.
At that time, I go to Devices to add my phone.

Then I am requested to add my login credentials again (make me suspect that the login process in the homey app was unsuccessful). Anyway, I enter my credentials again, and it finds my account/phone. I select that and it seems to work.

But when I try to use Life360 as a trigger, like entering a place, I can only choose one place, I have setup 7 places (like daycare center, work, gym etc etc). I have tried to reboot app, reboot Homey, uninstall and install again etc etc etc. Nothing works!

I am open to new ideas!

I also just installed life360 on iPhone and in Homey. I get the “timeout” error too and can’t get passed this. More people have the same problem. I have reinstalled, restarted etc.

Hi, I am busy with the app to improve the error handling. But unfortunately I have currently not much time.

Are you able to add a device and are you certain that the username and password is okay? If the device is added and not updated please restart the app.

I can see life360 in the app list and I can’t add any devices. I attach the log file here and maybe there is something you can see there.

> passwordx{ synctime: '2', homerange: '100', invisble: 'false', username: 'User', password: 'passwordx' } 
> New settings: 
> settings 
> Update Settings: 
> 2019-09-07 11:44:14 [err] [Life360App] Unhandled Rejection at: Promise { Error: Unauthorized at request.then.catch.err (/node_modules/life360-hack/index.js:51:16) at tryCatcher (/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/node_modules/bluebird/js/release/promise.js:517:31) at Promise._settlePromise (/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/node_modules/bluebird/js/release/promise.js:695:18) at _drainQueueStep (/node_modules/bluebird/js/release/async.js:138:12) at _drainQueue (/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/node_modules/bluebird/js/release/async.js:147:5) at Immediate.Async.drainQueues (/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) } reason: Error: Unauthorized at request.then.catch.err (/node_modules/life360-hack/index.js:51:16) at tryCatcher (/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/node_modules/bluebird/js/release/promise.js:517:31) at Promise._settlePromise (/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/node_modules/bluebird/js/release/promise.js:695:18) at _drainQueueStep (/node_modules/bluebird/js/release/async.js:138:12) at _drainQueue (/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/node_modules/bluebird/js/release/async.js:147:5) at Immediate.Async.drainQueues (/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) 
> Error: Unauthorized at request.then.catch.err (/node_modules/life360-hack/index.js:51:16) at tryCatcher (/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/node_modules/bluebird/js/release/promise.js:517:31) at Promise._settlePromise (/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/node_modules/bluebird/js/release/promise.js:695:18) at _drainQueueStep (/node_modules/bluebird/js/release/async.js:138:12) at _drainQueue (/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/node_modules/bluebird/js/release/async.js:147:5) at Immediate.Async.drainQueues (/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) 
> start session 
> 2019-09-07 11:44:07 [log] [ManagerDrivers] [life360] Init driver 
> 2019-09-07 11:43:58 [log] [Life360App] app unload called 
> 2019-09-06 17:57:05 [err] [Life360App] Unhandled Rejection at: Promise { Error: Unauthorized at request.then.catch.err (/node_modules/life360-hack/index.js:51:16) at tryCatcher (/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/node_modules/bluebird/js/release/promise.js:517:31) at Promise._settlePromise (/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/node_modules/bluebird/js/release/promise.js:695:18) at _drainQueueStep (/node_modules/bluebird/js/release/async.js:138:12) at _drainQueue (/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/node_modules/bluebird/js/release/async.js:147:5) at Immediate.Async.drainQueues (/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) } reason: Error: Unauthorized at request.then.catch.err (/node_modules/life360-hack/index.js:51:16) at tryCatcher (/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/node_modules/bluebird/js/release/promise.js:517:31) at Promise._settlePromise (/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/node_modules/bluebird/js/release/promise.js:695:18) at _drainQueueStep (/node_modules/bluebird/js/release/async.js:138:12) at _drainQueue (/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/node_modules/bluebird/js/release/async.js:147:5) at Immediate.Async.drainQueues (/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) 
> Error: Unauthorized at request.then.catch.err (/node_modules/life360-hack/index.js:51:16) at tryCatcher (/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/node_modules/bluebird/js/release/promise.js:517:31) at Promise._settlePromise (/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/node_modules/bluebird/js/release/promise.js:695:18) at _drainQueueStep (/node_modules/bluebird/js/release/async.js:138:12) at _drainQueue (/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/node_modules/bluebird/js/release/async.js:147:5) at Immediate.Async.drainQueues (/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) 
> 2019-09-05 13:55:21 [log] [Life360App] app unload called 
> 2019-09-05 12:36:18 [err] [Life360App] Unhandled Rejection at: Promise { Error: Unauthorized at request.then.catch.err (/node_modules/life360-hack/index.js:51:16) at tryCatcher (/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/node_modules/bluebird/js/release/promise.js:517:31) at Promise._settlePromise (/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/node_modules/bluebird/js/release/promise.js:695:18) at _drainQueueStep (/node_modules/bluebird/js/release/async.js:138:12) at _drainQueue (/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/node_modules/bluebird/js/release/async.js:147:5) at Immediate.Async.drainQueues (/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) } reason: Error: Unauthorized at request.then.catch.err (/node_modules/life360-hack/index.js:51:16) at tryCatcher (/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/node_modules/bluebird/js/release/promise.js:517:31) at Promise._settlePromise (/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/node_modules/bluebird/js/release/promise.js:695:18) at _drainQueueStep (/node_modules/bluebird/js/release/async.js:138:12) at _drainQueue (/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/node_modules/bluebird/js/release/async.js:147:5) at Immediate.Async.drainQueues (/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) 
> Error: Unauthorized at request.then.catch.err (/node_modules/life360-hack/index.js:51:16) at tryCatcher (/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/node_modules/bluebird/js/release/promise.js:517:31) at Promise._settlePromise (/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/node_modules/bluebird/js/release/promise.js:695:18) at _drainQueueStep (/node_modules/bluebird/js/release/async.js:138:12) at _drainQueue (/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/node_modules/bluebird/js/release/async.js:147:5) at Immediate.Async.drainQueues (/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) 
> start session 
> 2019-09-05 12:36:13 [log] [ManagerDrivers] [life360] Init driver 
> 2019-09-05 12:36:06 [log] [Life360App] app unload called 
> { synctime: '3', homerange: '100', invisble: 'false', username: 'User', password: 'passwordx' } 
> New settings: 
> settings 
> Update Settings: 
> 2019-09-05 12:24:32 [err] [Life360App] Unhandled Rejection at: Promise { Error: No password specified. at Promise (/node_modules/life360-hack/index.js:23:25) at Promise._execute (/node_modules/bluebird/js/release/debuggability.js:313:9) at Promise._resolveFromExecutor (/node_modules/bluebird/js/release/promise.js:488:18) at new Promise (/node_modules/bluebird/js/release/promise.js:79:10) at Object.module.exports.authenticate (/node_modules/life360-hack/index.js:19:10) at Life360Driver.getSession (/drivers/life360/driver.js:231:34) at } reason: Error: No password specified. at Promise (/node_modules/life360-hack/index.js:23:25) at Promise._execute (/node_modules/bluebird/js/release/debuggability.js:313:9) at Promise._resolveFromExecutor (/node_modules/bluebird/js/release/promise.js:488:18) at new Promise (/node_modules/bluebird/js/release/promise.js:79:10) at Object.module.exports.authenticate (/node_modules/life360-hack/index.js:19:10) at Life360Driver.getSession (/drivers/life360/driver.js:231:34) at 
> Error: No password specified. at Promise (/node_modules/life360-hack/index.js:23:25) at Promise._execute (/node_modules/bluebird/js/release/debuggability.js:313:9) at Promise._resolveFromExecutor (/node_modules/bluebird/js/release/promise.js:488:18) at new Promise (/node_modules/bluebird/js/release/promise.js:79:10) at Object.module.exports.authenticate (/node_modules/life360-hack/index.js:19:10) at life360.circles.then (/drivers/life360/driver.js:222:55) at tryCatcher (/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/node_modules/bluebird/js/release/promise.js:517:31) at Promise._settlePromise (/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/node_modules/bluebird/js/release/promise.js:699:18) at _drainQueueStep (/node_modules/bluebird/js/release/async.js:138:12) at _drainQueue (/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/node_modules/bluebird/js/release/async.js:147:5) at Immediate.Async.drainQueues (/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:810:20) 
> start session 
> 2019-09-05 12:24:31 [log] [ManagerDrivers] [life360] Init driver 
> 2019-09-05 12:24:30 [err] [Life360App] error reading logfile: ENOENT: no such file or directory, open '/userdata/log.json' 
> 2019-09-05 12:24:30 [log] [Life360App] capturing stderr

Edit by moderator for better overview

Looks like you have the wrong username and password as it cannot be authorized.

No I’m sure. I looked it up so many times and tried both usernames and email. Also, why is the password written out in clear text?

The app is working on Homey but I just can’t login. I am used to the “Precense” function, but I need to try Life360 as Precense doesn’t work.

But how do I get i.e. like “Last person left from home” or “First person arrived home”? I need this functions to trigger my alarm and some other flows.

1 Like

Hi. Am not able to login to my Life360 account from the “Configure App window” in Homey app, I get the time out error. But when I try to add a device, it works (after entering credentials again). I get the right info on the device:

But when creating flows, I can only choose from one location, despite the fact I have several locations. I have also tried to restart and reboot

Hello. Thanks for a great app. I have a request on a flow. At the moment there are a flow that you can make when its charging, could you please make that also invertable? So I can put a flow with when not charging. Shouldnt be hard to make this is guess :slight_smile: this way i can make flows when I am in bed and not :slight_smile:

Hi, shouldn’t be hard indeed. I have not much time but I will try to squeeze it in my planning.

Thanks man ! Tell me when its done :slight_smile:

@MarcelT, do you have any idea about my issue, that only one location is picked up in Flow Editor, while there are 7 locations in Life360 app?

Please see above. This has to do that the api only display it when you press the bell in the life app.

Hi @Dennis93 , Do you need a trigger when not charging? Or just a tag when Charging is true or false?

Hey @MarcelT , hmm i dont know the difference but what I do now is FLOW: When phone is charging
Then: set this person to in bed

What i need now is when phone is not charging
Then: this person awake

Can just be like revert on that when charging trigger :slight_smile:

Hi @MarcelT, thanks for response. Not sure what you mean, but I guess you are referring to this bell here
SmartSelect_20190914-234327_Life360

What is needed of me to include this one?