{"id":49090579,"url":"https://github.com/mkrasselt1/ve.bus-library","last_synced_at":"2026-04-20T18:04:34.131Z","repository":{"id":350963585,"uuid":"1207991101","full_name":"mkrasselt1/ve.bus-library","owner":"mkrasselt1","description":" ESP32 Arduino/PlatformIO library for Victron Multiplus VE.Bus RS485 communication","archived":false,"fork":false,"pushed_at":"2026-04-20T10:17:40.000Z","size":99,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-20T12:29:59.028Z","etag":null,"topics":["arduino","esp32","ess","inverter","multiplus","platformio","rs485","vebus","victron"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkrasselt1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-11T17:11:00.000Z","updated_at":"2026-04-20T10:17:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mkrasselt1/ve.bus-library","commit_stats":null,"previous_names":["mkrasselt1/ve.bus-library"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mkrasselt1/ve.bus-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkrasselt1%2Fve.bus-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkrasselt1%2Fve.bus-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkrasselt1%2Fve.bus-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkrasselt1%2Fve.bus-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkrasselt1","download_url":"https://codeload.github.com/mkrasselt1/ve.bus-library/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkrasselt1%2Fve.bus-library/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32059140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["arduino","esp32","ess","inverter","multiplus","platformio","rs485","vebus","victron"],"created_at":"2026-04-20T18:04:33.461Z","updated_at":"2026-04-20T18:04:34.112Z","avatar_url":"https://github.com/mkrasselt1.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VEBus — ESP32 Arduino Library for Victron Multiplus\n\nPlatformIO / Arduino library for communicating with a **Victron Multiplus** inverter/charger over **VE.Bus RS485** from an ESP32.\n\nTested on the **[LilyGo T-CAN485](https://github.com/Xinyuan-LilyGO/T-CAN485)** board.\n\n## Credits \u0026 Sources\n\nThis library is a clean-room refactor of the excellent work by **PepeTheFroggie**:\n\n\u003e **[Victron-VE.Bus---esp32](https://github.com/PepeTheFroggie/Victron-VE.Bus---esp32)**\n\u003e Full ESS firmware for ESP32 including WiFi dashboard, Shelly power meter\n\u003e integration, SoC tracking, and VE.Bus protocol implementation.\n\nProtocol reference and additional features derived from:\n\n\u003e **[j9brown/victron-mk3](https://github.com/j9brown/victron-mk3)**\n\u003e Python Home Assistant component via MK3 USB — comprehensive VE.Bus\n\u003e protocol implementation including device state control, RAM/setting\n\u003e read/write, and firmware version queries.\n\n\u003e **[pv-baxi/esp32ess](https://github.com/pv-baxi/esp32ess)**\n\u003e ESP32 ESS controller with extensive protocol documentation.\n\n\u003e **[Victron MK2 Protocol v3.14](https://www.victronenergy.com/upload/documents/Technical-Information-Interfacing-with-VE-Bus-products-MK2-Protocol-3-14.pdf)**\n\u003e Official Victron protocol specification.\n\n## Features\n\n- Internal FreeRTOS task handles all RS485 RX/TX with correct sync timing\n- Thread-safe command queue — call any command from any core\n- **ESS power setpoint** with automatic acknowledgement tracking\n- **Flexible RAM variable reading** — read any combination of up to 6 RAM variables per request\n- **Setting read/write** — read and write all Multiplus configuration settings\n- **Device state control** — query state, force absorption/float/equalise\n- **Switch state control** — on, off, charger-only, inverter-only\n- **Firmware version** query (auto-chained two-part request)\n- **Setting \u0026 RAM variable info** — query scale, offset, default, min, max\n- Decodes charger/inverter status, LED bitmask, DC current, temperature, AC input limits\n- Auto-direction support for MAX13487E transceiver\n- Comprehensive constants for RAM IDs, setting IDs, device states, LED/switch bitmasks\n\n## ESS Setpoint Semantics\n\nThe setpoint controls power exchange on the **AC-IN (grid) side**, not AC-OUT:\n\n| Value | Effect |\n|-------|--------|\n| `+300` | Invert 300 W from battery toward grid (reduces import / feeds back) |\n| `-300` | Charge battery with 300 W from grid |\n| `0` | Standby — grid pass-through only |\n\n## Hardware — LilyGo T-CAN485\n\nThe T-CAN485 uses a **MAX13487E** RS485 transceiver with auto-direction\n(no DE pin — the driver enables automatically when data is sent).\n\n| Signal | GPIO | MAX13487E Pin |\n|--------|------|---------------|\n| RS485 RX | 21 | RO (pin 1) |\n| RS485 TX | 22 | DI (pin 4) |\n| /RE (receiver enable) | 17 | /RE (pin 2) — active-low, used as RTS |\n| /SHDN (shutdown) | 19 | /SHDN (pin 3) — **must be driven HIGH!** |\n\n\u003e **Important:** GPIO 19 controls the transceiver shutdown pin. If left\n\u003e floating or driven LOW, the transceiver is completely off (no RX or TX).\n\u003e The example calls `digitalWrite(19, HIGH)` in `setup()` before\n\u003e `vebus.begin()`.\n\n### Hardware modification required\n\nThe T-CAN485 has **100pF capacitors (C9, C11)** and a **common-mode choke\n(L2)** on the RS485 A/B lines. These are designed for typical Modbus speeds\n(9600–19200 baud) but can cause signal integrity issues at the VE.Bus baud\nrate of **256000 baud**.\n\n**Remove the following components** near the RS485 transceiver for reliable\noperation at 256 kbaud:\n\n- **C9** (100pF) — on the B line\n- **C11** (100pF) — on the A line\n- **L2** (SDCW3225S-2-102TF, common-mode choke) — between transceiver and connector\n\nThe 120Ω termination resistor (R6) and TVS protection diodes can stay.\n\n### Wiring\n\nConnect **3 wires** between the T-CAN485 screw terminals and the Multiplus\nVE.Bus RJ45 connector:\n\n| T-CAN485 | Multiplus VE.Bus RJ45 |\n|----------|-----------------------|\n| A | Pin 3 (Data+) |\n| B | Pin 4 (Data−) |\n| GND | Pin 5 (GND) |\n\n\u003e **RS485 requires a ground connection.** Without GND the common-mode voltage\n\u003e drifts and the receiver reads noise.\n\n## Quick Start\n\n```cpp\n#include \u003cVEBus.h\u003e\n\nVEBus vebus;\n\nvoid setup() {\n    pinMode(19, OUTPUT);\n    digitalWrite(19, HIGH);      // enable MAX13487E (/SHDN HIGH)\n    vebus.begin(21, 22, 17);    // RX, TX, /RE — LilyGo T-CAN485\n}\n\nvoid loop() {\n    // Queue commands — the library sends them at the right time\n    vebus.setESSPower(300);      // push 300 W from battery toward grid\n    vebus.requestReadRAM();      // request battery voltage + AC power\n\n    if (vebus.hasNewData()) {\n        vebus.clearNewData();\n        Serial.printf(\"Bat: %.2f V  AC: %d W\\n\",\n                      vebus.getBatVolt(), vebus.getACPower());\n    }\n    delay(5000);\n}\n```\n\n### Reading extended RAM variables\n\n```cpp\n// Read mains voltage, mains current, inverter voltage, output power\nconst uint8_t ids[] = {\n    VEBUS_RAM_UMAINS_RMS, VEBUS_RAM_IMAINS_RMS,\n    VEBUS_RAM_UINVERTER_RMS, VEBUS_RAM_OUTPUT_POWER\n};\nvebus.readRAMVars(ids, 4);\n\n// Later, check for response:\nif (vebus.hasRAMVarResponse()) {\n    for (int i = 0; i \u003c vebus.getRAMVarCount(); i++)\n        Serial.printf(\"  RAM[%d] = %d\\n\", i, vebus.getRAMVarValue(i));\n    vebus.clearRAMVarResponse();\n}\n```\n\n### Reading and writing settings\n\n```cpp\n// Read absorption voltage (setting ID 2)\nvebus.readSetting(VEBUS_SETTING_UBAT_ABSORPTION);\n\nif (vebus.hasSettingResponse()) {\n    // Raw value /100 = volts (e.g. 5680 = 56.80 V)\n    Serial.printf(\"Absorption: %.2f V\\n\", vebus.getSettingValue() / 100.0f);\n    vebus.clearSettingResponse();\n}\n\n// Write AC input current limit (setting ID 6)\nvebus.writeSetting(VEBUS_SETTING_IMAINS_LIMIT, 160);  // 16.0 A\n```\n\n### Device state and switch control\n\n```cpp\n// Query device state\nvebus.requestDeviceState();\nif (vebus.hasDeviceStateResponse()) {\n    Serial.printf(\"State: %d  Sub: %d\\n\",\n                  vebus.getDeviceState(), vebus.getDeviceSubState());\n    vebus.clearDeviceStateResponse();\n}\n\n// Force charge mode\nvebus.forceDeviceState(VEBUS_FORCE_ABSORPTION);\nvebus.forceDeviceState(VEBUS_FORCE_FLOAT);\n\n// Switch modes\nvebus.setSwitchState(VEBUS_SWITCH_STATE_ON);            // charger + inverter\nvebus.setSwitchState(VEBUS_SWITCH_STATE_CHARGER_ONLY);  // charger only\nvebus.setSwitchState(VEBUS_SWITCH_STATE_INVERTER_ONLY); // inverter only\nvebus.setSwitchState(VEBUS_SWITCH_STATE_OFF);            // both off (sleep)\n```\n\n## Examples\n\n### `basic_ess` — Serial console control\n\nFull example with automatic no-sync recovery and interactive serial commands:\n\n| Serial input | Action |\n|-------------|--------|\n| `\u003cnumber\u003e` | Set ESS power (-1875..1875 W) |\n| `w` | Wakeup (switch ON) |\n| `s` | Sleep (switch OFF) |\n| `co` | Charger-only mode |\n| `io` | Inverter-only mode |\n| `v` | Request firmware version |\n| `d` | Request device state |\n| `r` | Read extended RAM (mains V/A, inverter V/A, output W, SoC) |\n| `fa` | Force absorption |\n| `ff` | Force float |\n| `fe` | Force equalise |\n| `rs \u003cid\u003e` | Read setting by ID |\n| `ws \u003cid\u003e \u003cval\u003e` | Write setting |\n| `ri \u003cid\u003e` | Query RAM variable info (scale/offset) |\n| `si \u003cid\u003e` | Query setting info (scale/offset/default/min/max) |\n| `h` | Show help |\n\n### `mqtt_ha` — MQTT with Home Assistant auto-discovery\n\nPublishes all Multiplus data as HA entities. RAM variables are read in two\nbatches per cycle (6 + 4 IDs), device state is polled once per cycle.\n\n**Sensors (23):**\n\n| Sensor | Source | Unit |\n|--------|--------|------|\n| Battery Voltage | `getBatVolt()` | V |\n| AC Power | `getACPower()` | W |\n| DC Current | `getDCCurrent()` | A |\n| Temperature | `getTemp()` | °C |\n| Charger Status | `getChargerStatus()` | — |\n| ESS Power | local setpoint | W |\n| Mains Voltage | RAM ID 0 | V |\n| Mains Current | RAM ID 1 | A |\n| Inverter Voltage | RAM ID 2 | V |\n| Inverter Current | RAM ID 3 | A |\n| Output Power | RAM ID 16 | W |\n| Mains Power | RAM ID 15 | W |\n| Battery Current | RAM ID 5 | A |\n| State of Charge | RAM ID 13 | % |\n| Mains Frequency | RAM ID 8 | Hz |\n| Inverter Frequency | RAM ID 7 | Hz |\n| LED On / LED Blink | `getLEDon()` / `getLEDblink()` | — |\n| AC Input Min / Max / Actual | `getMin/Max/ActInputCurrentLimit()` | A |\n| AC Input Config | `getAcInputConfiguration()` | — |\n| Device State | `requestDeviceState()` | — |\n| Charge Sub-State | `getDeviceSubState()` | — |\n| Checksum Faults | `getChecksumFaults()` | — |\n\n**Binary Sensors (2):**\n\n| Sensor | Source |\n|--------|--------|\n| VE.Bus Sync | `hasNoSync()` |\n| DC Allows Inverting | `dcLevelAllowsInverting()` |\n\n**Controls (8):**\n\n| Entity | Type | Details |\n|--------|------|---------|\n| ESS Power Setpoint | Number | -1875..1875 W |\n| Switch State | Select | on / off / charger_only / inverter_only |\n| Wakeup Multiplus | Button | — |\n| Sleep Multiplus | Button | — |\n| Force Absorption | Button | — |\n| Force Float | Button | — |\n| Force Equalise | Button | — |\n\nFirmware version is published once (retained) at MQTT connect.\n\n### `raw_test` — RS485 hardware test\n\nMinimal hex dumper that bypasses the library — useful for verifying RS485 wiring.\n\n## PlatformIO\n\nThe `platformio.ini` at the repo root has environments for all examples:\n\n```bash\npio run -e basic_ess    # Serial console ESS control\npio run -e mqtt_ha      # MQTT → Home Assistant\n```\n\n## API Reference\n\n### Initialisation\n\n```cpp\nvoid begin(int rxPin, int txPin, int dePin, int core = 0);\n```\n\nStarts UART at 256000 baud and launches an internal FreeRTOS task on the\nspecified core (default: 0). The task runs a tight loop with no delay to\ncatch sync timing.\n\n### ESS Power\n\n```cpp\nvoid setESSPower(int16_t watts);\n```\n\nQueue an ESS power setpoint. Resets the command queue first (only the\nlatest setpoint matters). Must be sent at least every 60 seconds or the\nMultiplus enters passthrough mode.\n\n### Legacy RAM Read\n\n```cpp\nvoid requestReadRAM();           // request battery voltage + AC power\nfloat   getBatVolt();            // battery voltage [V]\nint16_t getACPower();            // AC power [W], positive = inverting\nbool    hasNewData();            // response arrived\nvoid    clearNewData();\n```\n\n### Flexible RAM Variable Read\n\n```cpp\nvoid readRAMVars(const uint8_t *ids, uint8_t count);  // up to 6 IDs\nbool    hasRAMVarResponse();\nvoid    clearRAMVarResponse();\nuint8_t getRAMVarCount();\nint16_t getRAMVarValue(uint8_t index);  // 0..count-1\n```\n\n### RAM Variable Write\n\n```cpp\nvoid writeRAMVar(uint8_t id, uint16_t value);\n```\n\nWrites to RAM only (no EEPROM). The acknowledgement is signalled via `isAcked()`.\n\n### Setting Read\n\n```cpp\nvoid readSetting(uint8_t id);\nbool     hasSettingResponse();\nvoid     clearSettingResponse();\nuint8_t  getSettingId();\nuint16_t getSettingValue();\n```\n\n### Setting Write\n\n```cpp\nvoid writeSetting(uint8_t id, uint16_t value);\nbool isSettingWriteAcked();\nvoid clearSettingWriteAcked();\n```\n\nWrites to both RAM and EEPROM (persistent across power cycles).\n\n### Switch State\n\n```cpp\nvoid setSwitchState(VEBusSwitchState state);\nvoid requestSleep();   // shorthand for VEBUS_SWITCH_STATE_OFF\nvoid requestWakeup();  // shorthand for VEBUS_SWITCH_STATE_ON\n```\n\n### Device State\n\n```cpp\nvoid requestDeviceState();\nvoid forceDeviceState(VEBusForceState action);\nbool    hasDeviceStateResponse();\nvoid    clearDeviceStateResponse();\nuint8_t getDeviceState();     // see VEBusDeviceState enum\nuint8_t getDeviceSubState();  // see VEBusChargeSubState enum (when state=Charge)\n```\n\n### Firmware Version\n\n```cpp\nvoid requestVersion();         // auto-chains part 0 → part 1\nbool     hasVersionResponse();\nvoid     clearVersionResponse();\nuint16_t getVersionLow();\nuint16_t getVersionHigh();\n```\n\n### Setting \u0026 RAM Variable Info\n\n```cpp\nvoid requestSettingInfo(uint8_t id);\nbool hasSettingInfoResponse();\nvoid clearSettingInfoResponse();\nconst VEBusSettingInfo\u0026 getSettingInfo();\n// VEBusSettingInfo: { id, scale, offset, defaultValue, minimum, maximum }\n\nvoid requestRAMVarInfo(uint8_t id);\nbool    hasRAMVarInfoResponse();\nvoid    clearRAMVarInfoResponse();\nuint8_t getRAMVarInfoId();\nint16_t getRAMVarInfoScale();\nint16_t getRAMVarInfoOffset();\n```\n\n### Broadcast Data (decoded from periodic Multiplus frames)\n\nThese values are updated continuously without sending any commands:\n\n```cpp\n// Frame 0x80 — Charger/Inverter condition\nfloat getDCCurrent();              // battery current [A]\nfloat getTemp();                   // device temperature [°C]\nbyte  getChargerStatus();          // operating mode byte\nbool  dcLevelAllowsInverting();    // battery voltage sufficient?\n\n// Frame 0x41 — MasterMultiLED\nbyte  getLEDon();                  // LED on bitmask (VEBUS_LED_*)\nbyte  getLEDblink();               // LED blink bitmask\nbyte  getLEDstatus();              // status register\nbyte  getAcInputConfiguration();   // AC input config byte\nfloat getMinInputCurrentLimit();   // min AC input limit [A]\nfloat getMaxInputCurrentLimit();   // max AC input limit [A]\nfloat getActInputCurrentLimit();   // actual AC input limit [A]\nbyte  getSwitchRegister();         // switch register (VEBUS_SWITCH_*)\n```\n\n### Status\n\n```cpp\nbool     hasNoSync();          // no sync frame for \u003e 1 s\nbool     isAcked();            // last write command acknowledged\nvoid     clearAcked();\nuint32_t getChecksumFaults();  // RX checksum error counter\n```\n\n## Constants Reference\n\n### RAM Variable IDs (`VEBUS_RAM_*`)\n\n| ID | Constant | Description |\n|----|----------|-------------|\n| 0 | `VEBUS_RAM_UMAINS_RMS` | Mains voltage RMS (V) |\n| 1 | `VEBUS_RAM_IMAINS_RMS` | Mains current RMS (A) |\n| 2 | `VEBUS_RAM_UINVERTER_RMS` | Inverter output voltage RMS (V) |\n| 3 | `VEBUS_RAM_IINVERTER_RMS` | Inverter output current RMS (A) |\n| 4 | `VEBUS_RAM_UBAT` | Battery voltage (V) |\n| 5 | `VEBUS_RAM_IBAT` | Battery current (A, signed) |\n| 6 | `VEBUS_RAM_UBAT_RMS` | Battery ripple voltage |\n| 7 | `VEBUS_RAM_INVERTER_PERIOD` | Inverter period (Hz = 10/value) |\n| 8 | `VEBUS_RAM_MAINS_PERIOD` | Mains period (Hz = 10/value) |\n| 9 | `VEBUS_RAM_SIGNED_AC_LOAD_CUR` | Signed AC load current |\n| 10 | `VEBUS_RAM_VIRTUAL_SWITCH` | Virtual switch position |\n| 11 | `VEBUS_RAM_IGNORE_AC_INPUT` | Ignore AC input state |\n| 12 | `VEBUS_RAM_RELAY_STATE` | Multi-functional relay state |\n| 13 | `VEBUS_RAM_CHARGE_STATE` | State of charge (~0.5% res.) |\n| 14 | `VEBUS_RAM_INVERTER_POWER` | Inverter power, filtered (W) |\n| 15 | `VEBUS_RAM_MAINS_POWER` | Mains power, filtered (W) |\n| 16 | `VEBUS_RAM_OUTPUT_POWER` | Output power, filtered (W) |\n| 17 | `VEBUS_RAM_INVERTER_POWER_UF` | Inverter power, unfiltered |\n| 18 | `VEBUS_RAM_MAINS_POWER_UF` | Mains power, unfiltered |\n| 19 | `VEBUS_RAM_OUTPUT_POWER_UF` | Output power, unfiltered |\n\n\u003e Use `requestRAMVarInfo(id)` to query the per-device scale and offset for\n\u003e converting raw values to physical units. Typical: voltage ×0.01, current ×0.1.\n\n### Setting IDs (`VEBUS_SETTING_*`)\n\n| ID | Constant | Description |\n|----|----------|-------------|\n| 0 | `VEBUS_SETTING_FLAGS0` | Primary flags (16-bit bitmask) |\n| 1 | `VEBUS_SETTING_FLAGS1` | Secondary flags |\n| 2 | `VEBUS_SETTING_UBAT_ABSORPTION` | Absorption voltage (raw/100 = V) |\n| 3 | `VEBUS_SETTING_UBAT_FLOAT` | Float voltage (raw/100 = V) |\n| 4 | `VEBUS_SETTING_IBAT_BULK` | Bulk charge current (A) |\n| 5 | `VEBUS_SETTING_UINV_SETPOINT` | Inverter output voltage |\n| 6 | `VEBUS_SETTING_IMAINS_LIMIT` | AC input 1 current limit |\n| 7 | `VEBUS_SETTING_REPEATED_ABSORPTION_TIME` | Repeated absorption time |\n| 8 | `VEBUS_SETTING_REPEATED_ABSORPTION_INTERVAL` | Repeated absorption interval |\n| 9 | `VEBUS_SETTING_MAX_ABSORPTION_DURATION` | Max absorption duration |\n| 10 | `VEBUS_SETTING_CHARGE_CHARACTERISTIC` | 0=variable, 1=fixed, 2=fixed+storage |\n| 11 | `VEBUS_SETTING_UBAT_LOW_LIMIT` | Low battery cutoff (raw/100 = V) |\n| 12 | `VEBUS_SETTING_UBAT_LOW_HYSTERESIS` | Low battery hysteresis |\n| 13 | `VEBUS_SETTING_NUM_SLAVES` | Number of slaves connected |\n| 14 | `VEBUS_SETTING_THREE_PHASE` | 0=3ph, 1=split 180°, 2=2-leg 120° |\n| 44 | `VEBUS_SETTING_LOWEST_UMAINS` | Minimum acceptable mains voltage |\n| 46 | `VEBUS_SETTING_HIGHEST_UMAINS` | Maximum acceptable mains voltage |\n| 49 | `VEBUS_SETTING_IMAINS_LIMIT_AC2` | AC input 2 current limit |\n| 60 | `VEBUS_SETTING_FLAGS2` | Additional flags |\n| 61 | `VEBUS_SETTING_FLAGS3` | Additional flags |\n| 64 | `VEBUS_SETTING_BATTERY_CAPACITY` | Battery capacity |\n| 81 | `VEBUS_SETTING_GRID_CODE` | Grid code (0=none, 1=active) |\n\n\u003e Use `requestSettingInfo(id)` to query scale, offset, default, min, and max\n\u003e values for any setting.\n\n### Device States (`VEBusDeviceState`)\n\n| Value | Constant | Description |\n|-------|----------|-------------|\n| 0 | `VEBUS_STATE_DOWN` | System down |\n| 1 | `VEBUS_STATE_STARTUP` | Starting up |\n| 2 | `VEBUS_STATE_OFF` | Switched off |\n| 3 | `VEBUS_STATE_SLAVE` | Slave mode |\n| 4 | `VEBUS_STATE_INVERT_FULL` | Inverting (full) |\n| 5 | `VEBUS_STATE_INVERT_HALF` | Inverting (half) |\n| 6 | `VEBUS_STATE_INVERT_AES` | Inverting (AES) |\n| 7 | `VEBUS_STATE_POWER_ASSIST` | Power assist |\n| 8 | `VEBUS_STATE_BYPASS` | Bypass / passthrough |\n| 9 | `VEBUS_STATE_CHARGE` | Charging (see sub-states) |\n\n### Charge Sub-States (`VEBusChargeSubState`)\n\n| Value | Constant | Description |\n|-------|----------|-------------|\n| 0 | `VEBUS_CHARGE_INIT` | Initialising |\n| 1 | `VEBUS_CHARGE_BULK` | Bulk charge |\n| 2 | `VEBUS_CHARGE_ABSORPTION` | Absorption charge |\n| 3 | `VEBUS_CHARGE_FLOAT` | Float charge |\n| 4 | `VEBUS_CHARGE_STORAGE` | Storage mode |\n| 5 | `VEBUS_CHARGE_REPEATED_ABSORPTION` | Repeated absorption |\n| 6 | `VEBUS_CHARGE_FORCED_ABSORPTION` | Forced absorption |\n| 7 | `VEBUS_CHARGE_EQUALISE` | Equalisation |\n| 8 | `VEBUS_CHARGE_BULK_STOPPED` | Bulk stopped |\n\n### Switch States (`VEBusSwitchState`)\n\n| Value | Constant | Description |\n|-------|----------|-------------|\n| 0x04 | `VEBUS_SWITCH_STATE_OFF` | Both charger and inverter off |\n| 0x05 | `VEBUS_SWITCH_STATE_CHARGER_ONLY` | Charger on, inverter off |\n| 0x06 | `VEBUS_SWITCH_STATE_INVERTER_ONLY` | Inverter on, charger off |\n| 0x07 | `VEBUS_SWITCH_STATE_ON` | Both charger and inverter on |\n\n### Force States (`VEBusForceState`)\n\n| Value | Constant | Description |\n|-------|----------|-------------|\n| 0 | `VEBUS_FORCE_INQUIRY` | Read state only |\n| 1 | `VEBUS_FORCE_EQUALISE` | Force equalisation charge |\n| 2 | `VEBUS_FORCE_ABSORPTION` | Force absorption charge |\n| 3 | `VEBUS_FORCE_FLOAT` | Force float charge |\n\n### LED Bitmask (`VEBUS_LED_*`)\n\n| Bit | Constant | LED |\n|-----|----------|-----|\n| 0 | `VEBUS_LED_MAINS_ON` | Mains present |\n| 1 | `VEBUS_LED_ABSORPTION` | Absorption charging |\n| 2 | `VEBUS_LED_BULK` | Bulk charging |\n| 3 | `VEBUS_LED_FLOAT` | Float charging |\n| 4 | `VEBUS_LED_INVERTER_ON` | Inverter active |\n| 5 | `VEBUS_LED_OVERLOAD` | Overload warning |\n| 6 | `VEBUS_LED_LOW_BATTERY` | Low battery warning |\n| 7 | `VEBUS_LED_TEMPERATURE` | Temperature warning |\n\n### Switch Register Bitmask (`VEBUS_SWITCH_*`)\n\n| Bit | Constant | Meaning |\n|-----|----------|---------|\n| 0 | `VEBUS_SWITCH_REMOTE_CHARGE` | Remote interface charger state |\n| 1 | `VEBUS_SWITCH_REMOTE_INVERT` | Remote interface inverter state |\n| 2 | `VEBUS_SWITCH_FRONT_UP` | Front panel switch UP |\n| 3 | `VEBUS_SWITCH_FRONT_DOWN` | Front panel switch DOWN |\n| 4 | `VEBUS_SWITCH_CHARGE` | Active: charger enabled |\n| 5 | `VEBUS_SWITCH_INVERT` | Active: inverter enabled |\n| 6 | `VEBUS_SWITCH_ONBOARD_REMOTE_INV` | Onboard remote inverter switch |\n| 7 | `VEBUS_SWITCH_REMOTE_GENERATOR` | Remote generator selected |\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n\nOriginal firmware by PepeTheFroggie, MIT licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkrasselt1%2Fve.bus-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkrasselt1%2Fve.bus-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkrasselt1%2Fve.bus-library/lists"}