[RELEASE] Fibaro FGBS-001 Universal Binary Sensor (UBS)

Hi all,

Ive been working on the Fibaro Universal Binary Sensor for a while now and have finally got it to a point where it is responsive and meets all my requirements.

Main improvements:

  • It can create two child devices for the two contact sensors and automatically updates them without a smart app (and you dont need to install extra device handlers as I use the default SmartThings testing ones).
  • If you change the device handler for the child contact sensors to a “Simulated Motion Sensor” then the child devices will work as motion sensors instead of contact sensors.
  • It can cope with four temperature sensors and negative temperatures but might behave erratically with Fahrenheit. - Note that temperature sensors have to be connected at the point you pair/include the UBS into SmartThings, otherwise it doesnt send/update the temperatures.
  • It can create child devices for the temperature sensors aswell (without needing a smart app) - though it will only create them if you have received temperature information from the UBS already.
  • Lots of improved debugging and logging.
  • The settings panel is vastly improved with information about each setting/parameter.

Ive given it quite a good bit of testing but please give it a whirl and let me know what you think.


On the parent device I will keep it as two contact sensors, since changing that is quite messy and may add extra delays from having to use state variables. However for the Child devices I will add an option to make them motion sensors and it shouldnt have a significant impact (I will associate closed with motion).

I didnt want people to have to install multiple device handlers and I still couldnt find a published contact sensor DH which prevented manual control. I will keep my eyes open though and update it if I find one. Realistically I dont think many people would actually press the button as they would only use the state for information in other routines, so the risk of manual control is mainly the fact that it shouldnt, rather than causing a problem?

You’re right about Github integration, I need to do a reshuffle of my library in order to integrate with ST’s library. Once that is done it will allow Github sync (I’ll do it this weekend).

P.s. Those two orphan settings at the bottom with no description is an ST bug which is showing the previous settings from when I allowed toggling child creation in preferences screen. Since I removed that option it should hide the unused parameters. They do go away eventually in my testing.

Great idea! Didn’t think you could do that! That way the DH becomes what ever anyone wants it to do be it the 2 contacts that I use or what it was originally designed for one contact one motion for a old security PIR.

I have one, just never published it for anyone else as don’t have github set up fully. It’s based on the ST one with the bits removed that make it changeable. I can give you the code if you want.

Sadly publishing it for yourself does not publish it for all users, hence although you have made the change (and I have on my own device handlers too) other users would need to import the extra device handlers themselves. For a member of the public to install a device handler from a common repo I think ST need to publish it.

Will work on the changes and do an update at the same time as sorting out Github integration

O that’s a shame I just assumed that as long as the path was correct in github, you would be able to use that same path. :neutral_face: might be worth reaching out to a ST staff member to ask if it’s possible?

Good stuff - thank you. Look forward to trying this out.

Im going to leave it with current setup (allowing state modification on the children) for now, after Ive lived with it for a bit I’ll see if I actually ever accidentally change the state manually. I agree it shouldnt be possible on their published devices and hence there is some merit in trying to get ST to update their published DTH, but I guess it is useful for testing (e.g. I dont want to have to trigger my doorbell/alarm/… every time in order to check that it is triggering the right CoRE routines…)

Just to update the thread, I have modified the device handler so it should also deal with motion sensors. The main device will only show contact sensors (i.e. Open and Closed), but after creation of the child devices you can change the device handler to be “Simulated Motion Sensor” and then it will function as a motion sensor rather than a contact sensor. (For info it does this by sending a open/closed event to the child, and also sends an inactive/active event, hence working for both types of child)

This looks great but for some reason the temperatures are not showing anything (’–’). I’ve migrated the sensor from my old system fine. I have only 3 temperature sensors on it - don’t use the contacts at all.
I’ve tried removing/adding children but this doesn’t seem to do anything. What am I doing wrong?
Many thanks, Duncan

It will only create the temperature children if it is receiving a temperature from the Fibaro. Do you see anything on the parent (main) device about temperatures? Was it showing temperatures before?

Perhaps just leave it a few minutes? Check that all settings are entered on the settings page and then press save before pressing “Send Config”. After that you should hopefully see temperatures in the device (within a minute or so after the UBS sends them), and then it will create the children.

Brilliant! It was the ‘Send Config’ that worked.
Thank you very much.


I need to use this for an ‘It’s too cold’ SmartApp. However I can only select the whole device, not an individual temperature. Is there any way of doing this?

Thanks again, Duncan

If you create temperature children them it should create some child devices where each device will have one temperature (that can then easily be built into rules). You can then rename the parent device to have a Z at the start of its name so it sits at the bottom of your things list

Thanks - I’m so close now… It’s created 3 children, but the third is the temperature probe I’m not using (so no value). Would you believe it - the one I need (Temp 3) is the one that’s missing(!)
Any ideas?

Thanks again, Duncan

Im not sure I follow that post, the 3rd is the one you are using or arent? If it created three children is that not all the three you want? Or is it working in the main device but one of the children is misbehaving? If thats the case then I suggest pressing remove children once, then waiting ~5s and then pressing create temp children again.

There is a weird bug in ST that sometimes means you create children devices but they dont link to the parent correctly. Normally removing devices will fail to remove that broken child, but if you leave the broken device there and press create temp children again, then miraculously the broken child starts working.

Thanks for getting back to me so quickly.
Wow you really know this system. It’s that bug by the looks of things. I removed the children, but the buggy one stayed. I recreated them and now 1 and 3 work(!) Removed and recreated and no temperatures, then tried again a few times and back to 1 and 3. I’m giving up here - 1 and 3 are the ones I really need so I’ll cut my losses.
Thank you very much for your help - I was worried I wouldn’t be able to get this working at all.


You could also try adding the contact sensors (even though you dont use them), and then deleting them individually by opening up the created contact sensor devices and pressing delete (at the bottom of the settings/preferences page). You could even try manually deleting the Temp2 sensor (using the settings page) and then creating the temp sensors again. Perhaps one of those options will trigger Temp2 into working!

It is a very annoying bug so I’ll keep trying to find a workaround!

The value has suddenly appeared! I left it as it was and it’s now decided it’s going to work.
Thank you so much for your help - that’s brilliant.


1 Like

Hi many thanks for this! working well for me apart I’m not getting minus value on temps. Temp1 should be -3.5

Ah I’m an idiot, I did the sum the wrong way around! I’ll correct that
tomorrow morning! Thanks.

1 Like