Go Down

Topic: Communication between KNX, Arduino and stepping switches (Read 2744 times) previous topic - next topic

lecroq

Hi,

For a school project we tried to set up communication between stepping switches, Arduino and KNX. We had the ambitious goal to implement an entire home automation solution using Arduino, but we soon realised it wouldn't be possible on such a short notice. The code I submit in this post is a collection of code we downloaded from Daniel's Blog http://dka.web-republic.de/2012/01/connecting-an-arduino-to-eibknx and code we've generated ourselves. All communication happens on bit level, and what is exactly transmitted are the group addresses. Then Arduino can read in the variable matrix created from the configuration file what output should be generated when a certain group address is read at the input.

Very important to know is that the project has never been finished the way it meant to be finished. So what works is the following:

  • Using a custom switch connected to Arduino to control a light via KNX

  • Reading a KNX protocol message, generated by a KNX switch and write it to serial monitor

  • Reading the config.txt-file on the micro SD-card and writing all variables into a matrix


Because we encountered some problems during the merge of code for the first 2 points and the code for the last point, we never succeeded in realising the actual goal of our project: controlling stepping switches with Arduino using a configuration to control which input should be translated into which output. Therefore, the loop() in the home_automation.ino contains some code, but nothing has ever been tested and most of the code is just floating around without being actually used.

At this moment you can find documentation in the wiki on http://lecroq.sinners.be/home_automation, but please understand it's just a temporary location. I will try to provide extra support and perhaps I could link to the new location or upload the wiki on the forum in a next post.

I post it here because one of the requirements of the project was the code to be open source and because I hope some geniuses amongst you might have some time to play with what we have realised. If you're interested, please take a look at the zip-file attached. I tried to code everything in English, but I've noticed my co-workers initially coded in Dutch so it could be that there might be left some Dutch code inside.

If you have any questions regarding the code, please respond to this code and I'll try to help you.

Go Up