Train/Bus departures board

logo:

https://discourse.southlondonmakerspace.org/uploads/default/original/2X/2/2bd9a75a5098155d90b76c0c335856e3775b26ce.zip

1 Like

Yay thanks.
Tada

Now with a calendar widget type thing.

3 Likes

Can that live info be cleverly cycled / incorporated on to a screen saver?

Probably! Depending on the screen size, we could shift the contents around (flip the columns, perhaps) to reduce burn in.

That said, if we’re doing the ‘green’ thing - any screen displaying it would be off a lot of the time.

1 Like

And some more tada…!

First thing you’ll notice is the alert at the top - that’s a test of what is possible. That alert would pop up just as someone performs an event, for a few seconds, before fading out. We can do all the usual bootstrap alert classes. They come in via socket.io from the server, we can send them from the server, or from something else doing a POST to the dashboard server.

I’ve made some design changes. The “most important” thing is top left. Thought being - if you’re looking for bus departures, you already know they’re on that screen, but you if you’re seeing it for the first time, you might miss that useful information if the first thing you see is a bunch of busses and times and stuff.

Added a new widget “happenings” - which hooks up to the calendar (although I’m using a test ical file that I can add test events to for development). Here’s what it looks like when an event is currently happening:

So - this should be easy to pick up by anyone else. In particular, it should be easy to do pull request, by adding a new widget

Oh, and also there’s an analogue clock. And it’s all Angulary.

3 Likes

now if you could sort out a text alert 5 minutes before your selected bus leaves…:grin:

1 Like

You seem to be missing out the 37 bus.

This was the same problem I was trying to tackle before, by showing that stop it gets confusing because a lot of the buses show on the screen in two places, so then you instead look at removing those stops and you miss other buses and people get times for a bus stop that is further away and then miss the bus.

Thats why really it needs to aggregate in a weird way.

Do you need an API for the event log then @naxxfish?

Yes please! I’ve done a bit of a hack that scrapes /events off membership system and when it sees a new event it posts it to the dashboard - but I’d prefer something more official :slight_smile:

How do you want it formatted just the latest event(s) in JSON?

Yeah, that’d be great. Ideally, it’d be nice to filter for events since time X, so I don’t have to process loads of events every time I request it…

How about:

http://members.southlondonmakerspace.org/api/get_events?key=(SECRET_KEY)&since=(ISO-8601)

Returns:

Status 200: JSON array with data or empty if nothing in there i.e.

[]

or

[
{ “string”: “Blah did blah”, date: [Object Date] }
]

Status 403: Unauthorised

That sounds pretty good to me.

Might be good to have the individual component parts as well - potentially so we can do something in the future with that information (e.g. lookup a picture of a member if they are available, or something?)

The way it is stored is a:

  • date
  • user
  • event/permission

It then looks up the data for those and returns them.

I could return more data, it uses Gravatar for the photo, although it can probably also grab the Discourse avatar as well quite easily, it’s just a URL.

I’ll have a look tonight.

Awesome, those bits of data should be more than sufficient! Thanks!

Code is in GitHub, you’ll have to convince @systems to update the system though.

The endpoint is: https://URL/api/events?api_key=KEY&since=DATE&limit=LIMIT

The key is currently a single key used by multiple piece of code, so I will respin this into a database of codes so they can be revoked if lost more easily without breaking other software if the key leaks.

The date is formatted like this: 2016-11-01T00:00 or any other moment.js accepted format.

The limit 1-50, defaults to 10. It’s not paginated as I presumed this was unnecessary. Any other input will result in 10 lines.

The data is sorted ascending order from the since date.

1 Like

Awesome! cheers

So bus stops are now grouped by name. Also, each service is only shown at the closest stop (as the crow flies) that it can be caught at (that was a challenge!). Stops that are not the closest for any service are not shown at all.

Also - forgot to mention - there’s an analogue clock in the corner.

That image is 1440x900, the resolution of my old monitor.

1 Like

Looking good, Might be nice to use relative times for the trains?

I’m not going to open this conversation again, but sufficed to say there was a gate on analog clocks. :smiley:

I’m not going to open this conversation again, but sufficed to say there was a gate on analog clocks. :smiley:

Of course there was… :rolling_eyes: :smiley:

Hmm, relative times for the trains…