MultiModal and NationalRail UK64

If I choose a place to get stops for and THEN use map view, it works. So, choose Strausberg (german view), see listings, move to map view, see a correct map. If I go to the start, even with partial results showing, and choose ‘map view’, I wind up walking toward the National Gallery. Not bad in itself.

[W] unknown:71 - file:///usr/share/harbour-multimodal/qml/pages/MapPage.qml:71: TypeError: Cannot read property 'towards' of undefined
[W] unknown:68 - file:///usr/share/harbour-multimodal/qml/pages/MapPage.qml:68: TypeError: Cannot read property 'towards' of undefined
[W] unknown:84 - file:///usr/share/harbour-multimodal/qml/pages/MapPage.qml:84: TypeError: Cannot read property 'lines' of undefined
[W] unknown:98 - file:///usr/share/harbour-multimodal/qml/pages/MapPage.qml:98: TypeError: Cannot read property 'lat' of undefined
[W] unknown:109 - file:///usr/share/harbour-multimodal/qml/pages/MapPage.qml:109: TypeError: Cannot read property 'stop_letter' of undefined
[W] unknown:108 - file:///usr/share/harbour-multimodal/qml/pages/MapPage.qml:108: TypeError: Cannot read property 'stop_type' of undefined
[W] unknown:107 - file:///usr/share/harbour-multimodal/qml/pages/MapPage.qml:107: TypeError: Cannot read property 'modes' of undefined
[W] unknown:106 - file:///usr/share/harbour-multimodal/qml/pages/MapPage.qml:106: TypeError: Cannot read property 'dataset_id' of undefined
[W] unknown:105 - file:///usr/share/harbour-multimodal/qml/pages/MapPage.qml:105: TypeError: Cannot read property 'numbering_area' of undefined
[D] onActive_pageChanged:101 - active page: map
[I] unknown:0 - Using QSGMapboxGLTextureNode for map rendering. devicePixelRatio: 1
[W] unknown:0 - QObject::startTimer: Timers cannot have negative intervals
[W] unknown:0 - QObject::startTimer: Timers cannot have negative intervals
[W] unknown:0 - QObject::startTimer: Timers cannot have negative intervals
[D] request_stops:301 - request_stops - bounding box: [51.53987154668274,-0.1517710360555474,51.47480738026125,-0.10352404657082384] distance: 7968.20

There are no hoops. I have had the pleasure of maintaining apps in the Google play and Apple stores. Them be hoops. Without having done a complete build of multimodal I can’t be 100 % sure, but I think it would be trivial to get into store.

I make myself extra work. In short, to add value to Jolla’s store. Because I believe it is in all of of our best interest to add value to the store. That is a luxury that I can afford and don’t expect anyone else to be able to. But it’s really, worst case, add a flag, remove a requires and build for store.

A btw. I’ve started assembling a repo for github, because I think @Thaodan among others would collaborate. It would be helpful if you published your .spec, if you have one :slight_smile:

Oh, boy. So my wonderfull weather app has accurate GPS fix (volla phone, within 30 seconds, at a window indoors).

But, it’s raining. No sign of rain in the app. None. Sigh. Back to the drawing board.

I tried it and GPS works just fine here so this seems not to be an issue with the code. I looks to me as there are simply no position updates happening so opening the map page will throw some errors and then display a default location.

As long as the position indicator is blinking (in the upper right corner of the search page) this would indicate MultiModal has not the finest idea where it is and will use the default position near Charing Cross.

There should be a “update_location” line visible in the output:

update_location:235 - update_location - tech: loc

As long as you don’t see anything like that it means the app is not receiving any location updates at all.

The .spec file should be present within the rpm for quite a while now.

I mean it’s just a few qml and python files so there is not much to build. Basically all I do is invoking rpmbuild --target noarch -bb harbour-multimodal.spec to package it.

My conclusion was that before I would invest several days into trying to figure out how to make it work with the store I would rather use that time to improve the app itself.

Sorry. I actually had unpacked it.

No such output.

