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

No Notification: enter exit geo-fence #150

Closed
johnnyrlq opened this issue Apr 20, 2015 · 10 comments
Closed

No Notification: enter exit geo-fence #150

johnnyrlq opened this issue Apr 20, 2015 · 10 comments

Comments

@johnnyrlq
Copy link

I configured the SMTP server and the "Went Offline" notification works perfectly, but the "Enter geo-fence" and "Exit geo-fence" don´t work. The device is linked with the geo-fence.
I see nothing wrong with logs.
Must I to do something else in configuration files?

@vitalidze
Copy link
Owner

For these notifications to work first of all event must be recorded. For this following conditions should be met:

  1. Geo-fence should be either global or specific to that particular device.
  2. Positions for the device must have their identifiers generated sequentially. Scanner loads all received positions every minute based on the assumption that identifiers of new positions will grow sequentially.
  3. There must be two sequential positions - one inside a geo-fence, another outside of it. In such case either 'enter' or 'exit' event is recorded depending on order of such positions.

Then, if you have your event recorded (can check this out in events table) to receive notifications a use must:

  1. Have access to the device. Either direct or indirect ('manager' or 'administrator' user).
  2. Have email address filled and desired type of notifications selected in user account profile
  3. Have configured and working settings for the notifications.

Per your description looks like the event is not recorded. I think you should check events table contents.

@vitalidze
Copy link
Owner

Any update on this issue?

@johnnyrlq
Copy link
Author

Dear Vitaly,

Thanks for the info, I have just verified every condition and setup your recommended to me and finally I could received notifications for Enter/Exit Geo-fence BUT it is just working with only "Admin". (Not working with users)

Tried to to the same with another type os users (manager, user, and read-only) without sucess. I also verified that each user have notifications enabled.


Here are detailed conditions followed:

  1. I setup a Geo-fence area with "apply to all devices" option checked.
  2. One Device is active and is sending position data to server.
  3. With registered device, I went inside geo-fence. Stayed there for 10 minutes or more and then go outside. Everything was registered in server and also I verified event recording in database. Everything is fine there.

Prior configuration reviewed:

  1. Not sure what you mean with "access to the device". I am considering that the device is being in touch with server and is communicating with proper paquets and protocol. As "administrator" user, device is under my panel.
  2. Enter/Exit Geo-fence notification are enabled.
  3. Mailing engine is working (Offline notifications works fine)

@vitalidze
Copy link
Owner

I have heard about similar issue from another user yesterday (administrator received notifications, but user not). A guy just created another user with same email and it worked. Will try to check this out myself and update this issue.

By "Access to the device" I meant that user must have this access. Such access can be achieved depending on user account type:

  • administrator - has access to all devices
  • manager - has access to all devices added by him or shared with him. Also he has access to devices of all users under his hierarchy
  • user - has access to all devices added by him or shared with him

@elRadix
Copy link

elRadix commented Apr 26, 2015

@johnnyrlq did you share your geo-fence with other users in your config, without sharing they will not receive notifications

@johnnyrlq
Copy link
Author

First of all thank you for your help.

The device, DEVICE_D1, was added by a manager (called MANAGERX), the same manager created and shared the device with a user called "USERX" (user created by MANAGERX). The user USERX created the geo-fence GF1 (the device DEVICE_D1 is linked to GF1), and has activated all notification, and the only notification the USERX recive is about DEVICE OFFLINE.
The SMTP and PUSHBULLET configuration was configured by the user ADMINX (administrator user)

For testes porpuse:

  • I enabled notification for MANAGERX and ADMINX users and the only one user that receive notification is the admin user ADMINX
  • MANAGERX created a geo-fence GF2 and shared with USERX, and USERX linked DEVICE_D1 with GF2, and same results obtained.

Thanks for your help.

vitalidze added a commit that referenced this issue Apr 27, 2015
…s so they will work properly with hibernate proxies, changed collections in 'User' entity from Lists (bag was actually used) to Set
vitalidze added a commit that referenced this issue Apr 27, 2015
@vitalidze
Copy link
Owner

I have found and fixed an issue. Now it should work fine, so if user has access to both device and geo-fence (i.e. when he is logged in he sees both device and geo-fence objects), wants to receive notifications and has email set then he will receive notification.

Written news, updated latest and demo versions.

@johnnyrlq
Copy link
Author

@vitalidze I will test the latest version, thank you very much

@vitalidze
Copy link
Owner

@johnnyrlq does it work for you now? Another guy reported that everything works perfectly now.

@johnnyrlq
Copy link
Author

@vitalidze it works perfectly.

Great job. Thanks you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants