ETA Tracking - QA

Hi - We use Samsara to track our entire fleet. We are excited to use Samsara and admire the functionality. We have services built to capture and return ETA for our routes and stops. Any changes to these services we have to put a driver on truck and move around the city to test if the services are working or not. Its extremely inconvenient and certainly not a cost effective solution.. Ask: Is there any way we can test the ROUTE and its ETA by simulation without putting a driver on the truck ? Any help will be highly appreciated.. Thanks, Venky

PTO On/Off through the J1939 on newer International Trucks

On our newer trucks, the PTO on/off is communicated through the computer and can be picked up from the J1939 port using scanner software. Can this also be picked up via the API with the VG54? It would be best if it was a webhook.

staticAssignedDriver - When does this get updated?

I am writing a python script which runs 7pm each day. The script calls <https://api.samsara.com/fleet/vehicles> and returns the vehicle name and the staticAssignedDriver WHERE staticAssignedDriver is blank / null. The purpose of this is to detect which drivers may have potentially forgot to remove their tacho card out the lorry at the end of their shift. The data being returned sometimes is not true. I.E a vehicle is showing a staticAssignedDriver, i'll go into the lorry and there is no card in the tacho machine. When does staticAssignedDriver get updated? Thanks ``` import requests import json url = "https://api.samsara.com/fleet/vehicles" headers = { "Authorization": "Bearer samsara_api_REDACTED" } mailgun_api_key = "REDACTED" mailgun_url = f"https://api.eu.mailgun.net/v3/REDACTED/messages" response = requests.get(url, headers=headers) if response.status_code == 200: data = response.json().get('data', []) filtered_data = [ { "name": entry['name'], "driver_name": entry['staticAssignedDriver'].get('name', '') } for entry in data if 'staticAssignedDriver' in entry and entry['staticAssignedDriver'].get('name', '') != '' ] email_body = "\n".join([f"Vehicle: {entry['name']} | Driver: {entry['driver_name']}" for entry in filtered_data]) mailgun_params = { "from": "[email protected]", "to": "[email protected]", "subject": "Potentially have cards left in", "text": f"The following vehicles may have cards in\n\n{email_body}" } mailgun_response = requests.post( mailgun_url, auth=("api", mailgun_api_key), data=mailgun_params ) if mailgun_response.status_code == 200: print("Email sent successfully.") else: print(f"Error sending email: {mailgun_response.status_code}, {mailgun_response.text}") else: print(f"Error: {response.status_code}, {response.text}") ```

Managing HOS in the 160 km radius

I'm looking for feedback from Canadian drivers and operators who are managing HOS within and outside the 160 km radius. We have a seasonal fleet that mostly operates in very small radius and off provincial roads. Lots of short stop and go. Managing a detailed HOS log is a nightmare in this scenario. Yard Move would make more sense. The context of this is forestry work in remote reforestation blocks. Any suggestions? Can we do a DVIR and then skip the vehicle sign in and HOS as long as we don't exceed the daily limits for driving time and on-duty time?

Dashcam Video or Images not found

I am trying to use the API to retrieve historical video or images. I am using the following URL: <https://api.samsara.com/fleet/vehicles/cameras/media/history> However, I get an error message: 404 page not found Why is this link broken? What is the correct link?

How to update route statuses without accessing the driver app, being admin or changing geofence?

Hello, currently, our team testing Get route updates functionality. We are looking for the ways how to automate trip details edit. Is there any api's that allow to change route statuses for example from scheduled to completed?

Time on Site Report Does not Tie to Endpoints

We use the "Time of Site Report" that is available in the Reports section. I can seem to find the API endpoints that will tie the assets and time on site to this report. I have I thought it would be the Trip History endpoints, but the time is off. Any ideas on what endpoint to use to gather the Time of Site information?

exporting to Oracle DB

Hello, <https://developers.samsara.com/docs/data-replication> does not mention Oracle DB. We have Oracle ERP and interested in putting Samsara data into a staging DB so we can call this data in the staging DB as needed. Does Samsara support exporting to Oracle relational DB, e.g. Autonomous? We are not interested in SQL or Snowflake.

api's doesnt work with asp.net mvc 4.8

I'm currently using RestSharp in a C# web application with ASP.NET MVC 4.8. I've encountered an issue with the GET request – it doesn't seem to work as expected. Additionally, I'd like guidance on handling POST and PATCH requests. Only thing i get from the response is ErrorMessage = "An error occurred while sending the request." Interestingly, when I use the exact same code in either a console application or a Windows app, everything works seamlessly for both GET and PATCH operations. Could you please provide insights on how to address this issue and ensure smooth functionality in my web application?

Samsara Webhook Signature Not Verified

Hi - For some reason, I am unable to retrieve the expected signature when using webhooks. Here is the code input: ``` function(input) { const webhookSecret = input.secret; const secret = Buffer.from(webhookSecret, 'base64'); let message = `v1:${input.timestamp}:${JSON.stringify(input.body)}`; let hmac = crypto.createHmac('sha256', secret).update(message); let expectedSignature = hmac.digest('hex'); let expectedHeader = 'v1=' + expectedSignature; return { signature: expectedSignature, header: expectedHeader }; } ```