
- Loxone relay extension code#
- Loxone relay extension windows#
So besides the water the house will be a 100% sustainable home. It's already disconnected from the gas supply line and it will be a house with a heat pump and solar panels. I decided to turn my home into a smarthome. I am renovating my bungalow from 1967 and was curious about the current state of technology for smarthomes. With the new page selected press F5 and add a switch block for each relay, I name it Relay 1,2….On 22 March 2017 I went to the High Tech Campus in Eindhoven to attend a seminar about 'smarthomes' (presented by ).Next step create a new page name it, assignee it to a category and a room.In the same way edit the preferences edit the name, assignee it a category and a room and set the command for ON and OFF, in this care I had for ON /out1/on and for OFF /out1/off.Now we have to create the VQ Command for each relay, click on your new VQ to select it and on the top bar menu add a VQ Command.Once the VQ is created make sure is selected and in the Preferences window situated on the left side change the name, assignee it to a room and add the RaspberryPi ip address and port.
Loxone relay extension windows#
In the Loxone Config app “I am using the windows version 11.1.9.14 at the time of writing this tutorial” click and select Virtual Outputs and then in the top menu bar click on Virtual Outputs (VQ) to add it to the miniserver. The scripts can be modified and adapt for all the GPIO pins. Var x = document.getElementById("myNumber").value ĭocument.getElementById("demo").innerHTML = x Loxone relay extension code#
Now the Python code is done we have to edit the inex.html file, remember for the Loxone you don’t need it :.#-Do not forget to change to your ip address and portĪpp.run(host='192.168.1.128', port=8008, debug=True) #-to access the GPIO status of our relay1(): #-This part of the program is only for Loxone #-and the Loxone direct actionn(deviceName, action): #-This part of the code will be used by the web page #-Create the action link for each OUTPUT/relays Return render_template('index.html', **templateData) #-Read and save the status of each OUTPUT #-Declare the all OUTPUT's and set them to HIGH #-GPIO pins virtual status helps to display Create the html.py file by typing in the terminal the following command.
Sleep 20 # for pi4 amd for pi0w 60seconds #some applications need to wait for PI to fully start and then run the code
In this file type or copy-paste the following code:. sh file you ca follow my example, in the terminal enter the following command line to crate the launcher.sh file: Restart the Pi and enjoy the fruits of you labour GOOD LUCK. sh file and I call it launcher.sh and make it executable To load up the python file at the start up of the raspberry pi we have to create a. In the home directory create the python file in my case I call it html.py. Template folder is a place where you put all the templates and is a default directory for your web page and contain the index.html file. Static folder is used for serving web static content, all the css, js, html etc. Creating the tow folders in the home directory called: static and template is not needed but can be useful,. Check to have the latest version of python or python3. Universal first steps always is open a terminal and enter this commands:. Get your board ready by installing all the packages needed. Same like in my other tutorial Raspberry Pi WebControl GPIO we have go through same process of installing all the packages needed and with some small modifications to the python code we will be able to control it with Loxone mini-server:. In my opinion Loxone is one the best automation system on the market expensive but as you will see in this tutorial Loxone allows other ‘third party, devices/extensions to be integrated, as you will see in this tutorial integrating a Raspberry Pi module with various modules connected to the GPIO. Complete automation solution with intuitive control – suitable for smart homes