{"id":13569831,"url":"https://github.com/Tiggilyboo/vanny-hub","last_synced_at":"2025-04-04T06:31:15.964Z","repository":{"id":44736842,"uuid":"360229648","full_name":"Tiggilyboo/vanny-hub","owner":"Tiggilyboo","description":"My van's embedded monitoring platform, using Modbus over RS-485 and RS-232.","archived":false,"fork":false,"pushed_at":"2022-11-09T21:40:17.000Z","size":1140,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-05T02:35:55.017Z","etag":null,"topics":["embedded","monitoring","rasberry-pi-pico","renogy","rs-232","rs-485","waveshare-eink"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tiggilyboo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-21T16:04:19.000Z","updated_at":"2023-08-01T17:29:44.000Z","dependencies_parsed_at":"2023-01-22T14:30:29.354Z","dependency_job_id":null,"html_url":"https://github.com/Tiggilyboo/vanny-hub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tiggilyboo%2Fvanny-hub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tiggilyboo%2Fvanny-hub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tiggilyboo%2Fvanny-hub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tiggilyboo%2Fvanny-hub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tiggilyboo","download_url":"https://codeload.github.com/Tiggilyboo/vanny-hub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247134405,"owners_count":20889396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embedded","monitoring","rasberry-pi-pico","renogy","rs-232","rs-485","waveshare-eink"],"created_at":"2024-08-01T14:00:44.723Z","updated_at":"2025-04-04T06:31:15.569Z","avatar_url":"https://github.com/Tiggilyboo.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# vanny-hub\n\n![Hub](https://i.imgur.com/v27shz1.jpg)\n\n## What?\nMy van's embedded monitoring platform, using Modbus over RS-485 and RS-232 on the Raspberry Pi Pico microcontroller.\n\nThis is a DIY open source project of my own creation, and as such take no responsibility for this code...\n\n## Features\n\n1. Interface with a range of Renogy Products\n  a) Renogy Rover 40A (RVR40) over Modbus RTU 232\n  b) Renogy Smart Lithium Battery (LFP100S) over Modbus RTU 485\n  c) Renogy DC-DC Battery Charger (DCC50S) over Modbus RTU 485\n2. Display information from each of these products on a WaveShare 2.9\" E-Ink display\n3. Display statistics over time (Rolling average for the hour, and after 48 hours, 7 days).\n\n## Configuration\n\n- `device-lfp10s.h`: Register mappings for the LFP100S battery\n- `device-dcc50s.h`: Register mappings for the DCC50S unit\n- `device-rvr40.h`: Register mappings for the RVR40 controller\n\n### Pinouts\n\n`devices-modbus.h` contains the various pinouts for the Raspberry Pi Pico UART pins. It makes use of both UARTs (one for modbus 485, and one for 232).\n\n```c\n#define UART_RX_TIMEOUT 1000000\n\n#define RS485_PORT      uart0\n#define RS485_BR        9600\n#define RS485_DBITS     8\n#define RS485_SBITS     1\n#define RS485_PIN_TX    0\n#define RS485_PIN_RX    1\n#define RS485_PIN_RTS   22\n\n#define RS232_PORT      uart1\n#define RS232_BR        9600\n#define RS232_DBITS     8\n#define RS232_SBITS     1\n#define RS232_PIN_TX    4\n#define RS232_PIN_RX    5\n```\n\n`vanny-hub.h` contains the modbus node configuration, as well as refresh rates and statistic storing rates, as well as the GPIO pin used for changing the screen view.\n\n```c\n#define _VERBOSE\n\n#define LED_PIN 25\n#define BTN_PIN 21\n\n//#define EPD_UPDATE_PARTIAL\n#define EPD_FULL_REFRESH_AFTER    3\n#define EPD_REFRESH_RATE_MS       60000\n\n#define RS485_DCC50S_ADDRESS      0x01\n#define RS485_LFP100S_ADDRESS     0xf7\n#define RS232_RVR40_ADDRESS       0x01\n\n#define STATS_MAX_HISTORY         168\n#define STATS_UPDATE_ROLLING_MS   10000     // (secondly)\n#define STATS_UPDATE_HISTORIC_MS  3600000  // (hourly)\n```\n\nAnd finally, the display SPI pinout configuration is defined in `display/display-ws-eink.h`\n\n```c\n#define SPI_PORT      spi1\n#define SPI_BD        4000000\n\n#define SPI_PIN_DC    8\n#define SPI_PIN_CS    9\n#define SPI_PIN_CLK   10\n#define SPI_PIN_DIN   11 // Aka. MOSI\n#define SPI_PIN_RST   12\n#define SPI_PIN_BSY   13\n```\n\n## Setup\n\nThis project uses the Raspberry Pi Pico, and as such uses it's C API as well as a modbus library (stored as git submodules). This requires the use of:\n\n```bash\n$ git submodule sync\n$ git submodule update\n```\n\nCurrently I have only written bash scripts for building and deploying the binaries (Ubuntu / Debian or Arch with minor adjustments of paths). But to use them, simply:\n\n```bash\n$ ./build.sh\n$ ./deploy.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTiggilyboo%2Fvanny-hub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTiggilyboo%2Fvanny-hub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTiggilyboo%2Fvanny-hub/lists"}