Fibaro Motion Sensor Temp Offset

I have a few of the Fibaro motion sensors and really like them but have noticed that I cant set a temp offset like I can for the Smartthings sensors, does anyone have this annoyance? I dont believe its a Fibaro issue and it does have its own pairing option indicating good support!

The Fibaro Motion Sensors have tons of parameters that can be changed along with the temp. offset. @CyrilPeponnet shared a device type couple of days (weeks?) back which allows you to adjust the parameters. @Ron has his version with similar capability. May be they can chime in if you put it in a relevant thread. Search the community for “Fibaro Motion Sensor” related threads. There are several active ones.

I don’t have meperature offset coded yet in my device code but I would be happy to add it.

It’s pretty easy to add these preferences

The parameter is #66
The value to be added to the actual temperature, measured by the sensor (temperature compensation).
Available settings: 0 - 100 (0 to 100oC) or 64536 - 65535 (-100 to -0.1oC)
Default setting: 0
Parameter size: 2 [bytes]

The negative offset is a bit tricky but should still be easy to code this.

You could also just code your own offset in the device code or smart app code Then when temp is reported you can just adjust by your preference and create event with your adjusted values or just apply the offset in your smart app.

obviously the nicest would be to add the option to the device code which I will try to do when I get a chance.

1 Like

Thanks for the advice @smart and i got a bit overwhelmed on the forum and couldn’t see wood through trees.

@Ron thanks as well and an opportunity for me to get my fingers a little dirty, not done any code in 22 years except some basic scripts on LAMP machines.

Stupid question - how quickly did the fibaro devices appear when you searched for them? I have a Fibaro dimmer (no devices available) but even when I put it into join mode my hub never sees it.

Do you have the fibaro dimmer 2? One dimmer did not connect at all. Need to return that. Connected 2 other dimmers, and it picked it up straight away. I had a nightmare configuring my device though, as it wouldn’t work out of the box as expected, and due to lack of ability to change the parameters for zwave devices within smartthings. I had to write my own own code. It’s working ok for now.

Yep its the dimmer. Once I got the wiring rigged and checked it was working I put it into join mode and the hub didnt see it. You think its broken?

Once the motion sensor is in pairing mode the search only took a few seconds and a short while later it’s in my list of things.

The B button on my dimmer was dodgy. I couldn’t hear a proper click when pressed, as compared to the other 2 dimmers that worked.

So I am trying to adjust the temperature offset. I have been able to do this with the Aeon Multisensor 6 with something like this:

zwave.configurationV1.configurationSet(parameterNumber: 66, size: 2, scaledConfigurationValue: -60).format()

When I do a configurationGet it is returning:

9c11dc41-e1d1-4090-911b-abbc64f9848b 11:38:53 AM: debug Front Porch Motion parameter ‘66’ with a byte size of ‘2’ is set to ‘[0, 196]’

So, I know it is changing it, but the temperature is waaaay off now. It went from being 6 degrees too high to being about 40 degrees too high.

According to the documentation, If I want to reduce it by 6 degrees Celsius I need to multiply 6 * 10 and subtract if from 65535 right? So the actual configuration value should be 65475.

The Smarthings log is reporting the value as ‘[0, 196]’. How can I convert 65475 to ‘[x, x]’? I think that will accomplish what I want if I then use:

zwave.configurationV1.configurationSet(configurationValue: [x,x], parameterNumber: 66, size: 2).format()

You need to convert the number into low and high order bytes. There are several examples of this in my fibaro device code but here is an example.

 log.debug "Setting Night/Day threshold $nightDayThreshold"

def nightDayThresholdAsInt = nightDayThreshold.toInteger()
if (nightDayThresholdAsInt >= 1 && nightDayThresholdAsInt <= 65535 ) {
def short nightDayThresholdLow = nightDayThresholdAsInt & 0xFF
def short nightDayThresholdHigh = (nightDayThresholdAsInt >> 8) & 0xFF
def nightDayThresholdBytes = [nightDayThresholdHigh, nightDayThresholdLow]
log.debug "Setting Param 9 to $nightDayThresholdBytes"
cmds << zwave.configurationV1.configurationSet(configurationValue: nightDayThresholdBytes, parameterNumber: 9, size: 2).format()
} else {
log.warn "Setting Param 9 out of rang changing to default of 200"
cmds << zwave.configurationV1.configurationSet(configurationValue: [0,200], parameterNumber: 9, size: 2).format()

So in your case to will want to do the following.

def tempOffset = 65475
def short tempOffsetLow = tempOffset & 0xFF
def short tempOffsetHigh = (tempOffset >> 8) & 0xFF
def tempOffsetBytes = [tempOffsetHigh, tempOffsetLow]
cmds << zwave.configurationV1.configurationSet(configurationValue: tempOffsetBytes, parameterNumber: 66, size: 2).format();

FYI if you want to confirm debugging output use a scientific calculator convert number to HEX to determine high and low bytes.
65475 = FFC3
So the array is [FF,C3] or [255,195]
lower number such as 60 would be [0,3C] or [0,60]

If you want to understand the code.
What you are doing here is bitwise and with 0xFF which will drop any byes higher than FF leaving you with the low order byte, So FFC3 becomes C3.
Then you are shifting by 8bits (one byte) >> 8
So shifting FFC3 results in just FF, bitwise and with 0xFF remains FF so out hight order byte is FF. Note we do the second bitwise and just in case the passed in value is higher than 0xFFFF.

Hope that explains it :smile:

I find it strange that the settings are in terms of 1 degree positive 0-100 represents 0-100
but the do .10 degrees for negative 64536-65536 = -100 to -.01.

But I do agree with how you read this since .01 - 100 is represented by 1000 numbers it is in terms of a 10th of a degree.

so temp offset needs to be converted as follows. Assuming entry value is -100 to 0 to 100

if (tempOffset >= 0) {
    adjustedTempOffset = tempOffset
} else {
    // tempOffset negative so add negative value * 10 for whole degrees to hex FFFF
    adjustedTempOffset = 0xFFFF + (tempOffset * 10)

BTW there is something seriously wrong with the sensor if it needs adjusting by more than 10 degrees. I am surprised the range isn’t -10 to 0 to 10. I think when I add this as a preference to my device code I may just offer this limit making it easy to may it a selection list instead of free form text.


BTW: How did this subject wind up in the “UK & Ireland Specific News & Discussion” category ?

Thank you, this is exactly the information I needed. Extra thank you for the elaboration, as I was hoping to get the details of how it worked.

I find it strange that the settings are in terms of 1 degree positive 0-100 represents 0-100
but the do .10 degrees for negative 64536-65536 = -100 to -.01.

Yeah, this is really strange and does not make sense. If you are going to negatively offset the temperature you need more precision than when you are going to positively offset it? Ok . . . :smile:

Thanks again for the help. With your post I was able to get everything squared away and working.

I raised it here as the v2 was only available in the UK and US and I did not know if the fibaro motion sensor was selling in the US.