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

[Wiki: transitime installation guide] How is the integration done with the Traccar platform? #3

Open
engalissongomes opened this issue Dec 19, 2021 · 2 comments
Assignees

Comments

@engalissongomes
Copy link

No description provided.

@BodoMinea BodoMinea changed the title How is the integration done with the Traccar platform? [Wiki: transitime installation guide] How is the integration done with the Traccar platform? Dec 19, 2021
@BodoMinea
Copy link
Member

The Wiki guide is based on the assumption that the GPS positions are coming from a GTFS-Realtime feed.

In order to get GPS data from Traccar, assuming that you already have it installed and running somewhere, you need to change the agency config "AGENCY.xml" during the Configuring the transitime cores step as follows:

<?xml version="1.0" encoding="UTF-8"?>
<transitclock>
    <modules>
        <optionalModulesList>org.transitclock.core.schedBasedPreds.SchedBasedPredsModule;org.transitclock.custom.traccar.TraccarAVLModule</optionalModulesList>
    </modules>
    <autoBlockAssigner><autoAssignerEnabled>true</autoAssignerEnabled></autoBlockAssigner>
    <core>
        <agencyId>GTFS AGENCY ID</agencyId>
    </core>
    <avl>
        <!-- URL for traccar realtime vechicle tracker stream -->
        <traccar>
                <baseurl>http://localhost:8082 - or whatever your traccar instance address is</baseurl>
                <email>access_email_for_traccar</email>
                <password>access_password_for_traccar</password>
        </traccar>
        <minLatitude>COMPLETE FOR YOUR AREA - these fit all of Romania! 43.82247</minLatitude>
        <minLongitude>COMPLETE FOR YOUR AREA - these fit all of Romania! 20.40503</minLongitude>
        <maxLatitude>COMPLETE FOR YOUR AREA - these fit all of Romania! 47.96214</maxLatitude>
        <maxLongitude>COMPLETE FOR YOUR AREA - these fit all of Romania! 28.64511</maxLongitude>
    </avl>
   <db>
        <dbName>DB-NAME</dbName>
        <dbHost>DB-HOST:DB-PORT</dbHost> (localhost:3306)
        <dbType>DB-TYPE</dbType> (mysql)
        <dbUserName>DB-USER</dbUserName>
        <dbPassword>DB-PASSWOWRD</dbPassword>
    </db>
    <hibernate>
        <configFile>/usr/local/transitclock/config/hibernate_AGENCY.cfg.xml</configFile>
    </hibernate>
<web>
        <mapTileUrl>https://tile.openstreetmap.org/{z}/{x}/{y}.png</mapTileUrl>
    </web>
</transitclock>

Tips: check that the traccar URL is valid before running with this config by running something like curl http://localhost:8082

P.S.: this project/wiki is just a "log" of my personal experience deploying transitime, it's not the official project repo or support page. If something isn't working, although I'll do my best to help you, maybe it's better to ask over at https://github.com/TheTransitClock/transitime/issues

@BodoMinea BodoMinea self-assigned this Dec 19, 2021
@engalissongomes
Copy link
Author

good night, i tried in the other group but they didn't respond, i'm trying to implement transitime-docker and traccar, i have little experience, i've tried it in my country and i didn't find anyone, i need to know which files i edit.

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

No branches or pull requests

2 participants