Measuring temperature from remote with Fibaro universal binary-sensor – model: FGBS-321

Let’s talk about this Fibaro very tiny “DIY-device” that can be connected to different sensors and route their values through a Z-Wave network. It is quite small: its dimensions are 27.3 x 14.5 x 12 mm, very similar to the footprint of a SIM card (not micro-SIM which is smaller).

What is it?

it is a device that routes your sensor values/states to your z-wave controller. It can be programmed to take actions or just to display them to your smartphone or PC through the internet. Sensors are normally not provided with the Fibaro device.

What does it do?

    • By itself nothing
  • It reads values from temperature sensors DS18B20 (using the 1-wire  bus architecture – manufactured by Dallas semiconductor/Maxim)
  • It reads values from any binary sensor (normally close or normally open – like presence sensors, precipitation sensors, switches, buttons and any sensor that can open/close a contact)
  • You need a power-supply unit to light it

What you can do (examples)

This device is useful every time that you need to read a value, either from a sensor or from a switch. You can then take actions based on the data read (through your z-wave controller) or “just use” the information from remote (read temperature/status from your smartphone/PC or store them into files/database).   Here follow some examples.

  • Connect one or more of the following sensors and route the sensor value to your Z-wave controller:
    • Temperature sensors DS18B20 – up to 4 sensors, up to 30m (wired); you can find the DS18B20 “bare chip” or assembled cables already mounting it.
    • Flood sensors either NC (normally-closed) or NO (normally-open)
    • Any motion-detection/presence sensor either NC or NO
    • Given the two available outputs, you can route the motion-detection/presence signal to your alarm system; therefore the same sensor can trigger both the Z-wave controller and your alarm hub;
    • A simple button or switch (you can program your controller to trigger a scene if the button has been pressed – e.g. if your doorbell has been pressed)
  • Remotely read temperature values from up to probes installed in your house (internal and external).
  • you can switch on an air conditioner or stove if the temperature goes beyond/below a certain threshold (by programming your z-wave controller)

What doesn’t it do?

It is not a standalone sensor. You need a power-supply to power it (any voltage between 9V and 30V DC); its power consumption is too high for a 9V battery to last even 1-2 days (we measured around 160mW @16V DC input with one DS18B20 temperature sensor connected and with very strong Z-wave controller signal strength). It is sold as a PCB board + a multi-wire cable (without mechanical enclosure).

Connection diagrams (from Fibaro datasheet)

1 – Temperature sensor/probe


DS18B20 chip


Probe mounting DS18B20 chip


Example of connection to one chip sensor with a breadboard


2 – Button (doorbell etc) + precipitation sensor (NC sensor) connection diagram (from Fibaro datasheet)


Tips & Tricks

To include or exclude the device you must apply three rapid clicks on the device button. If you are slow, they are not recognized as triple-click and nothing happens. This is particularly important since you have no visual feedback (no LEDs on the device) and therefore you may think that the device is not working.

We recommend is to apply a “burst of clicks”; if you press 4-5 times nothing unexpected happens, it is recognized as a triple click and the device recognized by your Z-wave controller.

Temperature update: in order to read the current temperature value, it is normally necessary to update its value from the z-wave controller. If you are using software (razberry), there is a button on the GUI and you can even do it with a JSON or Javascript command. Our advice is to program a periodical automatic update of it. On SW version 2.0.1  you can do it through the Home Automation UI -> Preferences -> Poll sensors periodically. You may decide to update the temperature sensor every minute or 10 minutes.


You can reset the device by disconnecting it from the power supply, then reconnecting while pressing the button for at least 10 seconds. You will then need to disconnect and connect it once again to make the reset effective

Advanced instructions (for Raspberry/Razberry and USB stick ZWAVE.ME)

If you have a Raspberry server with Z-WAY software running on it, here follow the instructions (example of server with LAN address and binary sensor associated to device number 3)

Note: to access from remote you will probably need the NOIP software that will allow you to create a personal address to bypass the fact that household ADSL lines have not a static IP (numerical) address . If your server is connected to a 3G/4G router (cellular network NAT) you will probably need a software like Hamachi.

Example though JSON interface – You can launch this instruction as a simple internet address on your internet browser (client-side from remote)

Update temperature sensor value (it is a multilevel sensor, therefore instance 3 of device 3)[3].instances[3].commandClasses[49].Get()

Read temperature value[3].instances[3].commandClasses[49].data[1[.val.value

Get temperature scale (unit of measure)[3].instances[3].commandClasses[49].data[1[.scaleString.value

Here we are using CommandClass 49 to read and update the device

Similar instructions using JAVASCRIPT (server side)

Update temperature sensor value (it is a multilevel sensor, therefore instance 3 of device 3)


(31 hex = 49 decimal)

Update temperature sensor value every 10 minutes (10x6x1000ms)

setInterval ( function() { zway.devices[2].instances[0].commandClasses[0x31].Get() }, 60000)


One thought on “Measuring temperature from remote with Fibaro universal binary-sensor – model: FGBS-321

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s