2023-01-05 11:44:02 +01:00
2022-11-28 18:22:05 +01:00
2022-05-20 21:16:11 +02:00
2023-01-05 11:44:02 +01:00
2022-07-11 18:14:24 +02:00
2021-12-15 22:32:27 +01:00
2023-01-02 16:10:15 +01:00
2021-12-16 15:41:07 +01:00

Django Railroad Assets Manager (django-ram)

Django CI

Screenshot 2022-07-23 at 22-40-17 Railroad Assets Manager

A jff (just for fun) project that aims to create a model railroad assets manager that allows to:

  • Create a database of assets (model trains) and consists with their metadata
  • Manage the database via a simple but rationale backoffice
  • Expose main data via an HTML interface to show how beautiful is your collection to the outside world
  • Act as a DCC++ EX REST API gateway to control assets remotely via DCC. By anyone, if you'd like (seriously?).

Preface

This project is work in progress. It is intended for fun only and it has been developed with a commitment of few minutes a day; it lacks any kind of documentation, code review, architectural review, security assesment, pentest, ISO certification, etc.

This project probably doesn't match your needs nor expectations. Be aware.

Your model train may also catch fire while using this software.

Check out my own instance.

Components

Project is based on the following technologies and components:

It has been developed with:

Requirements

  • Python 3.9+
  • A USB port when running Arduino hardware (and adaptors if you have a Mac)

Web portal installation

Using containers

coming soon

Manual installation

Setup your virtualenv

$ python3 -m venv venv
$ source ./venv/bin/activate

Install dependencies

$ pip install -r requirements.txt
# Development stuff
$ pip install -r requirements-dev.txt

Bootstrap Django

$ cd ram
$ python manage.py migrate
$ python manage.py createsuperuser

Run Django

$ python manage.py runserver

Browse to http://localhost:8000

DCC++ EX connector

The DCC++ EX connector exposes an Arduino board running DCC++ EX Command Station, connected via serial port, to the network, allowing commands to be sent via a TCP socket.

Its use is not needed when running DCC++ EX from a WiFi capable board (like when using an ESP8266 module or a Mega+WiFi board).

Customize the settings

The daemon comes with default settings in config.ini. Settings may need to be customized based on your setup.

Using containers

$ cd daemons
$ podman build -t dcc/net-to-serial .
$ podman run -d -p 2560:2560 dcc/net-to-serial

Manual setup

$ cd daemons
$ pip install -r requirements.txt
$ python ./net-to-serial.py

Test with a simulator

A QEMU AVR based simulator running DCC++ EX is bundled togheter with the net-to-serial.py daemon into a container. To run it:

$ cd daemons/simulator
$ podman build -t dcc/net-to-serial:sim .
$ podman run --init --cpus 0.1 -d -p 2560:2560 dcc/net-to-serial:sim

To be continued ...

Screenshots

Frontend

Screenshot 2022-07-23 at 22-41-44 Railroad Assets Manager

Screenshot 2022-07-23 at 22-44-35 Railroad Assets Manager

Screenshot 2022-07-23 at 22-44-46 Railroad Assets Manager

Dark mode

Screenshot 2022-07-23 at 22-53-43 Railroad Assets Manager


Backoffice

image

image

image

Rest API

image

Description
No description provided
Readme AGPL-3.0 15 MiB
Languages
Python 51.2%
HTML 23.2%
JavaScript 15.9%
CSS 9.6%