An earlier line:
[D] unknown:0 - There is no sensor manager yet, do not initialize "compasssensor"

D] onActive_pageChanged:101 - active page: map
[I] unknown:0 - Using QSGMapboxGLTextureNode for map rendering. devicePixelRatio: 1
[W] unknown:0 - [ INFO ]  "{unknown}[General]: GPU Identifier: Mali-G71 MP2"
[D] request_stops:301 - request_stops - bounding box: [51.53987154668274,-0.15177103605554712,51.47480738026125,-0.10352404657082412] distance: 7968.203341695269
[D] r_geo_stops_types:155 - r_geo_stops_types: 51.53987154668274 -0.15177103605554712 51.47480738026125 -0.10352404657082412 [2,4,6,8,10]

This is with pure maps open clearly indicating my location.

Found it. My search radius in settings was ‘unset’. Works fine.

Maybe Use location was also not active, which could explain why the update_location line was missing.
This setting is meant is to prevent MultiModal from using location services even if Sailfish settings allow GPS because of the way MultiModal handles positioning. The app leaves GPS on (but at a reduced update rate) even if it’s not in an active state.
This is different from how other Sailfish apps operate (e.g. PureMaps) and was a conscious design decision driven by the poor GPS performance of my XA2. In fact, I would even leave MultiModal running in the background while using PureMaps as this would keep GPS always on even while the phone was not in use which would prevent PureMaps from losing position when becoming active again.
As I found out this had only a negligible impact on battery life so I kept it in. The convenience of being presented with an instant position rather than having to wait 30 seconds every time I open the map offsets any battery drain this technique may cause.

1 Like

Since yesterday MultiModal also started venturing into the world of web scrapers to support bus services in Manchester.
Sadly my request to get proper API access did not align with the usual “f*** open source” attitude I often experience from transport companies.

1 Like

I wonder what they think copy left means. I only use the cudgel of the GPLv3 because unscrupulous people are evidently afraid of it. grin.

The situation in Germany is a real clusterf*. Every tom dick and harry negotiating licenses for long outdated approaches costing millions and millions to port, maintain … binary interfaces, xml interfaces, json interfaces, etc, etc.

So, I’m going to use the anarchy in the UK text, illegally, as the LICENSE. Let’s see if I get sued.

2 Likes

One would think transport companies would have a vested interest in making it more convenient for potential customers to use their services but no.

Ok, now all you punks who are not @cypherpunks can step up to bat and help work on MultiModal in a structured, by an anal retentive guy, way:

I’m currently tracking the releases. It’s annoying. I’ll live. When I get out of hafas json backend hell in Fahrplan land, I plan on implementing, among other things, journey to calendar export in multimodal.

1 Like

I could maybe add some kind of git-push into my build script if that would help.

And I could add some keys to the repo which would mean you can push with no overhead. I’ll see what the best course is. But, no stress. I was being snarky. I was in a snarky mood.

I maybe use the opportunity of having a hafas expert around, as I guess both the XML DB API and trasport.rest will get their data from hafas in one way or another.

Is there something equivalent to station messages in hafas (example at the bottom of the picture)?

Or line status?

All notifications I’ve been able to find so far seem to always have been related to individual train services, not other objects (station points, lines). That’s fine, I just wanted to know if I’ve maybe missed something.

OOPs. The following is an EFA backend. Back in a bit!

Oh, the answer is that there are SO MANY ways to get line/status/station information. An example, since I’ve just got it working again, from VRR (the json version):

Station status messages, for Essen (GETs):

https://www.vrr.de/vrr-efa/XML_ADDINFO_REQUEST?filterShowLineList=0&filterShowStopList=0&filterStopId=de:05113:9289&outputFormat=rapidJSON&serverInfo=1

Produces a lot of output, for 2 actual messages. Truncated here.

