Interfacing and configuration

Having installed the interface board there are two stages to configuration. The first is to get the panel itself to trigger the outputs and the second is to interpret them in FHEM and trigger some actions.

The outputs in Wintex are located in a section labelled (helpfully) ‘Outputs’ in the programming menu:

There are a lot of different ways of configuring outputs as you can see. I was previously using the ‘Panel Outputs’ at the top, with ‘System Fully Armed’ being the trigger to throttle down the heating. However, I’m now interested in the eight ‘Digi Outputs’ listed underneath.

For each output there is a bewildering array of possible options – there are eight groups (system, area, zone etc) and each group has numerous other options. For example, the ‘user’ group allows triggering of output on a specific code. The level of detail is really impressive and pretty much anything you can think of is catered for.

My needs are quite simple, I want to trigger an output for system armed (for the heating), and for activation of the PIRs and back door contacts. This is done by selecting the ‘Zone’ group and setting the correct zone number.

The other thing to set is the ‘output function’ which dictates the behaviour. I want to read the status regardless of whether the alarm is armed so I have used ‘Mimic’. There are other ‘attributes’ you can set, I could have used ‘inverted’ which would have pulled the output high on trigger, but I can accomplish the same thing in the software at the other end so I left it alone. I need to think about what else I could use these outputs for, but for the moment I have assigned them to various of the zones around the house including the all-important back door to accommodate the cat.

Once the programming was sent to the panel, I was pleased to see the LEDs displaying what I expected – those corresponding to the PIRs went out whenever it was triggered.

I’m not going to go into great detail on the FHEM configuration, which is a little fiddly (but if you are interested please contact me and I’ll try to help). The Arduino has the ‘Firmata‘ sketch loaded and this is attached in FHEM as a USB device:

The various pins are made available for use (in my case pins 2 – 9) and you then define the pins you want to use as inputs as a separate device:

You can reference the reading of (in this case) ‘TexecomArm’ in logic which does things based on the condition. In FHEM-speak this is done using ‘notify’ events. I have used ‘notify’ events to switch on the main lights in some of the rooms when the PIR is triggered:

It looks a bit complex, but the relevant line is the ‘DEF’ at the top. The command is triggered when TexecomDigi2 (ie the 2nd Digicom output) reads as ‘on’. The event is to ‘set Hue_HUEGroup2 on’ which turns on a series of Hue lights in the room.

The only problem was that we watch films in the front room sometimes, and we turn the lights off. In that situation, you don’t want them suddenly coming back on again. Luckily, FHEM can also talk to various other devices I have including the home cinema amp (a Denon AVR-X2000). Therefore, triggering the output evaluates an ‘if’ expression, and it only triggers the lights on if the amp is off (or rather, if it is not on – ‘ne’ meaning ‘not equal to’). So if the amp is on and we turn the lights off, they stay off. If the amp is off (and therefore no-one is watching anything) the lights come on.

Although these are only small things, they really show the value of having as many data sources as possible and making things work together to really anticipate what you want. I’m really excited to see what else I can think of for this, and further expand how the panel and the rest of my devices at home work together.

Oh and concerning the cat… I now need to get a wifi thermostat for the underfloor heating that FHEM can address. I have a Heatmiser Neo at the moment but this isn’t supported, so I need either a Floureon or Beoks device instead. I’ll post further when I’ve got this working.

Leave a comment