Before you start, make sure you have:
- Wappsto account. If you don’t have it, click here to create one.
- On/off relays or smart plugs hooked up to the light switches and electronic devices. If you don’t have any, you can start with an affordable option – Shelly plugs which also come with energy measuring and can give you additional insights into your consumption.
- On/off relays or smart plugs connected to your Wappsto account
1. Install the Blockly app
Blockly app consists of simple programming blocks that allow you to program hardware devices and create simple rules and automations.
- Log in to your wappsto account and install the Blockly app.
- Open the app and click “Add new” to create your first Blockly program (application).
- Give it a name. Eg: “Outside office hours automation” and click “Create”.
Once your application is created you will see your workspace with a few initial blocks.
2. Create your first schedule
First of all, we will clear up space and remove the initial blocks. Click on the block to select it and then press the “Delete” key to delete it.
- Find the “Scheduling” section in the left-side menu (orange colour) and click to open it.
- Drag the “Every day…” block into your workspace as shown in the image.
- Change frequency and time to your desired needs.
For this task, we want something to happen on weekdays at 16:30 when everyone has left the office.
3. Define an action
In this step, we need to decide what should happen every day at a certain time. We want our smart plugs and/or switches to turn off the lights and electronic devices.
- Find the “Wappsto” section in the left-side menu (dark blue colour) and click to open it.
- Drag the “Set value…” block into your workspace as shown in the image.
Now we need to add the correct values to the block.
- Find the “Devices” section in the left-side menu (dark blue colour).
- Click on the “Select devices” button to open a list of the devices present in your Wappsto account. Check the devices that you want to add to your workspace. We have selected “Printer room lights”, “Corridor lights” and “Desk Monitor” from Shelly. Then click the “Save” button to confirm the selection.
- Selected devices will now appear in the left-side menu and you can click on them to see the list of values present under each of them.
- Drag to your workspace the necessary control value. In our case, it is called “On/Off”.
- Set the value to “off”.
4. Repeat the action
In the previous step, we created an action for the “Printer room lights” (marked as nr. 1 in the image). Now do the same for “Corridor lights” (marked as nr. 2) and “Relay” (marked as nr. 3).
To speed up the process of block creation, you can duplicate blocks. Select a block, right-click and select the “duplicate” option.
Remember to change values in the new blocks!
5. Save your program
For this program to run, remember to press “Save files”.
If you want to STOP the automation, go to the Blockly app main page, where you see all your created programs. Click on the programs menu button to view its settings. Click the “Stop app” button.
From now on your lights and devices will switch off at a certain time on weekdays.
Similarly, you can program devices to switch on. Duplicate the whole schedule block and change the time, and values from “off” to “on”.
You can also add more advanced options to your schedules. For example, switch off lights during holidays.
To do that, you need to import your country’s holiday calendar using the “Calendar Connector” app in Wappsto. Then, use “Logic” blocks to create rules and exceptions.
Learn to build blocks to use energy when cheapest (currently supported only in Denmark).
Charge your car or appliances when energy goes low in price.