Skip to content

This feature allows you to view the exact cost of your electricity usage if you have any Shelly power monitoring device installed.

License

Notifications You must be signed in to change notification settings

LeivoSepp/Shelly-Live-Tariff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shelly Live Tariff Script

This feature allows you to view the exact cost of your electricity usage if you have any Shelly power monitoring device installed.

Shelly Live Tariff

Features

This Shelly script automates electricity tariffs in the Shelly cloud by retrieving energy market prices from Elering and updating the Live Tariff hourly.

  • Retrieves electricity market prices from Elering.
  • Updates Shelly cloud with Live Tariffs hourly.
  • Supports multiple network packages and countries.
  • Stores user settings in Shelly KVS or Virtual components (gen2 Pro or gen3 devices).
  • Automatically starts on boot.

Installation

New installation

  1. Copy the contents of ShellyLiveTariff.js to your Shelly device's script editor.
  2. Configure the following settings:
    • networkPacket: Choose the appropriate network package (e.g., VORK2, Partner24, etc.).
    • country: Set the country code (e.g., ee for Estonia, fi for Finland, etc.).
    • apiUrl: Set your Shelly Cloud token.

Reinstall

To initiate reinstallation of the script, navigate to the KVS store and delete the parameter version. After the script starts, it performs a clean installation.

Script Configuration

Shelly Gen2 Pro and Gen3 devices support Virtual Components, with all settings managed directly through the Shelly web page or mobile app.

Enable Shelly Live Tariff

Older Shelly devices (Gen2) support the KVS store, and their settings can be modified via the device's web page using its IP address: Menu → Advanced → KVS.

Enable Shelly Live Tariff

Live Tariff Configuration

Configure Shelly cloud to use Live Tariff

  1. Open Shelly web portal
  2. Select Energy -> Electricity Tariff
  3. Under Tariff select Live
  4. Copy API URL and paste it to Live Tariff settings.

Enable Shelly Live Tariff

Usage

Device configuration

There are various ways to configure Shelly devices to ensure the Shelly Cloud energy measurement and cost reports appears accurate and well-organized.

  1. Shelly Pro 3EM + Individual Shelly Power Monitoring Devices in the Same Room.
    To avoid double-counting energy costs at the room or total account level, devices must be configured properly:
    • Configure Shelly Pro 3EM to include power monitoring in both the room and total account levels.
    • Configure other Shelly monitoring devices in the same room to exclude their data from the total room and total account energy.
Shelly Live Tariff Shelly Live Tariff
  1. Shelly Pro 3 EM at Account level + Individual Shelly Power Monitoring Devices in the Different Rooms.
    To avoid missing energy costs at the room or double-counting at the total account level, devices must be configured properly:
    • Configure Shelly Pro 3EM to include power monitoring in total account level.
    • Configure other Shelly monitoring devices to include their data fom the total room and exclude from total account energy.
Shelly Live Tariff Shelly Live Tariff
  1. Individual Shelly Power Monitoring Devices in the Different Rooms. Account level measurement is missing.
    To avoid missing energy costs at the total account level, devices must be configured properly:
    • Configure every Shelly monitoring devices to include power monitoring in both the room and total account levels.

Cost monitoring

There are many ways to explore the electricity usage cost.

  1. Total Cost. Open the Shelly Cloud Total Energy history to explore the total cost across your entire energy usage.

Shelly Live Tariff

  1. Room Cost. Open the Shelly Cloud Total Energy history and scroll down to explore the energy cost for any individual room.

Shelly Live Tariff

  1. Phase Cost. This feature is available only if you have a Shelly Pro 3EM. Open the Shelly device consumption page and hover over the graph with your mouse or finger to explore the individual phase and total energy costs passing through the device.

Shelly Live Tariff

  1. Device Cost. Open the consumption page of any power monitoring Shelly device to explore the cost at the device level.

Enable Shelly Live Tariff

Script Monitoring

  • The field Live Tariff updated in Virtual Components and KVS is updated whenever the tariff is sent to the Shelly Live Tariff cloud.

  • The field lastcalculation in KVS is updated whenever electricity prices are pulled from Elering.

  • The script will automatically run and update the Shelly Cloud Live Tariffs on an hourly basis.

  • To modify user settings, access the Shelly KVS via the Shelly web page: Menu → Advanced → KVS.

  • If your Shelly device supports Virtual components, you can modify settings directly from the Shelly web page or Shelly mobile app.

Network Packages

The script supports the following network packages from Elektrilevi and Imatra:

  • VORK1
  • VORK2
  • VORK4
  • VORK5
  • Partner24
  • Partner24Plus
  • Partner12
  • Partner12Plus
  • NONE

Supported Countries

  • ee (Estonia)
  • fi (Finland)
  • lv (Latvia)
  • lt (Lithuania)

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

Created by Leivo Sepp, 07.01.2025

GitHub Repository

About

This feature allows you to view the exact cost of your electricity usage if you have any Shelly power monitoring device installed.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published