Close

Another mistake...

A project log for KNX Raspberry Pi HAT

A HAT to easily interface a Raspberry Pi with a KNX bus.

tijl-schepensTijl Schepens 06/25/2020 at 17:020 Comments

It seems that I swapped the pin out of the Raspberry Pi header. Pin 1 should be Pin 2 and vice versa. So in the schematic I had to mirror the header around the y-axis. The schematics and the PCB on GitLab have been updated.

I guess that means that I have to put the shield upside down onto the Raspberry Pi to work with it. It looks silly, but hey it works ;-)

Installing KNXD was pretty straight forward. The installation instructions on their Github page are very clear. After fiddling around with it, I got it working with the shield! At first it didn't work, but I selected the wrong baud rate.
KNXD by default communicates at 19200bps and an even parity bit. So the jumpers on the shield must both be set to 0.

To test if everything is working I connected a simple KNX power supply to the shield.


I also connected a KNX USB interface to the bus, but I don't have ETS on my Linux PC, so it is useless for now...


When starting KNXD from the command line it is easy to see if everything is working by adding the option:

--trace=1023

 If KNXD detects an error during startup (due to an incorrect baud rate for example) it will report what it received and what it expected to receive. After a couple of failed attempts KNXD will exit.

If the communication is successful, the process will keep running and report what you can see in the figure above. Every couple of seconds it will request the transceivers status by sending 0x02. If everything is normal, it should respond with 0x07. This way the Raspberry Pi knows that everything is up and running.

Now that it is possible to get KNXD communicating with the shield, we can configure KNXD to listen on a socket and try to get OpenHAB to communicate with it. But first lets get this Pi connected to my home network so I can SSH into it instead of having to hook up an external screen.

It seems like we are getting somewhere :-)

One thing that might be good to note for an update of the shield, is to add a power LED. It really helps to see if things are powered or not. Even though the shield is upside down currently :-P

Discussions