Jump to content

TachoSync Integrations: Difference between revisions

upload frequency, retry logic, maximum retry duration, naming conventions for uploaded files, was added
Added "File Upload Behavior", expanded "File naming & server folder structure", moved "Prerequisites" to a separate heading
Line 35: Line 35:
'''''NOTE!''' TachoSync does not create or configure the SFTP server. The customer is responsible for ensuring that the server is reachable from the internet and properly secured.''  
'''''NOTE!''' TachoSync does not create or configure the SFTP server. The customer is responsible for ensuring that the server is reachable from the internet and properly secured.''  


Prerequisites (prepare this before configuring the SFTP integration):
===Prerequisites===
Prepare this before configuring the SFTP integration:
* Set up your SFTP server and know:
* Set up your SFTP server and know:
** SFTP server host (domain or IP address)  
** SFTP server host (domain or IP address)  
Line 67: Line 68:
* '''Include historical files''': When enabled, TachoSync will attempt to upload files captured before the integration was created.  
* '''Include historical files''': When enabled, TachoSync will attempt to upload files captured before the integration was created.  


===Example SFTP Server Folder Structure===
===File Naming & Server Folder Structure===
File naming and folder structure is configured in [[TachoSync Integrations#General Settings|General Settings]].
 
The file name that appears in your SFTP server is identical to the file name in TachoSync. Only the file extension may change (depends on the selected file format ).
 
Below is an example of how files may be organized on your SFTP server:  
Below is an example of how files may be organized on your SFTP server:  
* /root-folder/  
* /root-folder/  
Line 77: Line 82:
*** /1234567890/ ''← driver folder (set the naming convention in „General Settings“)''
*** /1234567890/ ''← driver folder (set the naming convention in „General Settings“)''
**** 2025-01-12_.DDD
**** 2025-01-12_.DDD
<!---
===SFTP File Upload Behavior===
Describe upload behavior here.
--->
===SFTP Integration Troubleshooting===
If the SFTP integration does not work as expected, verify the following:
* The server is reachable from the Internet.
* Firewall rules allow inbound SFTP connections from TachoSync.
* The user has write permissions for the configured directory.
* The provided path exists on the server.
If issues persist, collect the “Last Event” details from the Integrations page and contact Support.
=== Upload Frequency ===
TachoSync sends files to your SFTP server '''as soon as they become available'''.
* When a new tachograph file is downloaded from the vehicle or driver card, it is immediately added to the SFTP sync queue.
* Sync happens '''continuously''', not on a fixed schedule.


===File Upload Behavior===
TachoSync uploads files to your SFTP server as soon as they become available in TachoSync (after being downloaded from device):
* Files are sent to the SFTP server automatically and continuously, there is no fixed schedule.
* If you enable “Include historical files,” TachoSync also adds your previously downloaded files to the queue and syncs them in batches based on current system load.
* If you enable “Include historical files,” TachoSync also adds your previously downloaded files to the queue and syncs them in batches based on current system load.


'''What this means for you:'''
If file upload fails, TachoSync attempts to re-upload them. To troubleshoot, see [[TachoSync Integrations#SFTP Integration Troubleshooting|SFTP Integration Troubleshooting]].


There is no need to manually trigger a daily or hourly sync. Files are pushed automatically as soon as they are downloaded or discovered.
The retry pattern is "exponential backoff": upload is retried after 3 seconds, 9 seconds, 27 seconds, 1 min 21 s, ~4 minutes.
----


=== Retry Logic ===
If all 5 retry attempts fail, the file is marked as "Failed". A manual "Retry failed files" functionality is in development.
If TachoSync cannot deliver a file to your SFTP server, it will attempt to retry depending on the type of error.


==== We do NOT retry when the issue is permanent: ====
===SFTP Integration Troubleshooting===
 
If the SFTP integration does not work as expected, verify the following:
* Incorrect username or password
* The [[TachoSync Integrations#Prerequisites|prerequisites]] are met.
 
* Your internet connection is stable (there are no repeating time-outs or interruptions).
* Insufficient permissions on the SFTP destination (cannot create directories or upload files)
* The user has write permissions for the configured directory.
 
* The provided path exists on the server.
* Invalid upload path
If issues persist, collect the “Last event” details from the Integrations page and contact Support.
 
These issues require you to fix the configuration and then retry manually (using the “Retry failed files” feature (''soon to be added'').
 
==== We DO retry when the issue may be temporary: ====
Examples of temporary problems:
 
* The SFTP server is unreachable
 
* Connection timeouts
 
* Network interruptions
 
==== Retry pattern ====
TachoSync uses an '''exponential backoff''' strategy for temporary errors, with up to '''5 retry attempts''':
 
# After 3 seconds
 
# After 9 seconds
 
# After 27 seconds
 
# After 1 minute 21 seconds
 
# Final attempt (~4 minutes after the initial failure)
 
If all retry attempts fail, the file is marked as '''failed''', and no further automatic attempts are made.
----
 
=== Maximum Retry Duration ===
The entire retry cycle lasts approximately '''4–5 minutes''' from the first failed attempt.
 
After that:
 
* The file is '''not retried automatically'''
 
* It will remain marked as '''failed''' until you fix the underlying issue and manually trigger the sync again
 
This prevents infinite retry loops and reduces unnecessary load on both systems.
----
 
=== Naming Conventions for Uploaded Files ===
TachoSync '''does not rename''' your files.
 
The filename that appears in your SFTP server is '''exactly the same''' as the file stored in TachoSync.
 
The only exception is the '''file extension''', which depends on the format you selected when configuring the integration:
 
* <code>.DDD</code>
 
* <code>.TGD</code>
 
* <code>.V1B</code> or <code>.C1B</code>
 
Folder structure is based on your integration settings (company hierarchy, vehicle folder naming, driver folder naming).
 
'''Example path:'''


<code>/North Division/North Logistics/356710123456789/2024-09-10_123456.DDD</code>
[[Category:TachoSync]]
[[Category:TachoSync]]