hepcat72 / node-red-contrib-life360

GNU General Public License v3.0
3 stars 4 forks source link

Poll frequency question #4

Open jpoeppelman1 opened 3 years ago

jpoeppelman1 commented 3 years ago

Just a few questions.. Does this node poll for location status or is the application event driven meaning websockets? If poll, what is the poll frequency?

hepcat72 commented 3 years ago

It polls at an interval of 15 seconds:

https://github.com/hepcat72/node-red-contrib-life360/blob/3a8654143b39f047224905d74637151de4f3cb53/nodes/server.js#L42-L47

jpoeppelman1 commented 2 years ago

It polls at an interval of 15 seconds:

https://github.com/hepcat72/node-red-contrib-life360/blob/3a8654143b39f047224905d74637151de4f3cb53/nodes/server.js#L42-L47

Anyway we can make this configurable through Node Red configuration node?

hepcat72 commented 2 years ago

I agree having that as a configurable option would be nice. I don't however have the time to do it, TBH. (You wouldn't believe how swamped I am on multiple fronts.) However, I will take a look at any new feature PR if you would like to take a stab at it.

jpoeppelman1 commented 2 years ago

Hello! Just wondering if you now have the time to make this a configurable option within the config node? :)

hepcat72 commented 2 years ago

I don't even have time to set up my new pi 4 which has been sitting for about a year unopened. And I've been taking 2 vacation days a week for over a month to try and wrap up a DIY bathroom remodel. The wife keeps bugging me about that.

I'd look at a PR if you submit one though.

hepcat72 commented 2 years ago

Lol. Thanks for the offer. Though I don't think there's an amount of money corresponding to what this feature is worth that would tempt me to divert attention from my other projects. Though if you come help me with my bathroom remodel, that may be worth it for me. ;)

What's your native programming language? I dove into Node.js when I started this project. My native language is perl. Though I've been doing more and more JavaScript since I did the Life360 node.

brianmay commented 2 years ago

Is disappointing that we have to resort to polling and there isn't some sort off streaming API. But I guess that is all that life360 provides. Or maybe all that has been reversed engineered so far.

jpoeppelman1 commented 2 years ago

Hi. On a similar note, what is the bearer token expiration against the Life360 API? Just curious how often this needs to refreshed or if it ever expires?

hepcat72 commented 2 years ago

Oh yeah! I remember encountering something like that but I didn't save it. Probably should have set it up in my reminders.

jpoeppelman1 commented 2 years ago

Does the bearer token ever expire?