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

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

Thats really interesting, thanks.

Out of interest what software did you use to record and extract the reading information to your graph?

I’m using InfluxDB Logger by @zcapr17 to send the data to InfluxDB database that I run on my FreeNAS box (in a Docker container) and then I display it using Grafana (another web app that i run in Docker container on the same FreeNAS box) - the post for the InfluxDB logger has a tutorial if you want to do it (if you have FreeNAS Coral installation it’s much easier - just install the 2 docker containers and you are basically done). If you want something similar but easier you can try initialstate.com - they have tutorial on their site if I remember correctly.

1 Like

@ClassicGOD thanks for that detailed info on the lux.

@leewilko for lux and lights I use a combination of these sensors lux in addition to the lux in the smart weather app when I create my core pistons basically most of my logic is motion lux is less than 7 and external lux most be less than 10, for me that combination tells me its nighttime.

I actually purchased this sensor because of its ability to go up to 32,000 lux. For me, I wanted a sensor to be able to detect direct sunlight rather than just low light levels so that it can operate some skylight blinds but only when the sun was directly shining on them. For my application they work flawlessly. I have set the custom DH from @ClassicGOD to register lux every 15 min or sooner with a change of lux of 5000 or greater. For most that would be strange but for me when the lux jumps from no directly sunlight (~500-10,000) lux to direct sunlight ~20,000lux+ it will register in seconds and down go the blinds.

That being said I agree with the others about the low lux levels (>10 lux) I find it accurate as well for some internal lights that work as well on it.

@ClassicGOD This DTH does not render very well on the new Android 2.4 version.

Putting a space before the \n in the tiles works for me :smile:: Edit: at lines 48, 63, 66

3 Likes

Which line of the code are you referring to in the DH? I’ve looked and can’t find a \n to update. Any guidance would be appreciated…

Lines 48, 63, 66 :stuck_out_tongue:

I’s an bug in SmartThings app, why it’s not fixed yet I have no idea.

3 Likes

Coz its ST, just like they have not bothered to fix Dynamic Pages on droid which they broke between a beta and the release. The mind boggle sometimes lol

I’m very new to ST and I just ordered a few ZW5 sensors. But I’m having confusion issues on getting this software installed. I already have the GIThub connection, and when I go into device handlers I see the ClassicGod items…plus 200+ other items (I do have a couple other GIThub sources linked). So which device handler objects do I need to publish for full ZW5 integration with ST? I can’t tell if there’s a ‘master’ ZW5 object that does everything or if I have to publish multiple items to get all the features.

To be on the safe side, go to the link at the top of the page and install that DH manually (from the IDE, CREATE New Device Handler, then select from Code, paste the code, Save, Publish for Myself) Then under My Devices, find the Sensor, Edit, then select this one which will be listed close to the very bottom of the list. That is all you need to do. However once done, and if you have added the GlassicGod repository to the IDE correctly then, go back to the Device Handlers Tab, click on the little icon to the left of the name of the DH (three dots and lines) and select the relevant Repository under “GitHub Repository:” You may have to check under the Settings button at the top of the list of DH’s as most devs list their repositories as SmartThings or SmartthingsPublic which makes it difficult to identify and do updates easily but it is what it is. This should work fine though and you will have the DH installed and linked to he correct repository.

I tried to follow, and the instructions made sense. However, I’m not at all positive the DH is actually working. In the iOS SmartThings app the device home page looks the same (motion, battery, temp, lux). I’m pretty sure the DH didn’t get activated.

In ST on the page you mention click on the little cog (config) in the top right hand corner of the screen. You should get a list of options you can change, the stock handler does not have these. If you do not have these options then go back to the Device itself in the IDE, edit it, select the Device Handler drop down, scroll to pretty much the bottom if the list and select the handler listed there, Save and go back to the ST app and check the config icon again.

Nope that simply isn’t working. I have no options, and going to the bottom of the list of device handlers and pick it doesn’t change anything in the ST apps. I just see the stock handler.

Sorry then Derek, there must be something not setup correctly somewhere if you followed the steps. Hopefully someone else may have a few ideas. You could always delete the handler via the IDE and add/publish it again ‘from code’ (from the link in the 1st post) then assign it to the device. Perhaps something just got stuck somewhere.

1 Like

Ok I did a manual copy/paste instead of pulling from GIT, and it worked. Thanks!

@ClassicGOD Your DTH is working great. Thank you.

The UI on my phone is somehow showing smaller font.