Fibaro Universal Sensor with Contact/Motion/Temp Sensors

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

Hi @Fuzzyligic,

I’ve been using you DH and been great so thanks :smile:. But for one of my units i wanted two contact sensors and the temperature so i tweaked it with another DH and got it working to some extent but i don’t think i have done it correctly.
I’m a complete novice so tweaking is as much as i can do :slight_smile:. What i’m trying to do is get them represented as 2 contacts inputs without having to create two virtual devices. Would you know how to define 2 separate Contact Sensors?


I’m trying to setup, but no luck… Can you help me please ?


@borristhecat not possible without having one device have two inputs and a virtual device for the other with a smartapp watching for changes. You can’t have more than one device handler managing a single device.

@anonino.norely if you connected the temp sensors up after the ubs was jointed to the zwave network they will never work. It’s a quirk of the ubs. Exclude the Device and then rejoin and your temp sensors will start working

so you could have the temperature on the main device then a virtual device doing both contacts? Or the temp and contact (or motion) on the main one then the other contact on a virtual?

no you misunderstand, the first device that is the device manager will have all the inputs… i.e. the temp and both contacts. in the device handler you can amend which input value is shown in the device list. but then you can create virtual devices and a smartapp to replicate the value of the inputs in the first device to the virtual devices. this approach is only necessary if you want to display the status of all three inputs separately in the device list without having to click on the first device to see the status of all inputs…hope that makes more sense.

Think I do, In my instance I only want to see the temperature but I want ST to be able to use the contacts and or motion inputs as separate inputs to use in webCoRE. So then rather that having loads of pointless simulated contact sensors filling up the app device page that you don’t want /need to see and if you do you can go to the main device.
So ideally when you select the device in webCoRE you could select contact1 or contact2 /motion or one of the temperatures, rather than just contact. But to do this they need to be declared as separate enums apparently.

ok with webcore i cant comment as ive not used it as i dont use Smarthings in earnest anymore as 99.9% of my things have been migrated away. but i know with CoRE you could happily use the multiple Contact sensors of a device with the pistons. i cant see webcore being any different as that would mean for the likes of the Fibaro Motion Sensors you would not be able to use the Temp, Motion & Luminance values in pistons! and i imagine if that was the case people would not be using WebCoRE, it may be work reaching out to @ady624 to check how this works.

already have with his help i know i have to put this under the commands

attribute “contact2”, “enum”, [“open”, “closed”]

and this then appears in webcore, but its linking that to the second contact that i’m struggling with.

but looking at that statement it references contact2 as an attribute, however in my handler there isnt a custom attribute set, both contacts use the contact attribute and i get now why it doesn’t work for you

you would have to create a custom attribute like that in the definition of the device handler, for example

definition (name: "Fibaro Universal Sensor - Contact/Motion", namespace: "fuzzysb", author: "Stuart Buchanan") {
    capability 	"Contact Sensor"
	capability 	"Motion Sensor"
	capability 	"Temperature Measurement"
	capability 	"Configuration"
	capability 	"Sensor"
        attribute           "contact2", "enum", ["open", "closed"]

and then change the references for the second contact sensor using the and replace with contact2

then that should work

Don’t worry i have worked it out! was determined to get it working and managed it :smile: well chuffed. thanks for all your help.

EDIT: just for reference if anyone is looking to do this it was managed by the following under Capabilitys

command "open1"
command "open2"
command "close1"
command “close2”

attribute "contact1","enum",["open1","close1"]
attribute "contact2","enum",["open2","close2"]
1 Like

Hi @Fuzzyligic, I am total noob in reading and programming of DH. Integrated binary module into a security PIR sensor and using your contact/sensor DH. Binary module IN1 is tamper, IN2 is motion and binary outputs are connected to security system. Just like this:

But there is one thing, during alarm PIR motion contact is OPEN and therefor status is inverted in app. How to properly invert motion signal in DH? Would also like to switch some lights with this signal using SmartLighting app.

Pardon my blondness. But I seem to be missing something. I have hooked up the UBS to my RPi powered RazBerry, connected the sensors and voila, all works as described here.

But what do I need the groovy code for? Can I create my own device type (derived from the UBS perhaps)? If so, does an IDE exist? I do not see anywhere in the smart home Gui where I can create a new device type, neither in the expert UI.

@rvdhorst you do realise you have posted this on the Smartthings Community Forum? the groovy code is to add support for the device to Smartthings, as you are not using smartthings, you do not need this.

1 Like