Error with Lux off Handler in Motion and mode lighting

Hi I have a rule that turns on lights with motion when lux levels are lower than say 15. I then have in that rule an option that says turn off the lights if the lux level exceeds 16 lux. This is the error I am getting in the logs. It looks like it is looking for a different "number type"

Are you able to show a screenshot of the rule? (I expect it will be something for HE staff to look at, but can still help provide context).

1 Like

I think so to

1 Like

EDIT: Sorry, got mixed up with which thread I was on with my last comment....

Thanks for posting the screenshot.

What about the definition of what I assume if a variable, Virtual Average illuminance? Could it be a string?

Not sure, it uses the same "value" for turning on which works fine as I use this reading in multiple rules. This is the first time I have used the "value" to turn the light off. I think it definitely has something to do with what the code is expecting to see. My issue is it works with the on event??

EDIT: The virtual Average illuminance is a virtual device that gets it's reading from an app that takes 2 lux readings or more and averages them.

Hmm, yeah I would think it should work as well, from what you've described.

Out of interest, does the virtual device show the decimal place in the lux attribute?

These are the values of the virtual device.

Lux3

While we wait, one thing you could try is changing the value in the motion lighting rule to include a decimal place for the 15 and 16, so making them 15.0 and 16.0.

Alternatively, if you can set the illuminance value through some kind of command on the virtual device, and set it to an integer, with no decimal places, that won't necessarily fix the issue, but may inform what the fix needs to be.

Simon

In the Motion app you can't add a decimal and I am unable to change the device readings either.

Ok, worth a shot, hopefully the HE gurus will be able to work it out for you.

1 Like

@mike.maxwell @bobbyD If possible have a look at this error in the first post.

Thanks

Is this driver something you wrote? Lux shouldn't be a decimal number.

2 Likes

Hi bobby

Thanks for looking , I use a driver from Markus. I know he has left but it has been working well for quite some time. What I don't understand is it works fine turning it on in a number of my rules using the same info?

These are the values for the LUX device

Lux4

EDIT: I have gone into the driver and changed it to show no decimal places. Lets see if that works?
The app that I am using to average 2 LUX reading devices is from @bptworld called averaging plus. I will see if I can ask @bptworld if we can have an option to drop the decimal place.

Thanks booby for having a look.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.