I wonder if the area you have it in doesn’t change more than 200. 123 lux would mean that the range could be from 0 - 323 before you will see it change…So until you reach 324 or more you will not see a change unless you change the preference from 200 lux to trigger notification.
Maybe try shining a bright flashlight or better yet a camera flash at it to see if it send a new value.
OK now for the strange part. I just stuck my phones led in flashlight mode directly in front of the sensor. It reported motion, and changed the lux setting from 36 to 42 to 61. Now with the flashlight removed it still reads 61.
All change < 200 but still reported.
Then I tried a high end camera flash (from SLR) which is REALY bright…no change in reading. still 61
Then I tried a weak flashlight…reading down to 50.
Then I tried taking it outside, pointing at setting sun behind clouds…reading 3656
Now back in the room it was originally in with same lighting…reading is 114 now and sticking…
OK I admit I don’t understand this thing
I think I will work on adding the parameters so we can play with them a bit. I will report back here when I make the changes.
I pushed the two preferences to my github version of this device code.
Two new added preferences.
Pref#40 Illum Report Threshold (Default 200 out of box)
Set to #lux to report…still not sure how this behaves. Based in my testing it reports on smaller changes as well.
0 will not report based on changes
Pref$42 Illum Report Interval (Default 0 out of box)
0 - no reporting
<5 warned as too low and may cause temp value not to report
(I am testing with 900 which is 15min)
I find the interval setting works well. I testing with 90 seconds and it was reporting very small changes every 90 seconds. I don’t know how quickly this will drain battery at settings like 15min, 5min etc I may leave one of my sensors set to 15min interval and see how quickly the battery status drops compared to my other sensor which I will leave set to 0 report interval.
Thanks for the update, I tried this as well with my phone light and was able to see the LUX change, but only if there was a big change in light. I’m not able to see the updated change from a darkroom to a room with the light turn on.
This is a important action I need to setup for some automation, ie lights turn off during the day .
Oh quick question. can I just over right the old device code with this new decice code?
Yes, just cut and past over existing, save and publish.
I usually close the app before doing this but sometimes forget, when I forget sometimes it works and sometimes it crashes the app but I can just restart it.
After you publish you should see the new preferences on the preferences page. Just set your values and do the triple b-button, config step.
Illum Report Threshold @ 40 and Illum Report Interval 42. I’m going to try to set a limit on amount of light (LUX) in a room so when it gets dark and there motion it turn on the light.
i get this line when trying to post your code to switch off fibaro led. Sorry still new to groovy code.
No signature of method: script1474211205979705066487.metadata() is applicable for argument types: (script1474211205979705066487$_run_closure2) values: [script1474211205979705066487$_run_closure2@126e8c01] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)
If you log on to the ide, you can look at your device and you will see what Device Type Handler (DTH) it is using.
As you are unsure which handler it is using and you haven’t installed one, I would suggest you are using the the stock one.
I am having an issue getting this to work. The original intent was to add functionality so that I can turn off the LED status light of the motion sensor. I have a Fibaro Motion Sensor ZW5. When I create a new device handler and paste the code the motion sensor no longer works nor does the vibration. Lux and temp still work just fine. Then after go into preferences and change to NO LED the motion sensor never changes. Any help will be greatly appreciated.