Hardware: NUC7CJYH with 8 GB RAM and 32 GB SSD + zwave: UZB1 Stick
Ubuntu Server 20.04
OH 3.2 stable
I recently bought a house and it turned out to have KNX installed
Unfortunately I don’t have any experience with KNX, but already started to learn.
(I did not move in yet)
The components below are already in place:
Merten Serial interface 681929 (RS-232)
Merten Time control 670301
Merten 12 TE rollershutter actuator 649912
Merten Powersupply 320MA with Batterie connector 683129
Merten BUS Connector 690599
Merten Twilight Switch 670601
Connection: Should I get a RS-232 connector to USB and hook it up to my NUC7CJYH or should I swap the serial interface with an IP interface (which I am more familiar with)?
Does this make a difference in the daily use via openHAB?
Do I need the ETS software from the beginning? I first would just like to listen to the KNX activity to learn.
I would go for an IP-Gateway, because this is the future and you will not get to any comparability problems with drivers or bigger physical distances etc.
It might be better to do this with the KNX software. But you don’t have to buy it. As far as I know you just need an account at knx. Then you can do a “training”. After completing the training you can download the software with a demo license which is fully functional but only limited to 5 physical devices in a project. So for your needs more than enough.
As Sebstian says: an IP-Gateway or an IP-Router would be the go-to solution. Router is a bit more flexible - but way more expensive. The gateway should do fine though. A serial or USB interface is enough to use it with ETS or a single computer - but if you can manage, a IP Interface would be better.
You’d have to have access to the KNX configuration file from the electrician, which built the KNX installation in the first place. As you say, it was “by accident”, I don’t assume the file exists. It is nay impossible to “reverse engineer” your way from the KNX devices to a configuration file. So either you’d have to find out, who the electrician was (and probably pay him for the file), or you have to dive in and re-setup (meaning greenfield approach and resetting all devices and programming again) the KNX configuration from scratch with the “ETS Software”. And yes, it’s a minimum of 200€ - for the “LITE” version, which only allows you 20 devices per project. I don’t think the house consists of only the 6 devices listed, I’m betting on multiple actuators and switches at least. So you have to calculate, if 20 would be enough. There’s a ETS “home” license available for up to 60 devices and 350€, which should be fitting for a “normal house” with a few acutators, switches and IP Interfaces.
The other approach would be to check in with an KNX-savvy electrician (even perhaps the one, who built it) and discuss your requirements with him and he can do the configuration for you. If he’d willing to do this for less than 200€ or even 1.000€ (which the ET6 pro costs) is highly unlikely. The ETS5 is a real pain in the a… if you don’t know, what you’re doing and ETS6 is not sooo much better UX wise, as I’ve seen. And if you have no KNX configuration to start from it could be really hard to get the understanding of all the GAs and adresses and programming and updating and getting the correct parameters from the manufacturer from their current catalogues and stuff…
even IF you managed to somehow get hold of the KNX configuration and you know all the GAs and how to address them for OH3-configuration - my advice is to at least wrap your head around ETS and buy the corresponding license. you will be making chances in one way or the other and for that you’d either have to pay someone - or do it yourself with the Software.
For that you don’t need any “KNX” software at all, just install knxd on your NUC and put on the group monitor function. But! the bus can be really busy, so you have to sequentially do stuff in your house (turn lights on/off, set the rollershutters, …) and to filter out the noise, to “learn” the GAs and their configuration - which could differ on how the electrician set the KNX up in the first place. aaaaand chances are, the electrician just installed KNX “for the house” with no visualization or smarthome hub in mind - that would make your life even more complicated.
but yeah: listening to the telegrams and stuff is possible without ETS and with a bit of luck you can figure out, which GA to address how and put your OH-configuration together that way - but you’ll have to have a deep knowho on how KNX works…
I do not want to spoil your excitement about the knx parts discovered, but:
From the components you mentioned this looks like the knx is used for the shutter control only.
Did you check if there are switch actors, dimmer actors, binary inputs, knx light switches (sensors)?
Looking at the power supply (320mA) I would not expect too many knx components to be installed.
So before spending money ensure it will be worth the effort.
As an IP interface you could use a simple raspberry PI + BAOS or similar modules with knxd running on it. Might be the cheapest solution if you are a bit familiar with the PI. You can get a “demo” licence for ETS from their website after you took a small training.
This RS-232 is ancient crap - or do you want to sit in front of the interface with a cable ? Not cool.
The time module and the Twilight Switch can easily be replaced by OH rules and the Astro binding, they are somehow medival as well. Advantage: Works without further IT like OH.
Ask the previous owner about the KNX documentation and the ETS project file - this is part of the installation, if missing I’d negotiate on the pricing…tricky nowadays, I know.
Overall advice: Wait until you know more before you start spending money on hardware or an ETS licence.
That was my concern - so it’s not possible to download the config, I suppose?
Without any experience (but a relatively good experience with OH), I am not sure if I should reverse-engineer the config.
Unfortunately the electrician is out of business
But from what I know (and guess) there is not a lot of logic.
Because what can you do with rollershutters, twilight sensor and a timer?
Means, there is possibly not a lot of stuff I could mess up.
Ma plan is to do all the rules / logic in OH anyway and just use KNX as the executional instance (if that makes sense).
However, there are some switches around the house for various rollershutters and the ventilation system. So I assume, at least this “group” config must be conserved.
Air - Ventilation system-
(for the latter one there should be a switch somewhere close to the ventilation sytem as well, right?)
Yes the switches mentioned above and possibly the twilight sensor somewhere outside.
So, I assume I will only find out which devices are on the bus after connecting to it.
Thanks - that would possibly be the best approach, because I am sure that I will have changes in the future and would like to do this myself. And I am willing to learn new stuff
What about ETS inside (server and client) as far as I understood, that easier to handle due to another SW layer on top of it!?
So why the KNXD instead of the binding?
The KNXD is like a wireshark, but couldn’t this be done with the binding and TRACE logging activated?
don’t worry to spoil - thats fine and I guess you are right.
But even if it’s just the rollershutters, it’s worth to dig into this for presence simulation and stuff.
(furthermore it’s a noce perspective to learn new things
In relation to house prices here the investment for an IP-interface is not a big deal;-)
The previous owner does not have a clue, but I am considering to try to get in touch with the original owner (before the current one) to find out.
Thank you, Thomas!
It was a 6 years journey and just worked out because friends split up.
Sad story but good for us (and they did a good deal as well).
I will try to learn a bit more and will investigate closer once we moved in the next two months.
5 physical devices
you can use 2 projects one for your main devices and 1 for the auxiliary like the time module (that might be replaced by Openhab anyway). an ip interface is also one device. But you need to create the same set of group addresses in both projects (not that comformtable, but well yo do not have so many)
As you have so few devices a setup from scratch is also not a problem to fear, but of course it is good to start from a working project.
For the use-case of @NCO you don´t need to spent a cent in knx software.
You just need to know the group-addresses which you can also sniff-by with a group monitor.
Yes an alternative for an IP-Gateway you can use TPUART-Adapter with knxd running on a raspberry. But in my opinion this is not really cheaper and you need to spend a lot of time (flashing the adapter with firmware).
I would say so, yes. You don´t need the gateway to keep the knx-bus running. You just need it to monitor, programm your devices or communicate with other (HA) software. So if your already have this gateway you can always give it a try with a RS232 connector (wich you also might have already)…
In fact, as it seems the knx system is very small, it’s possible to reverse engineer the configuration. That is:
Find all devices (scan the whole bus in ETS for devices)
get exact model of hardware (you did this for the electrical cabinet, but not for the wall switches)
read configuration per device (there is an option for this job in ETS).
Finally, you will get a list of GA (Group Addresses) with links to CO (Communication Objects). After that, you have revealed the bus and its hardware and configuration. As it seems to be very basic hardware, there is a good chance to reach the goal.
Now, either restart with a complete new project and recreate the complete configuration, or add all needed information to the reverse engineered one (i.e. which GA is for what purpose, which actuator device channel is for which shutter and so on). Might take some time, but hey, at the end of the day, it’s fun.
Maybe you will find someone near you to help, knx is not that exotic anymore, it’s quite common.
This would be possible after connecting to the interface with the binding (and TRACE log), I assume?
So sniffing the broadcast stuff would bring light into this? (sorry if this question is dumb).
On the long run, I would prefer a “real” IP interface and am willing to invest into the SW (if needed).
KNX Virtual seems to be a good way to start learning: KNX - MyKNX
As far as I understood, I could read out all devices (if connected) from a database to check what’s in there.
I don’t but I am thinking about this for the start
I agree - the electrical cabinet is the major part AFAIK.
There are just the switches, which are not “regular” switches (see above) and the connection to the ventilation system, which just might be a power switch close to is to control it.
The light switches in the house look like normal switches, but with the rollershutters half of my “presence simulation” would ba covered.
Maybe the KNX cables are also in the light switch wall and I can make use of it later…
At least in the living room there are cables (red / purple) which look like KNX cables (to me).
Regarding the logic:
knx is somehow dumb, basically the configuration is linking a source (e.g.switch, sensor…) with a target (actor, display …) by group addresses.
If there is logic it is withing the devices configuration, there you have parameters that define the available object to link to and how the device behaves and reacts to triggering events.
This is something you can not reveal by listening to the group addresses sent on the bus.
And without ETS you are not able to modify this configuration.
Only with a system like openHAB, Homeserver, Domovea etc. you have the possibility to have more complex logic than just Boolean operations or time- based triggers from a dedicated scheduling device.
I doubt that the cables you showed are knx. This usually is a green cable with four wires(red, black, yellow, white). At least this is the standard. Sometimes improper cables are used, so who knows…
You could have a look into the switch used for the shutters to see what’s used there. But ONLY if you know what you are doing. Electricity is not much fun… ensure to shut down electricity first.
I think, you’re mixing addresses of physical devices (e.g. 1.1.4) with group addresses (e.g. 1/1/4).
The pyhsical device address is not really important for openHAB, it’s for programming the devices.
What you have to configure is the GAs, which in turn can be used to tell one or more (!) devices what to do. For example, if you take your rollershutters: an rollershutter actuator like they can have up to 200+ KO (communication objects), which in turn can be addressed by multiple GAs (group addresses). Your 12 TE actuator can 12 outputs (normally 2 are combined for one rollershutter, meaning a total of 6 rollershutter blinds). The rollershutter then has the KOs in use for all the magic of having blinds, slats, positioning, …
So, basically you can either listen to the bus (don’t know, if the logfile of OH3 in DEBUG will be so useful, If you plug the RS232 to your NUC or a Raspberry Pi, knxd will provide you with a group monitor - as will a Laptop running ETS in all versions, if you can plug RS232 (USB-adaper for RS232?) into your machine). Then as described you do something and have a look in the group monitor which GAs get which command in the telegram. What you won’t get out of it is the overall logic within each actuator, like e.g. the actuator has a setting on how long it takes for the shutters to close, so it can calculate the time for “80%”. And you won’t get into the logic, if there was some wind-protection or other logics like heating logic within a KNX button, which acts like a thermostat and has heating logic…
But: if you really only have the rollershutters and a ON/OFF switch for your Air ZS, then I’d either recommend refactoring the whoele electronic in the house or (my choice for the time being) just leave it as it is and don’t bother much about ETS or other fancy stuff. Just make sure, you know the “shutters up” and “shutters down” GAs and simply put some openHAB rules in place, that handle the rollershutters if it’s getting hot out there or stormy.
Everything else is perhaps a cool way to killing some time, but won’t bring you far. If you’re about to move in in a few weeks time, there won’t be much time to completely renew the installation - which you have to, if you want to replace 230V switches with KNX actuators. You could if you want to add some “over the air” switches like Zigbee or Shellys, which would just replace the simple switches with smart switches.
so, long story short: try to find the GAs, insert them into your openHAB things and rules and then slowly work towards your smarthome after you moved in.
And please don’t think about ETS inside, this is just another way to make loads of money, simply put: it’s a very, very basic version of a smarthome hub - and you already have something like that: openHAB!
If you want to buy an ETS licence I suggest to go thru KNX eCampus. Once you finish you’ll a discount to buy any license (sorry I csn’t remember the actual percents). An IP module is also useful for changing configuration to actuator, push buttons and to diagnose (listen to bus communications).
but I get your point - in my case the “Süd” (South) button on the switch would then trigger a group of all rollershutters on the south side of the house whereas the “Zentral” button would trigger all accordingly.
Thank you for this detailed assessment. I think you are right. It’s the right focus on being able to control KNX though OH first.
Maybe I just want too much for now. (but I am sure my curiousity to look into details will come back).
After moving into the new house I need to investigate first what kind of components might be hidden around the house. There are dimmer in the lving room and I wonder if KNX is behind this as well
ok, I guess you’re surely more impatient than I am - and my impatience level is over 9000!
yes, the Winzierl IP Interfaces are cool, my IP 730 still does its job without any issues.
What you have to keep in the back of your head: there’s a difference between “KNX IP Router” and “KNP IP Gateway/Interface”. Normally you won’t need a Router, but just to be on track:
both can handle multiple connections at a time (e.g. ETS-programming and openHAB)
both have direct tunneling
only a router can combine more than one “line”, meaning if you have for some reason two seperates KNX lines (security wise), because a router acts as a line coppling device.
only a router uses multicast
=> in your case the above IP Interface works just fine. I have the 730er version and it works just fine for ETS, openHAB and my node-Red in parallel. Just keep in mind, the IP Interfaces “reserve” parallel connections for devices, so if you switch your openHAB-installation or you have multiple laptops using the Interface for access to the KNX bus - perhaps you have to reset the Interface manually (there’s a reset button on the Weinzierl) to regain access again.
that’s the beauty of KNX: every (certified!) KNX device works out of the box with every KNX installation. No need (except for the sake of beauty or simplicity for programmig) to stick to one manufacturer or one product line.
for adding new devices, you’ll definately need ETS. You “just” plug in the red and black cable into the device (if it needs power ad those, too) and it is connected to the KNX bus. But the device needs to be initialized (given the pyhsical address: like 1.1.xx) and it has to be preloaded with a configuration and if it has CO you need to parameterize those with the GAs and perhaps some kind of logic. in the case of the Weinzierl it’ll look like this (sorry for german for all non-german speakers):
(1) you’ll have to put the device in “programming mode” and unload the physical address and parameters onto it
(2) once you have done it, changes are only needed fo the parameters onto that device
The IP Interface only lets you either use DHCP (like I do) or static IP configuration - no COs or other configuration.
but as I said, you’ll have to consider:
costs of replacing your “standard” installation with KNX driven installation (you’ll need new wiring)
costs of working you head around KNX - but you’re already in that, as I can see
just a heads up: if you’re thinking of making your light switches smart, just take a step back and consider replacing just the analogue switches with smart Zigbees or Shellys or the likes. They can be easily integrated into openHAB as well and I reckon for a fraction of the costs of KNX. of course, they’re not as flexible than KNX then, but just make a plan on what you really need. (to make it more complex: you could also connect a “KNX button” via openHAB with a Zigbeee/Shelly/WiFi switch…)
If you think, you got a KNX dimming - just take a look into your distribution panel. KNX actuators like the one you photographed (your Merten TE actuator) are almost certainly there and not in the room where they “control” something. So if there’s no device with the KNX (or instabus EIB in your case: the “older” name for it) logo present: then you’re dimmer is placed within the switch.
You are a big help
And it’s nice to see that other people are as impatient as I am
Alright - so just sniffing the KNX bus would then be done by the already available serial interface (unless I want to buy the IP interface AND ETS from the start.
Maybe I’ll get a serial connector then first.
That’s a good point.
Actually in my current appartment my main approach is zwave:
wall plugs, in-wall light switches, rollershutter.
But I will leave the stuff there and start in the new house from scratch (except OH programming an logic).
I will definitely keep z-wave, because my major device (Italian portafiler machine) is powered by a wall plug.
So I might end up with rollerhutter (KNX, because it’s in place) and most of the other stuff (window contacts and such) based on z-wave.
Thank you - that helps a lot and I guess I have a good overview of the complexity of the system already.
There is one light in the garden house, which will go on in the evening automatically and I assume it’s controlled by the twilight KNX switch, but I need to check this. (maybe it’s a separate line for security reasons).
Every knx installation has an interface, either RS232, USB or knx/IP. It’s possible (but very uncommon) to cut the connection between bus and interface after configuration is done.
As the communication is 9600 Bit/s, the RS232 Interface is sufficient.
To scan the whole knx bus, you will only need the ETS lite version, which is 0 € after absolving e-Campus. A bus scan will reveal every device which is connected to the bus, including the individual addresses of each device.
ETS is capable to extract the configuration of each device, this is which CO (Communication Object) is programmed to which GAs (Group Addresses).
ETS lite is capable to build projects with a maximum of 5 devices, but there are workarounds (split the project into two), and to get the information, you don’t need a complete project.
As I wrote before, it’s fun.
But yes, you will need to spend some time to this (a couple of hours).