Raspberry Pi + Domoticz + motion sensor

I just purchased a cheap motion sensor off Amazon (around £2.50) and attached it to a Raspberry Pi using a PiFace board.

The Raspberry Pi is running Domoticz home automation software.

The installation of the necessary software to drive the PiFace board with Domotiz is covered here.

I have attached the sensor line from the PIR to input 0 on the PiFace board, and the positive power line to the +5V terminal, with the last line to the ground terminal.

My piface.conf file looks like this :




This is to let me use the LED connected to output 7 to signal if the motion sensor is triggered or not – making it much easier to debug any problems with the PIR sensor or the wiring etc.

The setup in the Domoticz hardware configuration looks like this :


indicating that the PiFac board is recognised by Domoticz (and the Raspberry Pi)

Under the “Switches” tab you should now see :




If you have activated the 2 devices (and given them roughly the same names as I have).

Then the scripts to blink the LED on port 7 as the motion sensor detects movement :




PiFace and Domoticz

Got my PiFace board up and running on the Raspberry Pi


First off I had to enable it in Domoticz – made much easier by the inbuilt support for the PiFace – all I needed to do was to set up the configuration file like this


I’ve now attached a PIR to input 1 – and using the 2 outputs to check that everything can be controlled by using their LED’s as indicators.

By using Domoticz notifications


I now get a Prowl/Growl message on my iPhone and iPad whenever movement is detected.

It’s a start.