Our Dutch distributor, PLC Direct Benelux, shows us how this can be easily realised in combination with Node-RED and the data of the Dutch online weather portal “Buienradar”.
A linear drive with a stroke length of 500 mm is used to open and close the windows. This actuator is equipped with a 24 V motor controlled by a RevPi Core 3 and the matching digital I/O expansion module. The actuator used stops the motor automatically at the end of the stroke. No additional sensors or switches are required. As the actuator can draw 3 A current and the output module can only switch up to 500 mA current, a relay is necessary.
In order to achieve that the windows are opened and closed depending on the weather situation, freely accessible weather data from the Internet should be used. However, this data can only be read and used with the help of special applications, which can be programmed, for example, with the user-friendly graphic development environment Node-RED. By means of a HTTP request and a function node it is possible to read the predicted precipitation on Buienradar.
Via the link https://gpsgadget.buienradar.nl/data/raintext?lat=52.08&lon=5.47 the precipitation quantity expected for the next two hours can be requested in text form. The numbers after “lat” and “lon” correspond to the GPS coordinates of the place from which the precipitation data are required. These data are retrieved by Node-RED every five minutes. If rain is expected within 15 minutes, the windows are automatically closed. However, if it remains dry for the next 15 minutes, the system will open the windows again.
Currently, only two states are distinguished: “windows open” and “windows closed”. Additional settings could be achieved by further development. Furthermore, connected temperature and humidity sensors could ensure that the windows are opened and closed depending on their status. It is also possible to expand the system with Dashboard Nodes, which constantly call up the current rain forecast and window status via a web browser.
RevPi Core 3