Code Monkey home page Code Monkey logo

taustellwerk's Introduction

TauStellwerk

TauStellwerk is a open-source software project for controlling model railways. It is intended to provide a intuitive user interface for easy and quick edits and control of a model railway. It is not intended to be a competitor to more complex software like JMRI, TrainController or similar, but rather an alternative to manufacturer-provided applications.

If you have any questions, feedback or any other comments, feel free to open a issue or pm me(nic547) on discord.

Screenshot of the web app on a computer Screenshot of the webapp on a mobile device Screenshot of the Desktop application

Overview

The software is still in an experimental state. There might be some fundamental changes that break existing databases or installations. Currently there are no prebuilt binaries available.

Currently supported Command Stations:

  • ESU Command Station (ECoS)
  • DCC++ EX (via USB)

Requirements

TauStellwerk requires the ASP.NET Core Runtime 8.0 to be installed. See the Microsoft .NET Download page for downloads and installation instructions.

MacOS/iOS

Using the cross-platform .NET software framework does mean that the TauStellwerk-Software should run on MacOS/iOS. Unfortunately I do not have access to either OS, so I cannot test on either OS.

Webserver

Core of the TauStellwerk software is the TauStellwerk.Server component. It handles communication between the CommandStation and the clients. Can, for example, be run on a Raspberry Pi.

For the sake of simplicity, there are no "accounts". Any user can choose whatever username he desires. Access control has be done by restricting access to the server.

Webapp

The Webapp is based on Blazor WebAssembly and should run on any recent version of the commonly used Browsers. Generally the application is tested with current versions of Chrome, Firefox and Edge. It's expected that the webapp will not necessarily have feature-parity with the dedicated applications and be more of a "lite" version.

Desktop Application

Uses .NET and AvaloniaUI. Connects to the TauStellwerk.Server. Tested on Linux and Windows.

Mobile App

Planned but not started. Initially MAUI was intended to be used, currently waiting to see how MAUI vs UNO vs AvaloniaUI for mobile apps pans out.

Licences

Unless noted otherwise, this project is licensed under the GNU GPLv3, see here for more details.

Contributing

All contributions are welcome. As I'm currently the sole user and developer, documentation isn't a huge focus for me, so feel free approach me with any potential questions.

Acknowledgements

JetBrains has been kind enough to provide me with a free open-source license for their products as part of their open source support program. I'm using Rider for development and can only recommend it.

taustellwerk's People

Contributors

dependabot[bot] avatar nic547 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

taustellwerk's Issues

Backend: Add Swashbuckle to get a Swagger endpoint

As a Developer, I would like to have a Swagger JSON endpoint for API documentation so that I don't have to write separate documentation and get nice documentation with an interactive "try out" feature.

In addition to adding the nuget-package this also requires a bit of configuration and making sure all existing HTTP methods are properly documented.
I'd prefer the swagger endpoint only being active while running in "Hosting environment: Development"

Allow "Hiding" Enines

As a User, I'd like to be able to hide an engine from the engine list so that I can "ignore" an engine that isn't available for some reason without deleting it.

Different sorting methods

As a user, I would like to be able to sort engines by different criteria so that I can find my target easier.

Update load generator

As a developer, I would like to have Tool to generate some load on my system, so that I can get a rough estimate of the application performance.

The current LoadGenerator Tool is outdated and needs to be updated to the current PiStellwerk. I also need to define what constitutes a "realistic" usage pattern and need to deal with acquiring (locking) engines etc.

[Desktop] Add Settings

As a User, I would like to be able to configure the application so that I can use a different server and username than the currently hardcoded ones.

This includes:

  • Settings Window
  • Saving and loading Settings (.json file?)
  • Providing the settings via some service or something.

Not included:

  • Validating things like server address.

Think about Name and Logo

PiStellwerk as a Name isn't really fitting anymore since the Raspberry Pi part kinda fell away.
A proper logo would be nice too. Ideally this should happen rather sooner then later.

Mobile App: Setup MAUI

As a Developer, I would like to serve an app to users, so that I have more control over suspend/resume and can implement a more complicated layout.

Currently waiting for a somewhat ready MAUI in one of the upcoming .NET 6 Previews.

Explore Blazor WebAssembly for the webapp

As a developer, I would like for the clients to share as much code as possible so that maintenance is as simple as possible.

Blazor WebAssembly would allow reusing a bunch of stuff. It would also add things like data binding and lowering the need for javascript/typescript.

The big question how will loading times and performance change. I'm fairly certain they will not improve, the question is how noticeable worse they will get.

Therefore a prototype would be useful.

Support for consists

As a User, i would like PiStellwerk to support consists, so that i can drive multiple engines together.

Requirements Phase 1

  • As a user, it's clear if a steerable thing is an engine or a consist
  • As a user I can quickly determine which engines are part of an consist.
  • As a user, I would some kind of image to represent the engines.
  • As a admin I don't want n! consist db entries for n engines.

