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.
- Automatically starts on boot.
- Copy the contents of
ShellyLiveTariff.js
to your Shelly device's script editor. - Configure the initial settings in the script:
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.
- Configure Shelly cloud to use Live Tariff
- Open Shelly web portal
- Select Energy -> Electricity Tariff
- Under Tariff select Live
- Copy API URL
- The script will automatically run daily after 23:00 to fetch and update the Live Tariffs for the following day.
- 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.
The script supports the following network packages from Elektrilevi and Imatra:
VORK1
VORK2
VORK4
VORK5
Partner24
Partner24Plus
Partner12
Partner12Plus
NONE
ee
(Estonia)fi
(Finland)lv
(Latvia)lt
(Lithuania)
This project is licensed under the MIT License. See the LICENSE file for details.
Created by Leivo Sepp, 07.01.2025