[RELEASE] Fibaro Motion Sensor ZW5 (ver. 3.2) (Advanced DTH)

This is an advanced DTH for Fibaro Motion Sensor Z-Wave Plus (also known as ZW5) version (firmware 3.2)

This DTH provides not only standard functionality like:

  • Motion detection
  • Tamper detection
  • Temperature measurement
  • Light intensity measurement
  • Battery readout

But also additionality offers:

  • Advanced parameter configuration for 24 parameters
  • Readout for the “Earth Quake” detection function (depending on parameter configuration)
  • Readout for sensor orientation (depending on parameter configuration)
  • Implemented Three Axis capability (depending on parameter configuration)
  • Automatic parameter synchronization on manual or periodic wake up.

Avaible parameters are (I’ve purposefully skipped parameter nr 3 since manufacturer doesn’t recomment changing it and parameters related to associations as SmartThings does not support associations):

  • Wake Up interval
  • Motion Detection Settings:
  • Sensitivity
  • Blind time
  • Time window
  • Alarm cancellation delay
  • Operating mode
  • Night/day
  • Tamper Alarm Settings:
  • Sensitivity
  • Alarm cancellation delay
  • Operating mode
  • Alarm cancellation
  • Illuminance Reporting Settings:
  • Reporting threshold
  • Reporting interval
  • Temperature Reporting Settings:
  • Reporting threshold
  • Measuring interval
  • Reporting Interval
  • Temperature offset
  • Led Indicator Settings:
  • Signalling mode
  • Brightness
  • Illuminance for low indicator brightness
  • Illuminance for high indicator brightness
  • Temperature for blue colour
  • Temperature for red colour
  • Tamper alarm

For details on how parameters work if not self explanatory refer to manual for the device: Motion Sensor | FIBARO Manuals

[UPDATE] 2017-04-30:

  • Fixed bug that could cause sending a command that should be using Secure Encapsulation without it resulting in the device ignoring the command.
    (This bug didn’t affect this DTH but I’m including the fix just in case)

Pictures:

Source Link:

13 Likes

@ClassGOD, your not busy at all I see :slight_smile:

I just set this up against my sensor. I looks good. Four questions:-

Where you have X, Y, Z in your image, mine is blank. What do they stand for?
Whats the sync button for, and when i pressed it, it changed to SYNC force?
LUX is saying 1260. Its currently night time. Does this take time to adjust!!!
When I went into configuration, the settings look good until I get to 89: Tamper alarm, after that, I get a stream of numbers!!!

To see x,y,z data you have to set Tamper Operating mode to “2 - Tamper and Orientation” and after settings get synced move the sensor :wink:

The SYNC button is there to inform you about the status of parameter synchronization. It has 6 states:

  1. OK - synchronization finished OK or no settings were changed
  2. PENDING - it will change to it when you change some parameters in settings to notify you that it is waiting for the device to wake up
  3. SYNCING - the device has woken up and DTH is sending the configuration
  4. INCOMPLETE - not all settings transmited to the device, waiting for next device wake up
  5. FAILED - device rejected configuration (check if the values of your parameters are correct)

By default DTH only sends the parameters that have changed. you can force it to send all parameters by tapping the SYNC icon - it will then change to 6th state - FORCE and wait for the device to wake up.

This motion sensor is a so called “sleepy” device - it doesn’t communicate unless it has to so there is no way to send the configuration to it immediately. DTH has to wait for the device to wake up - by default it does it every 2 hours. If you want to you can wake up the sensor manually by pressing the “B” button next to battery. It should then update Illumination, battery and temp values.

The string of numbers on the bottom are settings from your old DTH, you can delete them by pressing (x) and saving.

Thanks for the info.

Great work on this DH. I tried it on one of my sensors and ended up moving all of my ZW5 motion sensors across to this. The sync seems to work the best out of the custom DH I’ve used previously. The fact you can tweak all the main parameters is great. Thank you!

[UPDATE] 2017-04-30:

  • Fixed bug that could cause sending a command that should be using Secure Encapsulation without it resulting in the device ignoring the command.
    (This bug didn’t affect this DTH but I’m including the fix just in case)
1 Like

Great handler @ClassicGOD ! The only thing I noticed is that in the recently tab, when motion is detected it says tamper

1 Like

Yea, sorry about that. Should be fixed now :smiley:

Thanks for spotting that.

1 Like

Not sure exactly why the issue existed for me, but thought I would mention it.

