This converter runs as a service requesting an IXSI API endpoint and converts the data to GBFS.
Currently only supports station based systems. Currently exports as GBFS version 2.0.
Config is applied as enviroment variables.
IXSI_ENDPOINT_URL: Websocket endpoint of the IXSI service.wss://…IXSI_SYSTEM_ID: SystemID of IXSI which should be requestedREQUEST_SLOT_DURATION_SECONDS: GBFS publishes only the current state of the system. But in most station based systems there is a minimal rent duration. This means that if a car is currenly available, but there is a booking in 15 minutes and the minimal booking slot ist 30 minutes, that in fact you cant rent the car right now. So this config can lookREQUEST_SLOT_DURATION_SECONDSin advance. If there is an already booked slot in this timeframe, the car will be shown as unavailable in the GBFS output. Default:1800(30 minutes). Value in seconds.REQUEST_INTERVAL_SECONDS: How often the IXSI system will be requested for new data. Default:120(2 minutes). Value in seconds.GBFS_LANGUAGE: Language of GBFS files, currently only one language supported. Default:de.GBFS_ENDPOINT: Root URL on which the GBFS will be available (withoutgbfs.json, without trailing slash).GBFS_SYSTEM_ID: This is used assystem_idinsystem_information.jsonfile. Default:ixsi-gbfs-converterGBFS_NAME: Human readable name of the sharing system, used insystem_information.json. Default:GBFS Feed from IXSIGBFS_TIMEZONE: This is used astimezoneinsystem_information.json, see https://www.iana.org/time-zones. Default:Europe/BerlinPORT: Port the gbfs is served on. Default: 8000.
The container connects to the IXSI websocket endpoint and places the resulting GBFS into the gbfs folder, that will be created if it doesn't exist.
The gbfs data is reachable on port 8000 (or your configured one in PORT). If you have a reverse proxy in front of it, the converter supports X-Forwarded-Host, X-Forwarded-Port, X-Forwarded-Proto, X-Forwarded-Prefix headers. Look especially into the X-Forwarded-Prefix header, if you provide the gbfs externally in a subdirectory.
The Converter is also published as docker image as stadtulm/ixsi-gbfs-converter on docker hub. Configuration also happens with environment variables. If you run the container with docker directly (and not by an orchestrator like k8s), have a look into the --env-file flag, to collect all of them in a file.
Locally there is not only the way of configuring by environment variables, but thanks to dotenv you can also place them into a .env file.
To install and run:
npm install
npm start
You can find XSD files and generated visualisation in ixsi-documentation folder.