Fibaro Universal Sensor with Contact/Motion/Temp Sensors

so i revisited a little project i started a few weeks ago but never got around to finish, which was to create a Contact/Motion/Temp combined sensor using the Fibaro Universal Sensor, the sensors used were a Reed contact sensor, a HC-SR501 PIR Motion Sensor & a DS18B20 Temperature Sensor

I had a hell of time getting anything more than the contact sensor registering anything. the first reason was that unless the Temp Sensor is installed and wired up before you include the sensor in the zwave network it will not work until the device is excluded and included again…this point stated in the smallest print imaginable is in the manual but i am a bloke i don’t read manuals until i am forced.

as for the PIR, i was trying to attach the PIR’s output pin direct to IN2 and configuring the IN2 fuction to monostable but this didn’t work and that is because the PIR emits low at 0v when idle and 3.3v when motion is detected, it turns out the fibaro wont read any voltage on the input at all, so i had to put in a BC549C transistor to emulate a switch. which switch on the switch when the base leg is triggered by the 3.3v high state.

and here is the very nearly final fitted solution, the PIR dome needs to be glued on the front and the double sided tape holding it at the moment will need to be removed (i just didn’t have any suitable glue to hand.)

and here is the complete device type code i used



Just looking at this myself - I have wired IN1 to a door relay, which when open only returns 3V, and this doesn’t seem to be showing up as a change of state on the binary sensor. Can you explain to me how you managed to get that to register? Not sure I understand about the fact that the sensor doesn’t read voltage?

sorry, probably being really stupid.

thanks, Richard

dont worry if it outputs 3v when open, then the binary sensor will absolutely not read this…it took me ages to figure out, it essentially just detects resistance across the IN1 circuit. if there is voltage this absolutely will not work, it took me weeks to figure it out. with 3v you can use the same transistor as i have used. just connect the output from the panel to the base leg. the IN1 to the emitter leg and ground to the negative. the transistor will then act as a switch and will close when the voltage is applied to the base leg. the UBS will then pick up the transistor status fine.

1 Like

Wow. Wishing I’d paid more attention in electronics now. I’m struggling to get my head around this one.

So it can’t detect a positive voltage on in1 but if there’s a transistor with the emitter connected to in1 it can. Where/how, therefore, is the in1 circuit completed? And what is the resistance that it’s measuring? If the door relay (connected to base) is at 0v then the transistor switch closes and no voltage into in1. If 3V on base, the emitter is at +3v (?) so the in1 is at +3V. Can’t see a difference, but I think that’s because I have some fundamental gaps in my knowledge of the basics!

Is the second ground (the penultimate wire) used at all?

Also should the Ubs wired in series in the door sensor wiring or can it just be across the terminals of my alarm panel?

Thanks for the quick response and sorry for the total noob questions!

no worries,

look here for info using a transistor as a switch, the voltage applied to the base leg of a BC549C transistor will not pass to the emitter only the voltage if any applied to the collector will pass to the emitter only when voltage is applied to the base leg. therefore acting as a switch. just as if you put a push button switch attached to IN1 and Ground, the UBS will sense this fine, as there is no voltage applied to the collector in this case, the sensor can sense the difference between an open and closed circuit with no voltage across the circuit.

try it i guarantee this will work as its the same principle as my PIR motion sensor which outputs 0v when no motion and 3.3v when there is motion. wiring this directly to IN1 did not work at all. but when i wired up to the transistor to use as a switch of sorts, bingo i got the correlating state

oh yes the second ground wire should only be used to wire up a DS18B20 Temp Sensor Only if you mean the one listed below…

Thank you, again. I have bought some of those transistors and some breadboard to test it out in.

still don’t really understand how the sensor can tell a change between 0v open circuit and a 0v closed circuit, but you sound very convincing so I have no doubts!!

I’ll let you now how I get on.

With these transistors, does this mean I can tap off any terminal that changes from 0V to 3V when motion/open is detected, and use that to trigger the relay? Very useful if so!

