This code works if you live in Estonia ๐ช๐ช, Lithuania ๐ฑ๐ป, Latvia ๐ฑ๐น or Finland ๐ซ๐ฎ. Just change the country code in the API endpoint.
Make sure your Shelly device is connected to the Internet and accessible from LAN.
- Login to the cloud โ๏ธ
- Find device
- Click settings
- Device information
- Device IP This should open in a new browser window with local access to Shelly's device.
- Click on Scripts button
- Open Libary modular
- Push Configure URL button
- Paste URL
https://raw.githubusercontent.com/martinkangur/shelly/main/SHELLY_MJS.md - Click on desired script
Find api_endpoint and change #COUNTRY_CODE# ๐ to ee, lv, lt or fi
api_endpoint: "https://dashboard.elering.ee/api/nps/price/#COUNTRY_CODE#/current"
Find configuration value price_limit will be set when your device turns on or off. Prices donโt include VAT and are measured in EUR/MWh
price_limit: 200
Will set toggling threshold for the device to 200 EUR/MWh
Most shelly devices have only one output(relay). If you want to change the output channel find switchId and set it to the desired output.
