Shelly Script Examples

repository·main·Indexed 43 days ago

https://github.com/allterco/shelly-script-examples

A 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.

Tokens
75.2K
Snippets
140
Records
349
Agent score
56%

What's inside Shelly Script Examples

  1. Overview of VenusE Modbus Register Documentation

    main

    This directory provides a structured Markdown representation of the Modbus register maps for the Marstek VenusE device, originally sourced from the Afore Modbus.xlsx workbook. 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, and BatBrand.
    • Faults & Safety: Reference lists for fault codes, fault bits, and safety-standard enum values.
    • Protocol History: Version history and source changes.
  2. Overview of V-TAC MODBUS Examples for The Pill

    main
    This 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.
  3. Overview of MODBUS examples for Shelly devices

    main
    This 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.
  4. Overview of BLE/BLU scripts

    main
    This 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.
  5. Overview of Tasmota HTTP Integrations

    main

    Tasmota 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).
  6. Overview of Weather and Environment Automations

    main
    The weather-env collection 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.
  7. Overview of MarsRock G2 SUN Series MODBUS Examples

    main

    This 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.

  8. Overview of LoRa communication for Shelly devices

    main
    The 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.