Prior to the last update I was making changes to the handler but they would synch to the device but the handler kept saying Sync was Incomplete. This latest change has resolved that.

Also at least for me, my device never took the Synch even when forced, but only when pressing the button on the back.

Strange, I haven’t change anything to do with syncing.

It is possible that you set one of the parameters to the value not accepted by the sensor and it was silently rejecting it. If that happens again enable logging in the settings, force the sync and watch “Live Logging” tab for errors and messages like:

“Device Name - Parameter someParameter value is XX expected YY”

If the XX and YY values are different this is the parameter that has issues syncing.

The synchronization happens only when the device wakes up. You can wake it up manually or wait until it wakes up on it’s own. By default it wakes up on it’s own every 2 hours (7200sec - the Wake Up Interval parameter in settings). You should get “Device Name Woke Up” event in “Recently” tab in the app when that happens.

@ClassicGOD - great work on the best Fibaro Motion ZW5 DTH in the SmartThings community! Why they call it just a motion sensor when it does so much more than that and is the best z-wave multi sensor on the market with its customizable configuration is a mystery to me… :slight_smile:

I am integrating the sensor into webCoRE and all the current states work except for the ‘Tamper’ state. Found out from @ady624 , the creator of webCoRE, that the incorrect attributes are being referenced in your DTH.

The standard SmartThings attributes for Tamper should be ‘clear’ or ‘detected’. Currently you have them as ‘active’ and ‘inactive’, just like motion. I am sure it originated from a Fibaro-side issue, but if you could make the change to ‘clear’ and ‘detected’ in your DTH it would follow SmartThings guidelines and most importantly work in webCoRE!

SmartThings guidelines: http://docs.smartthings.com/en/latest/capabilities-reference.html#tamper-alert

It would be greatly appreciated! :grinning:

1 Like

Yea I know :smiley: I discovered it few days ago when writing DTH for other device. I was checking something in Capabilities Reference and spotted it then. I was going to update it in a day or two but since you put me on the spot… fixed version is on GitHub now :wink:

2 Likes

That, @ClassicGOD, is the most responsive post I have ever seen! You Rock!! :clap:

1 Like

Thank you @ClassicGOD

@ClassicGOD Great work…just got these and had an issue with the status ‘sticking’ with the default DTH.

One suggestion…please put in some sort of version control to the code so it is evident when you update it. Also, another suggestion from when I worked on the previous revision of the DTH by @gouldner …For the text entries maybe put in the value of the default just so a user can revert back should should the setting not work for them.

Anyway, glad you came out with this!

2 Likes

I’m not sure if I understand what you want me to do - the code is on GitHub and GitHub offers version control.

The settings screen will get a revamped in the near feature with explanations for settings etc - I just have to finish few other projects before :stuck_out_tongue:

1 Like

Just suggestions…while GitHub does keep version control usually it is good practice to just some versioning in the code. Most users here are savvy but some look for numbering in the code to ensure they have the latest version.

I got all of my problematic sensors using your code and it seems that fixed the “sticking status” problem. Great work!

@MichaelS Ah, I misunderstood you. :slight_smile: I’ll put the version in the code with the next update.

@anon36505037, I’ll consider it. The only issue I could see with this approach is that with a full featured DTH the settings screen (with extended explanations) will be pretty long already and adding another position could further impact readability.

1 Like

How accurate is the lux measurement on this sensor with this DH as I have not found a reliable way of detecting motion when it is low light and turning on lights yet. I have a couple of the previous Fibaro GEN5 motion sensors but could never get lux operating reliably with any of the custom DH’s out there (if anyone else has i’d appreciate knowing your setup).
Do people get good reliable results with this ZW5 sensor and this device handler?
If you could please let me know it would be massively appreciated. Cheers

Lee

We can’t talk about accuracy as LUX is surface brightness measure - not really measuring the light in the whole room, just the light shining on the sensor. So it’s strongly dependent on the position of the sensor and will not be identical for any 2 sensors in different places - that is why every sensor can be configured with it’s own Night/Day brightness value.

I personally find that I turn on my “low” lights when the sensor reaches the value of 5lux, I have it configured to report every change >= 5lux and every hour. The graf of the LUX measurement for very cloudy, dark and rainy day looks like that:

The sharp rise on the left part is caused by problems with internet access I had that morning so ignore it. The two spikes to the right are caused by turning on 1 Philips 13.6 LED Bulb (100W equivalent, 1521lm).

1 Like