1. Installing the playground

a) Download or copy all the files that are in the workshop bundle online (Beware that it is 3.22Gb and takes a while to download) or from the USB sticks that will be available during the physical workshop to your computer.

b) Open the folder named VirtualBox run the installation file that matches your operating system.
c) Open the folder named "Virtual machines" and click on the file named OpenEnergyToolbox.zip. To unzip the the virtual machine (this can take some time).
d) Open the folder that was created named OpenEnergyToolbox and double click on the OpenEnergyToolbox.vbox file. A virtual machine will now start with all the development tools preinstalled.

2. Explore the Playground

The playground currently contains several different softwares. As for example:

These are now all running on your computer. We are now going to start with learning how to use node-RED.

Node RED

Node-RED is a graphical programming language which is ideal for rapid prototyping.

  • You can use it to integrate different services such as Twitter, email etc.
  • You can use it preform calculations on incoming data.
  • You can use it to create fake data during development etc.

If you are on a virtual machine you will find NodeRED by opening a browser and entering: http://localhost:1880

If it doesn't work open a terminal window and enter the following.

cd playground  
docker-compose up -d  

Start by adding a debug node from the left panel.

After that add an MQTT input node. This node will listen to data coming in to the MQTT server.

In to configure it we need to double click it and then enter a topic and select a server. Select or add op-en.se:1880 by clicking at the dropdown or adding a new server with the pen icon.

Set the signal to test/signalA

Drag a line between the mqtt node and the green debug node. After that you can start your program by clicking the red Deply button in the top right corner.

All data sent to the test/signalA topic on the MQTT server will now be received and printed to the debug tab. Click on the debug tab just under the Deploy button to view it.
The data in this case consist of a json formatted payload that contains three properties "time","power" and "energy".

The time in this case is the time at which the values was read. Power is the current power usage measured. Energy is an increasing counter reflecting how much energy that has been used .

Now lets create a fake signal

Add an inject node and an MQTT output node. Double tap it and select json and enter {"power":500} and click Ok.
Set the server to op-en.se again and then set the topic to test/somethingwhere "something" is a name without spaces that is unique and not being used by anyone else. Also reconfigure the previous MQTT input node to listen to the same topic to get debug printouts. Connect the two nodes and press deploy.

You should now instead of the test data see your fake signal in the debug tab.

Add a couple of more inject nodes by selecting the existing one and using copy and paste on your keyboard. Open the new ones and change then to other values, connect them to the MQTT output and click deploy.

Open this page and put it next to your node-RED window so that you can see both at the same time. Test clicking the three inject buttons. The visualisation at the second webpage should now change in respons to the messages you are sending.