jornadadgps22 пишет:Good afternoon, i have a project that involves knowing when a unit goes through a GeoFence and then store the IMEI of said unit in a database.
Now, the IMEI and said details of a unit is something i know how to get but the thing is, how exactly can i let's say, create the method that when the unit goes through the Geofence, Right now thats what been bugging my mind What can i do to know when a Unit goes through a especific GeoFence?
Any help is really appreciated.
Hello, as was indicated in the previous post - you can try to use notifications with the 'Send a request' action. Specify the server name and indicate parameters in the notification text. Unfortunately, the tag for units IMEI (Unique ID) is not available, but you can try to use tags %UNIT% or %UNIT_ID% - the name and internal ID of the unit respectively.
Thus you can proceed this information on the side of your server to get more details.
Or you can add IMEI as a custom field and use %CUSTOM_FIELD(*)% tag as a parameter in the notification text.
Example: param1=%CUSTOM_FIELD(*IMEI*)%¶m2=%UNIT_ID%
jornadadgps22 пишет:Also, how do i get the resource ID for the Geofence, i tried the search items by property with no luck.
You can use search_items request, with "avl_resource" as the value for "itemsType" parameter and "flags" value 4097 (basic flag + geofences).
Thus you will get all resources available for the user and geofences created in these resources.
Here you can find request example -- https://sdk.wialon.com/wiki/en/sidebar/ … y_property (2nd example).
If you face any issues with this request execution, please, write us to support@gurtam.com with full request text and token.
Thank you!
Anton Zinovyev
Technical Care Engineer (L2)
Wialon