Shelly Script Examples
repository·main·Indexed 43 days ago
https://github.com/allterco/shelly-script-examplesA collection of JavaScript-based automation scripts for Gen2 and Gen3 ESP32-based Shelly devices. Includes solutions for BLE/BLU sensor integration, presence detection via BLU buttons, and the Blu Assistant for device provisioning, MQTT configuration, factory resets, and bulk Gen3 Matter updates.
What's inside Shelly Script Examples
- This project provides MODBUS-RTU scripts specifically designed for the JK-PB series BMS (commonly referred to as JK200 variants). These scripts enable reliable telemetry for pack voltage, current, State of Charge (SOC), cell data, and alarm visibility over a local bus, making the data suitable for local automation systems.
Overview of HTTP integrations in Shelly Scripts
mainThe HTTP integrations collection provides scripts for enabling Shelly devices to interact with external services. This includes capabilities for:
- Communicating with HTTP endpoints
- Sending notifications
- Exposing metrics
- Integrating with external services via HTTP requests.
Overview of VenusE Modbus Register Documentation
mainThis directory provides a structured Markdown representation of the Modbus register maps for the Marstek VenusE device, originally sourced from the
Afore Modbus.xlsxworkbook. The documentation is organized into individual files corresponding to workbook tabs, allowing developers to navigate between register maps, bitfield definitions, enum tables, and fault lists via cross-links.Key documentation areas include:
- Runtime Information: Read-only status and runtime register maps.
- Parameter Read/Write: Maps for registers that allow reading and writing parameters.
- Bitfield & Enum Definitions: Detailed definitions for specific register fields like
FuncEn,ProtectEn,Safty, andBatBrand. - Faults & Safety: Reference lists for fault codes, fault bits, and safety-standard enum values.
- Protocol History: Version history and source changes.
Overview of V-TAC MODBUS Examples for The Pill
mainThis repository provides RS485/MODBUS notes and examples specifically for V-TAC-branded energy devices used with 'The Pill'. It is designed to help installers, integrators, and developers access local telemetry and controls that might otherwise be locked behind vendor-specific clouds. Each device is organized into its own subfolder to maintain clear register maps and validation status.Overview of JKESS MODBUS Examples
mainThe JKESS area provides MODBUS-based script examples specifically for battery-related systems on The Pill. These scripts are designed to bridge the gap between battery systems that expose internal state over RS485 and local automation logic by converting battery registers into usable telemetry and control data.Overview of MODBUS examples for Shelly devices
mainThis collection provides MODBUS implementation examples for Shelly devices equipped with built-in MODBUS clients or RS485 add-ons. These scripts enable users to ingest local telemetry from inverters, batteries, meters, and plant controllers directly into Shelly logs, Virtual Components, or automation-ready values. This approach allows for local monitoring without relying on vendor cloud services.Overview of BLE/BLU scripts
mainThis collection provides scripts for connecting Shelly devices to nearby BLE (Bluetooth Low Energy) and BLU sensors and buttons. These scripts allow Shelly devices to act as gateways or event handlers, enabling local automations (like triggering scenes or webhooks) without requiring a central hub.Overview of Tasmota HTTP Integrations
mainTasmota HTTP Integrations are scripts designed to use a Shelly device as a local control layer and decision-maker, while using one or more Tasmota devices as HTTP-controlled execution endpoints.
In this architecture:
- Shelly acts as the controller: it hosts logic, schedules, and Virtual Components, stores configuration (like mode, fan speed, and temperature), and initiates HTTP requests.
- Tasmota acts as the executor: it listens on its HTTP command endpoint, receives payloads (such as
IRHVAC), and performs the physical action (such as transmitting an IR frame).
Overview of Weather and Environment Automations
mainTheweather-envcollection provides Shelly scripts designed to create automations that react to weather conditions, temperature changes, and environmental sensor data. These scripts allow Shelly devices to interact with external environmental factors to automate home or industrial processes.Overview of ComWinTop CWT-MB308V MODBUS Examples
mainThis repository provides examples for integrating the ComWinTop MB308V expansion module with The Pill using RS485 MODBUS-RTU. The scripts enable access to relay, input, and analog channels through Shelly logic and optional Virtual Components, effectively expanding the local IO capabilities of The Pill.Overview of MarsRock G2 SUN Series MODBUS Examples
mainThis collection provides scripts for interfacing with MarsRock G2 SUN Series grid-tie micro-inverters using RS485 MODBUS-RTU on 'The Pill' hardware.
Because these inverters do not provide a local API, these scripts work by polling specific MODBUS registers directly to extract telemetry such as:
- Live AC power
- Grid voltage
- DC input voltage
- Temperature
The data extracted can be used for local logging or displayed via Virtual Components without requiring cloud connectivity.
Overview of LoRa communication for Shelly devices
mainThe LoRa examples in this repository provide scripts for building long-range, low-power communication links between Shelly devices using the LoRa add-on. These scripts enable device control and data exchange over extended distances where standard Wi-Fi might be unavailable.