Open source KNX gateway in order to develop Freedomotic Knx plugin

2,091 views
Skip to first unread message

amenak77

unread,
Jan 7, 2014, 5:41:39 AM1/7/14
to freedom-...@googlegroups.com
After a long exchenge of ideas each others, I and Mauro decided to choose an open souce hardware and software platform upon which base the development of a freedomotic knx plugin; the alternative was choosing a completely software based solution throught a knx plant software emulator kindly provided by Calimero libraries maker, Boris. We have indentified three solutions, partially interchangeable; all are marked as lowest common denominator by being low-cost as hardware and open source as software. 
1) The first solution uses open software Linknx and Webknx2, linux as OS with a daemon for EIBD telegram manegement while hardware-side we have a custom board based on Siemens TP-UART chip and a BCU2 coupling unit useful for knx bus interfacing. You can find details here: http://ekblad.org/konnex/ and here http://linknx.sourceforge.net/ and custom board details are here:  http://www.auto.tuwien.ac.at/~mkoegler/index.php/tpuart; we found also an example prototype where hardware and software lay on a modified Linksys WRT54gs Wi-fi router OpenWRT compliant. In this case all the embedded linux based system is our gateway; the fd plugin takes possession of hardware virtualizing EIB commands throught Linknx and configurating an XML file for knx hardware addresses. We can have a project variant if we exchange custom board with this http://busware.de/tiki-index.php?page=TUL an economic serial USB board with bus USB 2.0 coupling an ATMega32 and TP-UART onboard (€69 VAT included).
2) The second choise follows a simple consideration: why not using in place of a modified router, a more standard and economic hardware as Raspberry pi? First good news: OperWRT can be installed on Raspi  http://computers.tutsplus.com/articles/installing-openwrt-on-a-raspberry-pi-as-a-new-home-firewall--mac-55984 ; besides USB board we can use a same price specific Raspi interface  http://busware.de/tiki-index.php?page=ROT and an optimized ver of Linknx. We have also a Python package designed for communication with an instance of Linknx https://pypi.python.org/pypi/pyknx
3) The last solution uses an Arduino Mega (multiple UART) a custom knx interface shield with TP-UART and Knx bus copupling and a binary sketch which manages EIBD telegrams http://dka.web-republic.de/?s=knx.
Just to finish the report, open Knx complete gateways apart, there is a full open Hw/sw development platform that is ideal for experiments interfacing with real or simulated knx plants: Knxlive!  https://www.auto.tuwien.ac.at/a-lab/knxlive.html
We'd like to know your considerations about this project and which direction possibly follow. Have a nice day. Alberto and Mauro :)




Matteo Mazzoni

unread,
Jan 7, 2014, 4:52:20 PM1/7/14
to freedom-...@googlegroups.com
Such a wonderful report and marvelous idea! A few years ago I started looking for a KNX Arduino shield, and I was suggested  - as a starting point - this tutorial:
http://dka.web-republic.de/2012/01/connecting-an-arduino-to-eibknx/

Nowadays I'd go for a USB TPUART adapter, or maybe a RasPi expansion board, although they seem quite expensive yet being some simple pieces of hardware.

If you need any help concerning the software part, just ask!

Great, great work!

Matteo


2014/1/7 amenak77 <amen...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Freedom Building Automation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to freedom-domoti...@googlegroups.com.
To post to this group, send email to freedom-...@googlegroups.com.
Visit this group at http://groups.google.com/group/freedom-domotics.
For more options, visit https://groups.google.com/groups/opt_out.

alberto mengoli

