openhab-addons/bundles/org.openhab.binding.enturno/CONTRIBUTE.md
Kai Kreuzer 6df6783b60 added migrated 2.x add-ons
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-09-21 03:37:19 +02:00

1.4 KiB

How can you contribute?

This binding is meant to get Norwegian public transport real-time (estimated) data from Entur.no API.

It runs GraphQL-API query against the service.

Entur provides an IDE for the API (use query from GraphQL request example below as a start point) Ctrl+Space gives hints of valid values

There are several possibilities to get and process data from endpoints that entur.no provides. One of possible examples is to get all departures for all lines from specified stop place (all directions) or even specified quay (specified direction). Those are not supported yet so feel free to extend functionality of this binding.

GraphQL request example

{
  stopPlace(id: "NSR:StopPlace:30848") {
    id
    name
    transportMode
    estimatedCalls(startTime:"2019-04-06T10:00:00+01:00" timeRange: 86400, numberOfDepartures: 400) {
      realtime
      aimedArrivalTime
      aimedDepartureTime
      expectedArrivalTime
      expectedDepartureTime
      date
      forBoarding
      forAlighting
      destinationDisplay {
        frontText
      }
      quay {
        id
        publicCode
      }
      serviceJourney {
        journeyPattern {
          line {
            id
            name
            transportMode
            publicCode
          }
        }
      }
    }
  }
}