Skip to content

Real Time departure times of Zurich transportation system and weather display with Wemos D1

Notifications You must be signed in to change notification settings

mrohner/ZVV-and-Weather-with-Wemos-D1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZVV-and-Weather

Real Time departure times of Zurich transportation system and weather display with Wemos D1

ZVV-and-Weather panel This panel hangs near my main door for everybody to see the next connections of near by trams, buses and trains. In addition you get a clock, outside temperature as well as weather forecast data. All the departure times displayed are real time data from the ZVV API and do consider walking times to the appropriate station. Departure times are updated every 60 seconds. I have integrated links to my MQTT system to switch all displays on and off. As well all the data (departure times) are communicated through MQTT to my home automation system. See also the video: https://github.com/mrohner/ZVV-and-Weather/blob/master/resources/Panel.mp4)

Hardware requirements:

Contributions:

ZVV API (unsupported by ZVV though)

http://online.fahrplan.zvv.ch/bin/stboard.exe/dny?input=Z%C3%BCrich,+Riedgraben&dirInput=Zürich,+Hallenbad+Oerlikon&maxJourneys=2&boardType=dep&start=1&tpl=stbResult2json&time=9:32

The names of the stations have to exactly match what you see when using https://online.fahrplan.zvv.ch/bin/query.exe/dn.html

Umlauts have to be represented in the query by i.e ü = %C3%BC (see Wemos_get_ZVV_V2.4.ino) In this .ino file you find different scenarios such as:

  • Dest1 From Zürich,Riedgraben direction to Hallenbad Oerlikon. Walking time to station 6 minutes There are several bus lines serving this station going pretty much the same way. I'm interseted in 2 connections and take the earliest to display on my panel (The response from the API is sorted by planned departure time, I'm interested in real departure time thus have to have at least 2 connections and sort by real departure time).
  • Dest2 From Zürich,Waldgarten direction to Zürich, Milchbuck. Walking time to station 7 minutes There are two tram lines going to different places. I'm interested in both. So I ask for 4 connections and take the faster one of each tram line to display.
  • Dest3 is similar to case Dest1
  • Dest4 Zürich, Oerlikon (SBB) to Zürich HB. I'm interested in a train connection that I can get after having taken the bus (Dest1) Thus requested departure time of such a train is departure time from Dest1 plus commute time (8 minutes in this case). I also flag the Inter Regio trains with a dot on the respective Matrix display.

Nextion Display

Nextion display I check sunset and sunrise time in order to decide which icons to display (the ones with the moon or the sun) I display current weather conditions (big icon) and 4 forecast icons (smaller icons) for every two hours. e.g. current time is 10:00 you will be able to see forecast for 12:00, 14:00, 16:00 and 18:00. See also my modified NexConfig.h file to allo the Nextion display to be at a softserial port.

About

Real Time departure times of Zurich transportation system and weather display with Wemos D1

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages