Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added trigger filtering capabilities to the location node for specific events #4

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

hepcat72
Copy link

@hepcat72 hepcat72 commented Nov 8, 2020

This PR includes the bug fixes from my previous PR.

  • This makes multiple location nodes possible (by saving callbacks as a hash)
  • Output is the same (member json)
  • Location node status is changed (to be more verbose)
  • Can filter events based on circle, person, place, and event type (leave/arrive)

The original behavior is maintained (select any circle, any person, any place, and any event - which are the defaults - to get the same behavior, aside from the bug fixes in the previous PR), and the node output is still the member json structure, so these changes are backward compatible with previous versions.

I will push out a major version bump commit shortly (which I just realized I hadn't done).

Since I haven't gotten a response about my first PR, I will start looking into releasing my fork as an independent node. If you merge this PR or indicate a willingness to take a look at these changes, I'll abandon the effort to publish my fork as a separate package.

Thanks so much for your code and releasing it under GPL 3.0.

hepcat72 and others added 19 commits October 15, 2020 17:48
I believe that the entire member list was being sent in 2 cases: 1. when any member's location name had changed or when no members' location had changed... Although I think there's more to it and I suspect it has to do with different circles and places and there being only 1 "updated_locations" array...
The same location can have a life360 place with a different name in a different circle. E.g. circles made by different users that invite one another. The way it was written, overlapping places cause spurious location events.
Files checked in: nodes/*
… that is planned.

Files checked in: index.js nodes/location.* nodes/server.js
I have only tested the any circle, any event case.
Also, this currently does not support multiple location nodes.

Files checked in: nodes/location.js nodes/server.js
Changed the changed value callback to an array to support multiple location nodes.
Fixed a problem with the calculation of a location's previous occupancy.
Added some debug statements.

Files checked in: nodes/location.js nodes/server.js
Files checked in: nodes/location.html nodes/location.js nodes/server.js
Files checked in: index.js nodes/location.html nodes/location.js nodes/server.js
…ing last to leave.

Files checked in: nodes/server.js
…eave events on startup.

Files checked in: nodes/location.html nodes/location.js nodes/server.js
Files checked in: package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant