Giter VIP home page Giter VIP logo

onyx-m2-dashboard's Introduction

This project is a React web app designed to be run on a Tesla Model 3/Y center screen. It displays live CAN bus data from the car, without any unsightly wires or auxiliary display.

It does this by hooking into the car's CAN bus under the rear console using a Macchina M2 and custom firmware (onyx-m2-firmware), which uses your phone's hotspot to connect to the onyx-m2-server, which this app connects to using the car's wireless connection (so it requires premium connectivity).

Usage

The dashboard's home panel is a configurable grid of signals widgets. You may add and remove them using the signal, resize them, and move them around the display.

Alt text

The signal viewer allows you to navigate all available signals and tap the ones you want added to the favourites panel.

Alt text

To navigate between panels, drag the main panel left to reveal the navigation menu.

Alt text

Design

The interface is designed to resemble the Tesla UI. It used the same fonts and similar styling, in both day and night mode. The background is designed to appear to be part of browser's frame to give a seamless look.

Installing

Clone the repo and install.

  git clone [email protected]:onyx-m2/onyx-m2-dashboard.git
  cd onyx-m2-dashboard
  npm install

Next configure the app by creating a .env file.

PORT=4000
REACT_APP_M2_SECURE=false
REACT_APP_M2_HOSTNAME=localhost:8080
REACT_APP_M2_AUTHORIZATION=XXX

The M2_HOSTNAME is the hostname of the Onyx M2 Server to connect to, and M2_SECURE determines if you'll connect using SSL, which is more and more of a requirement but awkward for local development. The M2_AUTHORIZATION is a shared secret between the firmware, server, and app allowing every component to authenticate. (This could be improved.)

Of course, for the car to be able to connect to the app, it needs to be available on the public internet. I recommend using ngrok for local development, although be warned you'll need two tunnels (one for this app and one for the server).

Once all this is done, start the app

  npm start

I highly recommend running a production build in the car itself, see deployment section for suggestions on how to do this.

Deployment

I currently use AWS Amplitude for deployment, and am really happy with it. It pretty much handles everything and can hook up to the GitHub repo for auto-deploying.

TODO: provide step by step instructions

If you'd rather server locally, use serve by doing npm install -g serve once, and then build and serve the app.

  npm run build
  serve -s build -l 4000

Note that the app was created with create-react-app, so any deployment tool that supports this very popular tooling should be compatible.

onyx-m2-dashboard's People

Contributors

johnmccalla avatar

Watchers

James Cloos avatar

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.