Model railroad fastclock master/controller based on ESP8266 with small display and nRF24 based radio
Go to file
Dirk Jahnke 97be2b6791 Refactored and fixed power off handling. Still power off does power on again after deep sleep time is over (~1h). 2018-11-30 12:46:26 +01:00
include Initial commit. 2018-11-14 08:43:50 +01:00
lib Added new platform: Wemos ESP8266 D1 mini pro. Now radio starts but still does not send any clock information. 2018-11-14 21:34:51 +01:00
src Refactored and fixed power off handling. Still power off does power on again after deep sleep time is over (~1h). 2018-11-30 12:46:26 +01:00
test Initial commit. 2018-11-14 08:43:50 +01:00
.gitignore Initial commit. 2018-11-14 08:43:50 +01:00
.travis.yml Initial commit. 2018-11-14 08:43:50 +01:00
README.md Implemented most of the messages. 2018-11-18 15:51:03 +01:00
platformio.ini Sends broadcast time message over radio. 2018-11-15 13:03:01 +01:00

README.md

Model Railroad Fastclock Master/Controller

This is a controller for a model railroad fastclock. That clock looks like a normal clock, but runs at a higher speed than usual. This is used to compensate the fact, that distances on the model railroad are not properly to scale, as that would need much huger locations and setup than possible.

The tasks of the master clock / controller is:

  • set the correct time
  • set the speed of the clock
  • start/stop the clock
  • inform client clocks about the current time to be displayed
  • support multiple clock systems, as we have multiple arrangements of model railroads at the same location having their own times

Principals

  • all messages are sent as broadcast messages without acknowledge on device level
  • all devices listen to all messages and filter out those messages addressed to them
  • all messages begin with a message type, to-address, from-address
  • addresses are a number in the range of 0..255
    • address 0 is reserved for master/controller
    • address 255 is reserved for a broadcast to all devices
  • if acknowledges are necessary/wanted, then separate messages needs to be applied
  • after receiving a message that needs an acknowledge, no device is allowed to send a message for a TBD. period of time except the requested device, which may send an acknowledge
  • after sending a message, the same device must wait a TBD. period of time before sending another message

Protocol

Message structure

Type To From Message
P,p,A,U,a,C,T,H,E 0..255 0..255 msg type dependent

Message definitions

Nachricht msgType Attribute Status
PairingOffering P FastclockName (8), ClockChannel Implemented
PairingRequest p ClientName(10) Implemented
PairingAck A FastclockName (8), ClientName (10), Network-Address Implemented
UnpairRequest U tbd. ---
UnpairAck a tbd. ---
FastClock C FastclockName (8), Hour, Minute, Second, ClockSpeed, Weekday Implemented
TextMessage T FastclockName (8), Message Implemented
Hello H tbd. ---
HelloEcho E RSSI, canRouteToMaster, FastclockName(8) ---