Wow how did anyone work this stuff out before the Internet?!

1 Like

OK… so this has been a mixed experience.

I have found that the switch will trigger in ST if I connect the IN1 or IN2 to ground.

so I connected the transister up as you suggested, but with the input voltage (+12V in this case, from a cell) connected to base, I found that I had to connect the collector to ground and the emitter to IN1 for it to do anything. nevertheless this seemed to work.

i then wired it all up, and put it inside the alarm panel itself. In the alarm panel is a +12 terminal which denotes set/unset, so I thought that would be a good start. I connected that terminal to the base, and the IN1 to the collector, and the emitter to ground. this seemed to be ok for one of the circuits, but not the other. I removed it all again, and now I can’t get anything to work at all. I suspect I may have blown the transistors by wiring them up wrong, or to a too-large power supply.

I don’t know enough about transistors to know whether I’ve blown it (or at least my bench setup is pretty minimal) so I’m kind of back to square one.

Incidentally, I tried to connect the base to one of the NC terminals of the motion sensor and it did absolutely nothing. I wasn’t too sure why I as had detected +2.54V with a multimeter, which went to 0 when the contact was broken. but then the transistor could have been broken by that point anyway!

all very very frustrating - I thought this UBS was supposed to be clever!

yes its likely you will have blown the transistors, those particular transistors accept only up to 5v on the base leg. as you said it was only 3v output i presumed you would be ok. for 12v you would need to find one that would work, the ratings for transistors are for both Voltage and Current so you will need to properly asses the spec sheet of a transistor.

Hi there,
Just wondering if you used a 4.7k pullup resistor with the ds18b20 temperature chip ?
Seem to be having problems connecting mine ?

@vasarbob no you do not need a pullup resistor, however if you added the DS18B20 after you first paired with ST you will never be able to get the temp sensor working.

remove from ST by putting it into exclusion mode, then perform a factory reset. then join again to ST, you should now see the temp readings ok.

Thanks for the prompt reply. Will try and report back.

Hi Fuzzyligic,

I’ve just bought a Hub to move to from Vera and I’m having a play before putting it into production.

I’m having an issue where it’s only showing me one temperature rather than the four sensors I’ve got attached. I’ve previously had this working ok on a Vera and Zipato

Any ideas?

Many thanks


Hi the binary sensor supports up to 4 temp sensors any way to get more than one showing in ST?


I have the same problem.

I have tried tweaking the DH using endpoints and the multichannelcmdencap method which seems to potentially work but this method does not seem to work with scaledsensorvalue function.

It looks as if the data is there but I am unsure how to convert from 255 255 255 255 format to C / F.

Admittedly I have absolutely no idea what I am doing as this is the first DH I have tinkered with.

What I can say though is that under the DH (without any amending), it displays the four sensor temperatures in the log, although which appears in the smart tile is a little sporadic and varied.

Any ideas?


I have made some progress and now I have worked out how to display each of the four temp readings in different tiles. I am taking the parameter data from the multichannel command line and converting it manually rather than using the sensor command which has no way of working out which end point it comes from.

The problem now though is that the device only shows in CoRE and elsewhere that it has one temperature capability rather than four ie I want to be able to use the data of all four sensors to feed a smartapp rather than just one sensor.

I’ll get there eventually but if anyone has any bright ideas, they would be gratefully received!


As I understand it you need to get the app to mirror the data to a simulated temperature sensor, since for most apps they can only see the first sensor for each device. This is also true of the actual contact sensors in this device - you have to have two simulated contact sensors in order to be able to reference them in other code.

Thanks - Is this the same as using virtual devices?

If I use a smartapp to populate the simulated device, how do I get the end point data across? Ie don’t I still have to use capability again which takes me back to square one or is there some other clever way?

Any examples would be very welcome!

Have the code for working 4 temp probes here:

1 Like

Hello look good. You could not make a diagram how you connected the BC549C

I will also try

/Mr Enggaard