Requirements Phase 2 (Put in separate Issue at some point)

  • As a User I can quickly create new consists.
  • As a User I can delete consists.

Investigate warnings about "QuerySplittingBehavior"

warn: Microsoft.EntityFrameworkCore.Query[20504]
Compiling a query which loads related collections for more than one collection navigation either via 'Include' or through projection but no 'QuerySplittingBehavior' has been configured. By default Entity Framework will use 'QuerySplittingBehavior.SingleQuery' which can potentially result in slow query performance. See https://go.microsoft.com/fwlink/?linkid=2134277 for more information. To identify the query that's triggering this warning call 'ConfigureWarnings(w => w.Throw(RelationalEventId.MultipleCollectionIncludeWarning))'

[Backend] Support for DCC++ EX

As a user, I would like for PiStellwerk to interface with DCC++ EX so that I can use hardware I own or have a low-cost alternative to more expensive command stations.

Concept for Tournout Layout GUI

Some kind of control panel.
It should be fast to create and modify turnouts and tracks
Not total free-form drawing but not just tiles

Support Paging in Web-app

As a user of the web app, I would like to be able to switch pages, so that I can use all my engines if I own more than 20.

Engine CRUD

As a User, I'd like to Create, Update and Delete engines without editing the database directly.

(Doesn't include images)

No implementation in the webapp, only backend. Actual usage needs the Avalonia or MAUI Clients.

Web app: Switching themes

As a User I would like to be able to switch between different themes so that I can use light/dark mode as I prefer.

Search function

As a user, I would like to be able to search for an engine based on a custom string so that I can find my target easier.

For the initial implementation only searching in names is good enough, searching in Tags can be done separately.

[Backend] Don't serve images from UserContent

Currently images placed in /userContent will both be used for generating other sizes and formats and for serving to clients. I would prefer if that wasn't the case.

The requirements of the two usages are quite opposed to each other. As the "golden copy", the image should be high-quality, with little or no compression, so that I can use different formats or compression ratios at a latter date.
For serving the images to clients, I want maximum compression to reduce load times.

Therefore I don't want the image from userContent served to Clients.

Improve themes

  • Think about different primary colour, green might not be ideal (Red-green colour blindness)
  • Every button should use the same style ( or at least similar, tags count as buttons even thought they're not functional yet)
  • Similar style for a active buttons
  • Styles for pressed buttons

[Desktop] Engine functions

As a user I would like to be able to toggle engine functions via the desktop app so that I can use the horns on my engine.

Implement E-Stop for engines

As a User, I would like to be able to send a emergency stop command to an engine, so that they stop instantly instead of using the deceleration rate.

Seperate model into db-entities and DTOs

Currently PiStellwerk only utilised a shared model for things like engines across the whole application. This lead to the situation, that even Clients require EF Core and similar dependencies.

Configurable location of userImages

As an admin, I would like to be able to configure the location where the large original images are stores so that I can store them on bigger, slower storage.

[Backend] Re-enable serving images

While prototyping the Blazor WebAssembly WebClient, the staticFile middleware was reset and /generatedImages is no longer served.
Ideally #58 is resolved first.

Web app: Persist settings

As user I want the web app to save settings (like the username) so that I don't have to change them every time.

Replace NDesk with CommandLineParser

NDesk seems like it's not developed further, last commit happened more than 2 years ago

CommandLineParser seems to fullfill a very similar goal and I've used it in other projects.

Changes for rev2

  • Increase size to "full" Raspberry Pi size.
  • Less dense layout => easier to solder
  • Larger surface => better thermals
    • More silkscreen to make assembly easier
  • Add possibility to attach USB without using the USB Isolator IC (for testing)
    • Make sure the USB thing has the correct 5k5 Resistor
  • Use JTAG instead of SWD
  • Add keyed debug headers and additional PCB to connect the J-Link 20 pin JTAG connector

Create Backup Utility

As a system admin, I would like to be able to create backups and restore from backups without much hassle.
This would include the original images and the database data.

The inital Idea was to create a second executable for this purpose, but with the "self-contained"-deployment this would lead to two copies of all dependencies. So some kind of command line switch in TauStellwerk.Server would probably be the best solution.

I'm not quite sure how to deal with the relational data. Either just copying the .db file, or creating a json dump from the database.
Copying the database would obviously be the simpler way.
Dumping the database to a json file is a bit more complex. The big payoff I see is that I could create a more "general" export-import feature that could support things like not exporting the complete dataset or essentially "merging" two databases. If I ever wanted to add support for an additional RDBMS this would enable the transfer of a database to another system.

Possible problems:

  • No database migrations touch the json, so restoring old backups in a new version might be difficult
    • Can I just say that's not supported?
  • Data is denormalized
    • Might not be that bad, I think the database file isn't that efficent either, especially with little data.
    • Compression might help here

Desktop Application with Avalonia.UI

Scope:

  • Can view first page of the engine list
  • Can select engines
  • Can control speed and direction

Doesn't include: settings, anything with images, perfect styling

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.