All Projects → Mathews2115 → TeslondaServer

Mathews2115 / TeslondaServer

Licence: MIT license
The back-end, server app for the Teslonda Dashboard on Raspberry Pi.

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to TeslondaServer

TeslondaDash
Front-end for the Teslonda Super Car Dash
Stars: ✭ 23 (+15%)
Mutual labels:  hsr, teslonda
ConsolePi
Raspberry Pi Based Serial Console Server, with PushBullet Notification of IP changes, Automatic VPN termination, custom menu, Power Outlet Control, and a lot more
Stars: ✭ 109 (+445%)
Mutual labels:  raspberrypi
RPi-TELEBOT
Python based Telegram bot to monitor and control the raspberry pi
Stars: ✭ 19 (-5%)
Mutual labels:  raspberrypi
T System
the moving objects tracking system via two axis camera motion (and as optionally n joint robotic arm) for raspberry pi distributions
Stars: ✭ 17 (-15%)
Mutual labels:  raspberrypi
52-Weeks-of-Pi
Inspired by Shekhar Gulati's "52 technologies in 2016", I've decided to set a goal of 52 Pi ideas over the next year.
Stars: ✭ 54 (+170%)
Mutual labels:  raspberrypi
PSAVanCanBridge
VAN - CAN protocol bridge (V2C) for cars made by PSA Group (Peugeot, Citroen)
Stars: ✭ 67 (+235%)
Mutual labels:  can
epdtext
A simple display manager app for the WaveShare 2.7in e-Paper Display
Stars: ✭ 18 (-10%)
Mutual labels:  raspberrypi
pyuavcan
Python implementation of the Cyphal protocol stack.
Stars: ✭ 91 (+355%)
Mutual labels:  can
balena-wpe
Fullscreen WebKit browser with hardware accelerated CSS, WebGL, and HTML5 video for the RaspberryPi 3.
Stars: ✭ 372 (+1760%)
Mutual labels:  raspberrypi
Linux-System-Info-Webpage
Material Design Dashboard for Linux System Info. Great for RPi and other linux Distros
Stars: ✭ 19 (-5%)
Mutual labels:  raspberrypi
hapi
Hydro­ponic Automa­tion Plat­form Ini­tia­tive (HAPI)
Stars: ✭ 65 (+225%)
Mutual labels:  raspberrypi
EEGwithRaspberryPI
Open-Source board for converting RaspberryPI to Brain-computer interface
Stars: ✭ 402 (+1910%)
Mutual labels:  raspberrypi
rpi-home-cluster-setup
Automated way to set up your own kubernetes cluster on Raspberry Pi. Includes memory card preparation, nodes bootstrap and kubernetes services configuration
Stars: ✭ 111 (+455%)
Mutual labels:  raspberrypi
raspberrypi4-bootloader-analysis
My Analysis of the VC4 Assembly Code from the RPI4
Stars: ✭ 31 (+55%)
Mutual labels:  raspberrypi
aprenda-python
Aprendizado, dicas e projetos sobre Python
Stars: ✭ 22 (+10%)
Mutual labels:  raspberrypi
aria2-ariang-docker
🐳 Aria2 downloader and AriaNg webui Docker image based on Alpine Linux
Stars: ✭ 49 (+145%)
Mutual labels:  raspberrypi
speedInspectorRPI
A docker image with a cronjob running speedtest, audit your internet connection/ISP
Stars: ✭ 12 (-40%)
Mutual labels:  raspberrypi
Raspberry-Pi-Dashboard
Web-based dashboard interface to inspect Raspberry Pi hardware and software with no extra software required.
Stars: ✭ 131 (+555%)
Mutual labels:  raspberrypi
octoscreen
A touchscreen client for Octoprint
Stars: ✭ 26 (+30%)
Mutual labels:  raspberrypi
datalinkengineeringcanopen
CANopen SDK (API) for Windows developers. Supported adapters: Kvaser, Ixxat, CANUSB, CAN232, Peak PCAN, Copley Controls, USBTIN and more.
Stars: ✭ 26 (+30%)
Mutual labels:  can

Project Finished - moving on to

Teslonda Server App

The Teslonda Dash consists of a two RaspberryPi 3s running Raspberian Lite, networked to each other via Ethernet.

It runs a NodeJS app that listens and parses CAN messages from an HSR controller. Sends the data via websocket to to the Teslonda Front-end.

It also servers the front up via NodeJS Express.

Backend Server for Teslonda Dash

Workflow

  1. Compile Teslonda Front-end
  2. Copy to the public/dist directory on the server of the Raspberry Pi3
  3. Run the server!

Quick note:

This was a pet project that was made in rapid prototype fashion due to massive time constraints; there are no tests, there are plenty of style guide violations as this was my first NodeJs project. This was uploaded without curation so I apologize for the possible curse words, bugs and bad form you might come across. There are no hard-tabs though, so there is that.

This comes preloaded with a version of the Teslonda Dash ready to rumble.

Overview

This launches a webserver that will serve up the Front-end dash content as well as launch a Node app that will listen to CAN from a HSR (look up Jason Hughes HSR) Controller.

Web Socket packets

It's imporant to group data up in "frame" packets; deliver relevant data every 16ms (equilivant to 60fps) as to not drown the front-end in data; the Raspberry Pi 3 is pretty dang capable but when a busy clunky frontend like a chromium web-app receives socket data, a lot happens each time data comes in, and will quickly bog things down if it isn't regulated.

Install

  • on your raspberry pi
  1. copy all contents to can-server
  2. Prepare Dev enviroment on RPI: run ./RPI_system/prepare_dev.sh
  3. Or prepare production environment: run ./RPI_system/prepare_production.sh

General

  • The front-end web content (Teslonda Front-end) is stored in public/dist.
  • npm run vcan_server - virtual-CAN and test server
  • npm run can_server - CAN server
  • Teslonda Front-end served onlocalhost:3333
  • Websocket Server listening to localhost:4000

To Debug Live

  • npm run can_server - to get main web server and can server up and running
  • Get the Pi's IP
  • On your local pc, navigate to [pi's ip]:3333
  • Modify App code in Comm service to connect to [pi's ip]:4000

Additional Setup (PiCAN2)

PiCAN2 Device Overlays

  1. Enable SPI either through raspi-config or add dtparam=spi=on to /boot/config.txt
  2. put the following in /boot/config.txt
#CAN bus controllers
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25
dtoverlay=spi-bcm2835-overlay

to auto-start CAN interface on bootup for Rasperry Pi

  1. sudo nano /etc/network/interfaces
  2. Paste this
auto can0
iface can0 inet manual
   pre-up /sbin/ip link set can0 type can bitrate 500000 triple-sampling on
   up /sbin/ifconfig can0 up
   down /sbin/ifconfig can0 down

NETWORKING SETUP

https://gist.github.com/Mathews2115/3be0b1173be222e73ba4d8181558d409

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].