Set up a Shelly device
Shelly is a small, affordable (~15 €) smart device that is installed next to your water heater, floor heating, or other electrical appliance. It connects the appliance to your WiFi network and Optimaatti controls it automatically based on electricity price.
What is Shelly?
Shelly is a WiFi-enabled switch device that is wired into the power line of the appliance you want to control (e.g. water heater). After that, Optimaatti can turn the appliance on and off automatically. You do not need to understand the technical details — it is enough that the device is installed and connected to WiFi.
What you need
- A Shelly device (e.g. Shelly Plus 1 or Shelly Plus 1PM). Price around 15–25 €. You can buy it from online stores.
- A WiFi network (the same network your phone is connected to).
- An Optimaatti account (register for free at app.optimaatti.fi).
- The Shelly app on your phone (available in App Store / Google Play). You only need the app for the initial setup.
Step 1: Install the Shelly device
Physical installation
The Shelly device is wired into the power line of the appliance you want to control. For example, if you are controlling a water heater, the Shelly is installed between the water heater's supply wire and the circuit breaker.
After this you should see
The Shelly device's LED light blinks or stays on, which means the device has power and is ready to be connected to WiFi.
Step 2: Connect Shelly to WiFi
Use the Shelly app
- Open the Shelly app on your phone.
- The app detects the new Shelly device automatically. Press "Add Device".
- Select your WiFi network and enter the password.
- Wait for the device to connect. This takes about 30 seconds.
After this you should see
The device appears in the Shelly app as connected and you get its IP address. You can test that the device works by turning it on and off from the Shelly app.
Step 3: Connect Shelly to Optimaatti
Enter Optimaatti connection details into Shelly
- Open Optimaatti (in browser or on your phone) and go to the Connection details page.
- You will see four values: server, port, username (your email) and password.
- In the Shelly app, open the device settings, find the MQTT section and turn it on.
- Enter Optimaatti's four connection details into Shelly's MQTT settings and save. Make sure there are no extra spaces in the fields.
- Give the device a clear name in Optimaatti, for example "Water heater" or "Living room floor heating".
Easier way: the Optimaatti app
You can also add the Shelly with the Optimaatti app, which connects the device over Bluetooth or WiFi and fills in the connection settings for you — so you do not have to enter them by hand.
After this you should see
Once the Shelly has connected, it appears in the Optimaatti device list automatically within a few seconds, and you can turn it on/off from Optimaatti. The device is now ready for automation.
Step 4: Create your first automation
Creating an automation
- Open the device details in Optimaatti.
- Select what type of load the device controls (e.g. water heater, heating).
- Set the desired operating profile — for example "use cheapest electricity 6 hours per day".
- Save. Optimaatti starts controlling the device automatically.
After this you should see
The device status shows when Optimaatti turned it on and off. Electricity usage automatically shifts to the cheapest hours.
How do you know it all works?
- The Shelly device shows as green (connected) in the Optimaatti device list.
- You can turn the device on and off from Optimaatti.
- Automation is active and the device switches on during the cheapest hours.
- You can see from the device history when it was turned on.
What if something goes wrong?
What if the device does not appear in Optimaatti?
Check that you entered Optimaatti's connection details into Shelly correctly — the most common cause is an extra space after the password. Also make sure MQTT is enabled in Shelly's settings and that you use exactly the values from the Connection details page. The device should appear within a couple of minutes.
What if the device appears but does not respond to control?
Make sure the device firmware is up to date (update in the Shelly app). Also check that the physical switch is not stuck in "always on" mode.
Do I need to understand device connection settings?
You do not need to understand the technology. You enter four connection details once (the section in Shelly settings is called MQTT), after which the device works automatically. Or let the Optimaatti app fill them in for you.
Is the connection password the same as my account password?
Initially the MQTT password is the same as your Optimaatti account password. You can also set or change it separately on the Connection details page. Note: if you change your account password, the MQTT password does not change with it — and if you change the MQTT password, update the new password on all your Shelly devices, otherwise they go offline.