Vera service (or lack of)

Each meshbot with LUX control has failed so no change there still have random failure of unreachable modules and MBR Lamps and Living Room module come on by there self at about 1:30 am also my remote fails more than it is successful

You might need averaging and hysteresis on the LUX sensor to get any joy. Not sure if meshbots offer an averaging function but I think MSR does.

Further to avoid tripping around a single data point it is generally better to trip around a guard band referred to as hysteresis. This can be accomplished by triggering relative to a variable instead of a constant. When you trigger to off, say, then you reset the variable to the higher trigger level. Then when you trigger to on you reset the variable to the lower threshold. This builds in the hysteresis window… Very commonly used in analog circuits with electronic components, easily duplicated in code as noted here.

zlSFz

I use boolean to control when lamp or outlet are triggered, I use the < to trigger
thank you

hmmm. Yes but do you do the inverse if >trigger? (If not then the below is moot)

i.e. <trigger turn on, >trigger then turn off

That would be a problem. As the signal hovers around the trigger level it will toggle above and below the threshold creating a toggling and possible race condition. This is why a hysteresis guard band is recommended to avoid that toggling.

Turn off
Set variable = trigger+guard band

loop
If reading >variable → turn on, set variable to trigger - guard band
If reading < variable → turn off, set variable to trigger +guard band

Has boolean changed in ezlogic ? < than means less that number I provide, so how can it be in between?
If I state IF < than 25 there is nothing between this either it is less or it is more
I have to reboot 5 or six times a day to get my controller to trigger the device(s) in my logic and if I do not use a Mesbots just to turn off a light manually by dashboard can take 20 times or more then If I reboot it works first time then stops working again after a period of time that is inconsistent

What happens when the LUX sensor is just transitioning through your set trigger point? Say light level has gradually risen for past 20 minutes and finally just came up to your trip level. So now LUX > trigger point, perform action. Then 200 msec later the signal drops to < trigger point perform reverse action? Now light switches off. and so on and so on. This can result in output chatter until the signal is well above the trigger point such that noise excursions never take it below trigger point. The notion here is real world signals are not perfectly clean outputs. The concept of hysteresis is used to prevent oscillations of a logic function while transitioning through the trigger point.