Dies ist eine alte Version des Dokuments!
31.10.2014
In my new office I have to add a simple heating controller to the central heating system.
Therefore I have to switch 2 realys, which tell the central heating to heat with high or low power, and if any heating is required.
My main competence is in electronics hardware development, embedded programming and application programming on a PC. But until now, I never got to deep into webdevelopment. So here you can read about my progress of understanding the techniqes, which I can use to implement the heating control system with webinterface.
All the communication between the different hardware parts will be established via WiFi, so I do not need a long cable between the office-room and the central heating system.
Arduino Nano Board with a digital temperature sensor DS18B20 and a WiFi module. It will have an LCD and some buttons for a local user interface. If we use the heating controller without a internet conntection we will need a local time. Therefore a real-time-clock is needed. It will be the DS1307. Due to the high current consumtion of the WiFi module batteries will not last very long, so a mains power supply is needed.
Here I will use a Arduino Nano board with a relay module with 2 relays on it and the WiFi module. A separate power supply is also needed here.
This will be a normal router from my internet service provider. I think it's a Thomson device, I will get it next week. Important here is, that I can set port forwarding to the temperature sensor and the relay box.
I'm renting a webhosting-server (http://www.world4you.com) where I want to host the webpage for the online user interface. Here should run a PHP website, which can do encrypted communication with the Sensor Box.
When you request a website by entering a url in your web browser, the web server gets a message via TCP. I've tested this with the simple software tool SocketTest from Akshathkumar Shetty.
I've opened a TCP server listening to port 8080. When I enter
http://localhost:8080/relay1=1&relay2=0
, I get this message on the TCP server:
GET /relay1=1&relay2=0 HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Connection: keep-alive
The server also knows, which IP address wants to connect to it.