unread,
Jan 8, 2014, 7:20:29 PM1/8/14
to freedom-...@googlegroups.com
Hi Matteo
what an enthusiastic comment! This is the right spirit. All the project comes from the needing of knx plugin development and the more we explored full soft solutions the more was evident that something was missing: the first problem was hardware emulation and even if, ultimately we hadn't an hardware gateway to connect to real plant. The link to Johan Ekblad website was a revelation; a complete open source project based upon linux as OS and low cost custom hardware. If you take a Bticino Myhome gateway you have a dedicated hardware with an embed linux OS inside and an open protocol, OpenWenNet, to link to SCS bus; freedomotic own plugin takes possession of the gateway. It was simple: we needed an open knx gateway so we could develop a knx plugin to take possession of. And so we arrived to our three solutions; we all quite agree for a mixed one: Raspberry pi with Linknx, Webknx2, OpenWRT + USB board with TP-UART and bus coupling, but there are some other points to discuss about: 1) Johan original project used a custom hardware that was in the complex more expensive than commercial USB board solution (custom board assembled €40 + BCU2 cupling unit €100 + modified Linksys router €55 versus Raspi € 35 + USB board €69) but enabled ethernet and PC tunneling functions; if we make a comparison with Bticino world we can compare the two solutions to a L4686SDK USB serial gateway and F454 ethernet web server gateway: the first supports a reduced frame set; I don't know if in knx world it is the same. 2) we have a fourth hardware solution: Udoo board which is a partially customizable project and quickly seems more and more a perfect hardware platform for freedomotic and above all for freedomotic@home 3) we need knx hardware for plugin testing; there is an open hw/sw platform, Knxlive that seems perfect but we know nothing about costs and availibility.
And this is only the beginning.....Have a nice evening, Alberto :)


2014/1/7 Matteo Mazzoni <mat...@bestmazzo.it>

--
You received this message because you are subscribed to a topic in the Google Groups "Freedom Building Automation" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/freedom-domotics/527JAzTNkVc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to freedom-domoti...@googlegroups.com.

alberto mengoli

unread,
Jan 10, 2014, 9:28:56 AM1/10/14
to freedom-...@googlegroups.com
Hi all
about the gateway there is another solution here: http://www.eibhandel.de/MDT-SCN-IP00001-KNX-IP-Interface
To enable bidirectional communication between PC
and the KNX bus via TCP/IP
• Programming the KNX bus via TCP/IP
• External power supply or PoE required
• Modular installation device for DIN 35mm rails
• Integrated bus coupling unit
• Integrated line coupler via TCP/IP
it can interface with every pc throught TCP/IP and is Din rail mount; it costs €187.64 (without alimentation). Its cost challenges with Johan's board. 16 relais board http://www.eibhandel.de/MDT-AKK-161001-Schaltaktor-16-fach-8TE-230VAC-10A €260.90; blind module 4 channels http://www.eibhandel.de/MDT-JAL-041001-Jalousieaktor-4-fach-4TE-230VAC-10A €175.43; Bye, Alberto :)




2014/1/9 alberto mengoli <amen...@gmail.com>

alberto mengoli

unread,
Jan 13, 2014, 12:49:39 PM1/13/14
to freedom-...@googlegroups.com
Hi all
a little update; you can take a look here http://www.internetmosquito.com/2012/12/learning-how-to-control-existing-knx.html  that is Alejandro Villamarin's blog "Internet Mosquito" (@Gabriel and Roberto: do you know him?) a R&D engineer who made an exceptional step by step tutorial titled "Learning how to control an existent KNX infrastructure"; there is a very intersting example about java client using Calimero libraries and server-side calibration. Mauro seems well intentioned to create a test Knx plugin using these informations; but as we had no reply from Boris about updated knx simulator, our main problems concern knx hardware either plant side or interface side related to tests. I found "cheap" hardware here http://stores.ebay.it/thisNthat66/ABB-EIB-KNX-/_i.html?_fsub=1581848  and here  http://www.amazon.it/s/ref=nb_sb_ss_i_1_3?__mk_it_IT=%C3%85M%C3%85%C5%BD%C3%95%C3%91&url=search-alias%3Daps&field-keywords=knx%20eib&sprefix=knx%2Caps%2C272  What do you think we can do to solve this problem? Bye Alberto :)


2014/1/10 alberto mengoli <amen...@gmail.com>
Reply all
Reply to author
Forward
0 new messages