Service Alerts Not Showing Up onebusaway-api-webapp

44 views
Skip to first unread message

OceanDrive

unread,
Jun 15, 2023, 9:32:06 PM6/15/23
to onebusaway-developers
I am not seeing any description populated for the <Situation> element when I run api/where/arrivals-and-departures-for-stop API call.

<situationIds>
<string>1_Demo</string>
</situationIds>

On my feed I am seeing that alerts are being read.
[ServiceAlertsServiceImpl.java:542] : updateReferences complete with 0 agency alerts, 0 route and stop alerts, 19 route alerts, and 1 distinct alerts

When I run  /api/where/situation/1_Demo.xml?key=OBAKEY&minutesAfter=90 API call I do not see the description field being populated.

<data class="entryWithReferences">
<references/>
<entry class="situation">
<id>1_Demo</id>
<creationTime>1686841560949</creationTime>
<activeWindows>
<timeRange>
<from>1685422800</from>
<to>1688101200</to>
</timeRange>
<timeRange>
<from>1685422800</from>
<to>1688101200</to>
</timeRange>
</activeWindows>
<reason>UNKNOWN_CAUSE</reason>
<allAffects>
<affects>
<routeId>1_507</routeId>
</affects>
<affects>
<routeId>1_903</routeId>
</affects>
</allAffects>
<severity>noImpact</severity>
</entry>
</data>
</response>

Am I looking at the correct API call to get the service alerts ? Appreciate any help.

Md Saroar Jahan

unread,
Jun 15, 2023, 9:52:29 PM6/15/23
to onebusaway...@googlegroups.com
Please check the locale/language of the GTFS file. You also have set the language in your local OBA server. These two should match (case sensitive).

If you need I can provide more details.

Regards
Saroar

--
You received this message because you are subscribed to the Google Groups "onebusaway-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onebusaway-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/onebusaway-developers/272a9be6-2468-4e29-bb1b-26f76d5ae261n%40googlegroups.com.


--
Md. Saroar Jahan
sar...@gmail.com
Mobile: +61 410202808

OceanDrive

unread,
Jun 15, 2023, 10:01:54 PM6/15/23
to onebusaway-developers
Thanks Saroar. Yes  language is showing up as en-Us on GTFS feed. But the app is only working for language en. 

Can you tell me where to set this language variable on the OBA.

Thanks
Ram

Md Saroar Jahan

unread,
Jun 15, 2023, 10:17:49 PM6/15/23
to onebusaway...@googlegroups.com
You can set the language in the system, plus pass it as a  JAVA_OPTS  in tomcat. I put that in catalina.sh as

JAVA_OPTS="$JAVA_OPTS $JSSE_OPTS -Duser.language=en -Duser.country=AU -Duser.timezone=Australia/Adelaide"

Regards
Saroar

OceanDrive

unread,
Jun 15, 2023, 10:30:44 PM6/15/23
to onebusaway-developers
If I am running multi agency OBA, and one agency has GTFS langugage=en and other with language=en-US. 
How do we handle it ?

Md Saroar Jahan

unread,
Jun 15, 2023, 10:36:44 PM6/15/23
to onebusaway...@googlegroups.com
I am not sure what you meant by multi agency OBA? Multiple agencies in GTFS? Or multi-region OBA?

Normally, multiple agencies from the same region/language are put in one GTFS.

I am not sure current OBA can handle multiple agencies in agency.txt file with different timezones/languages.

If you can send me a sample of the GTFS file I can take a look.

Regards
Saroar

Message has been deleted

OceanDrive

unread,
Jun 16, 2023, 9:04:13 AM6/16/23
to onebusaway-developers
Saroar, 

Let me take a step back first and tackle the single agency feed and then come back with multiple agencies on one OBA. 

In my agency.txt on GTFS file I see agency_lang set to en, and on my live feed I am seeing the language on alerts set to en-US. But when I run the API call for the situation I am not seeing the summary and description fields populated. Like you said we need to tell OBA to use language = en-US, can you tell me where do we set this?

Also FYI, No issues if the  GTFS file agency_lang set to en and  live feed language on alerts set to en. I see the  summary and description fields populated on my API call. 

Thanks
Ram

Md Saroar Jahan

unread,
Jun 16, 2023, 9:25:24 AM6/16/23
to onebusaway...@googlegroups.com
See my previous email to get an idea how to set language for OBA.

OceanDrive

unread,
Jun 16, 2023, 9:30:44 AM6/16/23
to onebusaway-developers
Saroar, 

I tried with this option but it did not do anything. 

JAVA_OPTS="$JAVA_OPTS $JSSE_OPTS -Duser.language=en-US"

Does it have something to do with agency_lang vs feed_lang? some discussion here https://github.com/google/transit/issues/95

Thanks
Ram

Md Saroar Jahan

unread,
Jun 16, 2023, 8:47:39 PM6/16/23
to onebusaway...@googlegroups.com
Hi Ram,

Can you try:

-Duser.language=en -Duser.country=US

Saroar

Reply all
Reply to author
Forward
0 new messages