Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 19 19:11

    lreyn on master

    increased limit of ecu_dist veh… (compare)

  • May 17 20:35

    lreyn on master

    modified changes (compare)

  • May 17 20:32

    lreyn on master

    updated 6.12 with addition of k… (compare)

  • May 13 17:26

    lreyn on master

    added link to counters api (compare)

  • May 13 17:11

    lreyn on master

    added latest changes to 6.12 (compare)

  • May 06 21:53
    Sentry reported an error in ngpegasus: ngRepeat:dupes: Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: error in tire.errors, Duplicate key: string:Under inflation critical, Duplicate value: Under inflation critical
  • May 06 21:49
    Sentry reported an error in ngpegasus: NotSupportedError: Failed to load because no supported source was found.
  • May 06 13:50
    Sentry reported an error in ngpegasus: $compile:ctreq: Controller 'mdSelectMenu', required by directive 'mdOption', can't be found!
  • May 06 13:38

    Sentry reported an error in ngpegasus: `Possibly unhandled rejection: <html>

    <head><title>502 Bad Gateway</title></head>

    <body>

    <center><h1>502 Bad Gateway</h1></center>

    <hr><center>nginx</center>
    </body>
    </html>
    <!-- a padding to disable MSIE and Chrome friendly error page -->
    <!-...`

  • May 06 13:30
    Sentry reported an error in ngpegasus: $compile:ctreq: Controller 'mdSelectMenu', required by directive 'mdOption', can't be found!
  • May 06 13:02
    Sentry reported an error in ngpegasus: Possibly unhandled rejection: chartid and dataStats args are required!
  • May 06 13:02
    Sentry reported an error in ngpegasus: chartid and dataStats args are required!
  • May 06 12:11
    Sentry reported an error in ngpegasus: Possibly unhandled rejection: {"error":{"status":404,"message":{"data":{"message":"Object does not Exist"},"status":404,"config":{"method":"DELETE","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"https://fl...
  • May 06 11:42
    Sentry reported an error in ngpegasus: vehicle remote mdt Failed
  • May 06 11:04
    Sentry reported an error in ngpegasus: ngRepeat:dupes: Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: model in $ctrl.models | filter:$ctrl.searchTermModels, Duplicate key: string:Concox GT06F, Duplicate value: Concox GT06F
  • May 06 09:53
    Sentry reported an error in ngpegasus: Possibly unhandled rejection: {"data":null,"status":-1,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"https://rastreo.atlasgps.mx/api/trips/keys","headers":{"Accept":"application/j...
  • May 06 09:07
    Sentry reported an error in ngpegasus: ngModel:datefmt: Expected2022-02-14T23:59:59to be a date
  • May 06 08:20
    Sentry reported an error in ngpegasus: UnknownError: Database deleted by request of the user
  • May 06 02:13
    Sentry reported an error in ngpegasus: Possibly unhandled rejection: {"data":null,"status":-1,"config":{"method":"GET","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"https://m2m-monitoreo.hs-sotec.com/api/resources/rawdata/keys?lang=es","header...
  • May 06 00:36
    Sentry reported an error in ngpegasus: Possibly unhandled rejection: {"message":"service unavailable"}
Leo Reynoso
@lreyn
hi @RolandKOSSI - the generation of specific labels depends on the configuration of the device, for example in Syrus devices you can configure geofences directly on the device (not the platform) and generate the geoin label whenever it enters a geofence. if you're looking for the last position of vehicles in a geofence then i suggest you use the vehicle georef search api api/vehicles/search/georef
which returns the vehicles found in a specific location
https://pegasus1.pegasusgateway.com/api-static/docs/#api-Search-SearchVehicles
you just need to provide the latitude, longitude, and a radius to search
RolandKOSSI
@RolandKOSSI
@lreyn, thank you for your response
RolandKOSSI
@RolandKOSSI
Hello @dctdevelop ,
Please, I would like to know : can the forwarder send informations like list of users, groups, vehicles, ...
Leo Reynoso
@lreyn
Hi @RolandKOSSI - no, the forwarder can only send device events/position related data, for organizational data you'll have to query the API
RolandKOSSI
@RolandKOSSI
Ok @lreyn, thank you
Leo Reynoso
@lreyn
Hi @/all - new release notes for upcoming changes are up
https://github.com/dctdevelop/pegasus/blob/master/releases/6.5.0.release.md
abdallahmouhamad
@abdallahmouhamad
Hello,
I have encountered a small problem with the integration of fleetIn services.
On the tracking page of the FleetIn application, to obtain the list of vehicles, is it really the /api/vehicles service?
I ask this because I see that the number of vehicles on the tracking page is different from the one on the trips page.
Leo Reynoso
@lreyn
Hi @abdallahmouhamad - the trips selector was labeling everything as "vehicles" but in fact it included assets as well. we changed it to entities on the next update.
RolandKOSSI
@RolandKOSSI
Hello @lreyn ,
Please, I would like to know how to add an app we developed into our Pegasus plateform
Leo Reynoso
@lreyn
Hi @RolandKOSSI - please email us support@digitalcomtech.com with the details of the application and the domain so we can test it and add it to the gateway
RolandKOSSI
@RolandKOSSI
@lreyn , Ok thank you
RolandKOSSI
@RolandKOSSI

Hello @lreyn,
Since Saturday 3:29 pm we no longer receive data from the Forwarder. Can you please check if everything is ok on your end?

Also, it happens that an event that is recorded in our database appears in the list of events (on the Fleet'in platform) that has not been processed correctly. What can explain that please ?

Leo Reynoso
@lreyn
Hi, just replied on the slack channel; yes there is a possibility of resending an event; so allow for duplicate ids
RolandKOSSI
@RolandKOSSI
Yes, I received your response and updated my code. Everything works so far, thank you
abdallahmouhamad
@abdallahmouhamad
Hi @lreyn ,
what if I want to get the real data of my company from the pegagus apis? Because in development I was able to connect with the login of the developer account developer@digitalcomtech.com, but every time I use our real account it does not work.
Or the api link must change in production?
Leo Reynoso
@lreyn
hi @abdallahmouhamad yes; make sure you update the API link to the one for your Pegasus site.
so if your pegasus site is https://gps.world.com/ then the API link is https://gps.world.com/api/
once you're using the api link specific for your site you can get the real data from your company
abdallahmouhamad
@abdallahmouhamad
Hi @lreyn,
ok I got it, thanks.
abdallahmouhamad
@abdallahmouhamad
Hello,
I wanted to reproduce on my application the Tracking interface
Currently I display all the vehicles and I can draw the shapes on the map.
But I have a problem with the dash on the tracking, when I look on the web part the way you manage it is that you click twice on a car and it displays mini dash but that varies according to the element clicked.
I would like to know what services are used to display these mini-dashes?
abdallahmouhamad
@abdallahmouhamad
To be more precise, on the dash I sometimes see a card that contains information Alerts, a card a large letter P probably Parking because next to it is written parked since 18 hours
At the bottom there are also other mini-dashes such as features, Sensors, Metrics...
I would like to know in sum the api that give this information for each dash
Leo Reynoso
@lreyn

Hi @abdallahmouhamad - what we do is subscribe to the vehicle-events payload using websockets
alternatively you can make the following requests to obtain the information you're looking for:

Alerts: /api/alerts

  • includes unattended alerts for a vehicle

Pindrop: /api/vehicles/VID/pindrop

  • includes information on the safe zone created

Devices: /api/devices?imeis=IMEI1,IMEI2,etc...

  • key: trip - includes trip status information (moving/parked, since when)
  • key: latest -> loc - includes last event location information (for the name of the event see labels)
  • key: lastrx - includes information on the last communication received by the device on the server
  • key: asset - includes information on the driver assigned to the vehicle
  • key: ios_state - includes information on the current state of the inputs/outputs
  • key: set_out_state - includes information on any pending instruction to activate an output
  • key: safeimmo_state - includes information on a pending instruction to activate the safe immobilization (output1, depends on device's config, see here for more info)

you can turn the above devices request into a single one like this:

https://cloud.pegasusgateway.com/api/devices?imeis=IMEI1,IMEI2,etc...&select=trip,latest.loc,lastrx,asset,ios_state,set_out_state,safeimmo_state

abdallahmouhamad
@abdallahmouhamad
Hi @lreyn ,
Thank you very much I will follow this.
Mouhamed NDOYE
@ndoyeahmed
Hello,
I would like to know where I can get the information regarding the battery percentage of the device from whether it is connected while charging or not?
Leo Reynoso
@lreyn

Hi, in the api/resources/rawdata/keys api you find the following keys related to the battery status

  • io_pwr - Boolean, true if power is detected
  • bl - Battery level in milliVolts

Note that the battery level is expressed in mV, and the % calculation depends on the device that's connected and it's capacity.
You could use a generic formula like this:

parseInt( 100 * ( mV - MIN_VALUE ) / ( MAX_VALUE - MIN_VALUE ))

assuming you know the MAX and MIN values that a device reports its internal battery as

Mouhamed NDOYE
@ndoyeahmed
Hi @lreyn ,
Thank you for your reply.
Mouhamed NDOYE
@ndoyeahmed
Hello
when I make a request for a device or a trip on dates, I always get the date Jan 19/70
what could be the cause please?
I want to get the date of the last connection change for the device
Leo Reynoso
@lreyn
Hi @ndoyeahmed - this sounds like you're using something like js Date() funcion but passing the epoch in seconds instead of milliseconds
example:
new Date(1633535329)
Mon Jan 19 1970 16:45:35 GMT-0500 (EST)

new Date(1633535329*1000)
Wed Oct 06 2021 11:48:49 GMT-0400 (EDT)
Mouhamed NDOYE
@ndoyeahmed
Hi @lreyn ,
Thanks for your reply
I'll do that
Mouhamed NDOYE
@ndoyeahmed
Hi,
To come back to the question of the battery percentage, how can we get the min and the max please?
4 replies
Mouhamed NDOYE
@ndoyeahmed
Hi,
To have the route of the vehicle on the map and trace the route with the checkpoints how we can do.
Thank you.
Leo Reynoso
@lreyn
Hi Mouhamed, regarding the route what you can do is once you have a trip take its from/to using rawdata to get all the events generated during the trip. Using the rawdata api you could filter by label = checkin if you generated check-ins using Taurus. then just pass those lat lon pairs to the routes api
11 replies
Mouhamed NDOYE
@ndoyeahmed
Hi @lreyn
I will follow this and get back to you soon. Thank you
Mouhamed NDOYE
@ndoyeahmed
Hello @lreyn
For the indicators on the list of entities, on the ios & accessories part how I can retrieve the percentage of fuel and the state on the photo and the engine data
DCT
@dctdevelop

Hi @ndoyeahmed - the recommendation here would be to use the live communications to obtain the last "device-package" with the latest device data reported. The device package contains the last event reported, and the latest values for all keys. Using this info you can do the following to get the indicators:

Fuel
The fuel indicator requires parameters to be configured on the vehicle properties that tell the device which sensor it has connected, see the following forum on how to configure them.
Once configured you can see the source of the fuel data on a key called source, for example:

  "$sensor_ecu": [
      {
        "name": "Fuel level 1",
        "tank_volume": 200,
        "decimals": 1,
        "units_abbrev": "l",
        "source": "ecu_fuel_level_real",    # rawdata field source of the fuel data
        "sensor_type": "fuel",
        "units": "liters",
        "type": "float",
        "device": "teltonika",
        "priority": false
      }
    ]

Photo
For the photos you'll want to look for the field dphoto_ptr this tells you that there's a photo captured. From there you can use the camera methods to get the latest photo with timestamps and everything.

        "dphoto_ptr": {
          "evid": 940918308080505,
          "value": 29541,              # any value on dphoto_ptr indicates a photo was captured
          "evtime": 1639051414,
          "systime": 1639051415.5058,
          "trip_id": 940918307235101,
          "change": {
            "evtime": 1639050909,
            "systime": 1639050910.280464,
            "prev_value": 29540
          }
        }

Engine Data
For the engine data you can look for any of the ECU ecu_ fields on the rawdata.

Mouhamed NDOYE
@ndoyeahmed
Hello
thank you for the answer
abdallahmouhamad
@abdallahmouhamad
Screenshot_20211218-213051_SyrusMobile.jpeg

Hello @lreyn

We integrated the list of vehicles on the Tracking part with their stats as you can see on the capture. But the information that we have circled in red must be in real time, it is the communication of the vehicle and it is in minutes sometimes in seconds.
We would like to know how to establish communication in real time to have this information?
What type of connection and what are the parameters?

DCT
@dctdevelop
Hi @abdallahmouhamad - that section uses websockets to communicate in real-time
you can find more information here about the implementation
https://docs.pegasusgateway.com/#live-communications
abdallahmouhamad
@abdallahmouhamad
Hi @dctdevelop ,
Ok well received we will consult the link. Thank you
Mouhamed NDOYE
@ndoyeahmed
Hello,
I am trying to use live communication but when I try to authenticate with credentials there is no reaction and in the object I still see disconect true.
Can you help me with the live communication?
Mouhamed NDOYE
@ndoyeahmed
It's ok now I had the wrong socket.io version
DCT
@dctdevelop
:thumbsup: glad you were able to resolve it