harkle / fallblatt-module

Software to controll SBB FallBlatt via RS485

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fallblatt-module

A software to controll SBB split flap display via serial port (RS485).

General

fallblatt-module is a node JS application that allows you to controll SBB split flap display via serial port. It offers a webinterface, and two API (Websocket and REST).

Hardware

The split flap display need to be connected to the a computer via a RS-485 serial port. Please refert to documentation du see how to proceed with serial and power supply.

Material list

Installation

To install the software run npm install in command line.

npm install

Then you have to do some configuration

 mv config/config-sample.json config/config.json

In config.json

  • set your serial port path
  • set the module address (generaly written on the module itself
  • set a type for the module (any name)

Then you will have to map the messages. In config/module-mapping create a json file named after the module address (i.e 53.json) . Just enter all the messages you have on your split flap display.

Usage

You can run the software in command line via

node server.js

Command line

You can control the module via command line by taping any command in command list.

Webinterface

You can access a web app via your browser. The adresse is http://<ipAddress>:3000/.

Websocket

A socket.io API is available at http://<ipAddress>:3000/. Use any command in command list.

REST API

You can control the module via a REST API available at http://<ipAddress>:3000/<command>/. Any command that change module status is a POST request. All parameter are passed directly in the URL, i.e:

http://<ipAddress>/random/start/10/5

Mobile App

An ionic app is available to controll multiple module on the same network. Please see fallblatt-mobile for more information.

Command list

  • status: return the status of the software
  • message: return the current message
  • list: return a list of all available messages
  • position: return the current position
  • reset: move the module to initial position
  • move <destination>: move the module to a specific position
  • step: move the module one step forward
  • find <message>: move to string (can be partial)
  • random <action> [duration] [variation]: set random mode (action start|stop duration/variation in seconds)
  • turn <action> [duration] [variation]: set turn mode (action start|stop duration/variation in seconds)

Documentation

The documentation has been written by # eni23/sbb-fallblatt (Thank you very much to him to create a comprenhensive documentation for the communication protocol). Please be aware this documentation is under GPL licence (and not MIT as the rest of this repo).

About

Software to controll SBB FallBlatt via RS485

License:MIT License


Languages

Language:JavaScript 80.4%Language:HTML 12.8%Language:CSS 6.8%