{
	"serverInfo": {
		"controllerVersion": "10.4.25.29",
		"serverID": "EFAMOBIL8_",
		"virtDir": "vrrstd3",
		"serverTime": "2022-06-08T09:03:46",
		"calcTime": 10.552
	},
	"version": "10.4.18.18",
	"timestamp": "2022-06-08T07:03:46Z",
	"infos": {
		"current": [
			{
				"type": "stopInfo",
				"id": "VIA_66243",
				"version": 2016579,
				"priority": "normal",
				"timestamps": {
					"creation": "2022-02-04T07:50:00Z",
					"availability": {
						"from": "2022-02-04T07:50:02Z",
						"to": "2023-02-04T07:50:02Z"
					},
					"validity": [
						{
							"from": "2022-02-04T07:45:00Z",
							"to": "2023-02-04T07:50:02Z"
						}
					]
				},
				"urlText": "(H) Essen Hbf: Aufzug 4 außer Betrieb",
				"url": "http://217.70.161.100:80/cm/XSLT_CM_SHOWADDINFO_REQUEST?infoID=VIA_66243&seqID=2016579",
				"content": "<p> <span style=\"color: rgb(0, 0, 0); font-family: FrutigerLTPro-Condensed, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none; \">Aktuell ist der Aufzug 4 an der (H)&nbsp;</span><i style=\"box-sizing: border-box; font-style: italic; line-height: inherit; color: rgb(0, 0, 0); font-family: FrutigerLTPro-Condensed, Helvetica, Arial, sans-serif; font-size: 16px; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; \">Essen Hbf</i><span style=\"color: rgb(0, 0, 0); font-family: FrutigerLTPro-Condensed, Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none; \">&nbsp;</span>außer Betrieb. Fahrgäste können alternativ Fahrtreppen sowie den Aufzug 5 nutzen.</p>",
				"subtitle": "(H) Essen Hbf: Aufzug 4 außer Betrieb",
				"title": "Alternative für Fahrgäste: Fahrtreppen und Aufzug 5",
				"properties": {
1 Like

The first picture is a ‘StationBoard’ request:

This is an example json request to the Salzburg mgate (json) hafas backend (this is departures):

EDIT: The results include the delays or falling out of a departure or arrival.

{
	"svcReqL": [
		{
			"id": "1|38|",
			"meth": "StationBoard",
			"req": {
				"jnyFltrL": [
					{
						"mode": "INC",
						"type": "PROD",
						"value": 4087
					}
				],
				"maxJny": 40,
				"sort": "PT",
				"stbLoc": {
					"lid": "A=1@O=Salzburg Hauptbahnhof@X=13045065@Y=47813093@U=81@L=455000200@B=1@p=1654644332@i=A×at:45:50002@",
					"name": "Salzburg Hauptbahnhof"
				},
				"type": "DEP"
			}
		}
	]
}

LocDetails shows the lines operating from this location:

	"svcReqL": [
		{
			"id": "1|23|",
			"meth": "LocDetails",
			"req": {
				"getAttributes": true,
				"getHIM": true,
				"getIcons": true,
				"getProducts": true,
				"locL": [
					[
						{
							"lid": "A=1@O=Salzburg Hauptbahnhof@X=13045065@Y=47813093@U=81@L=455000200@B=1@p=1654644332@i=A×at:45:50002@",
							"name": "Salzburg Hauptbahnhof"
						}
					]
				]
			}
		}
	]
}
1 Like

Thank you, so it looks like they exist in hafas but seem not to have been implemented in transport.rest (yet).

I think they’ve been separated out in a secondary api, maybe:

https://developer.deutschebahn.com/store/apis/info?name=StaDa-Station_Data&version=v2&provider=DBOpenData

But I haven’t looked into it.

There is also a fairly detailed view of the XSD schemas in the api docs from the danes:

This is NOT mgate, but the classic hafas query backend with support for json output. Page 42 has the complete details of a DepartureBoard.

1 Like

It seems like sending notifications directly to Amazfish became one of the many victims of Sailjail.
I’ve added generic notifications support to MultiModal to circumvent this issue.

I’m wondering if something like this (highlighting the train on the station board that would reach the desired destination the earliest) would be possible with the DB endpoint as well.
It’s one of the little details in MultiModal I use quite often.

1 Like