Skip to content
This repository has been archived by the owner on May 8, 2021. It is now read-only.

greendog99/rv-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RV Control

Note: This Ruby implementation is no longer being developed. Please see RVC-Monitor-Py for the Python implementation.

This project's goal is to enable two-way communication between an RV's CAN bus network and an MQTT message broker. It is not meant to be an end-to-end RV control or automation solution, but rather a foundation which other tools and projects can be built upon.

This is a from-scratch rewrite of some of the components of CoachProxyOS.

Download the complete RV-C specification for details on the protocol and its messages. This PDF file is critical for understanding how to communicate with RV-C devices.

What it does

Monitoring:

  • Receives raw RV-C messages from the CAN bus.
  • Decodes those messages into human-readable JSON objects according to the RV-C specification.
  • Decodes additional, vendor-proprietary RV-C messages (currently just a few custom messages used by Spyder Controls).
  • Publishes decoded messages to an MQTT message broker.

Controlling:

  • Receives commands from the MQTT Broker.
  • Encodes those commands into RV-C messages.
  • Sends the messages onto the CAN bus.

What it does NOT do

  • Interpretation of messages (e.g. this message means "Hallway Light").
  • Any kind of logic (e.g. do something when a certain message is recevied).
  • Any kind of user interface.

This and other functionality will be developed as a separate project.

System overview

The yellow area outlines the scope of this project. Other example components may be developed at a future date.

System Overview Diagram

Requirements

  • A computer with a CAN bus network card. This will almost always be a Raspberry Pi 3B computer with a PiCAN2 board. Install the canbus utilities:
    sudo apt -y install can-utils
    
    Add the following to the end of /boot/config.txt to enable the canbus card:
    dtparam=spi=on
    dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25
    dtoverlay=spi-bcm2835-overlay
    
  • The latest Raspberry Pi OS operating system image (Buster Lite is used for development).
  • The Ruby development environment and supporting Gems:
    sudo apt -y install ruby-dev
    sudo gem install json yaml mqtt
    
  • An MQTT message broker to communicate with. Often this will run on the same Raspberry Pi, and can be installed easily:
    sudo apt -y install mosquitto
    

Component Documentation

About

RV Monitoring and Automation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published