Jump to content

Program to force light sensor status update


landolfi

Recommended Posts

Posted

I am troubleshooting an old ancient Insteon light sensor connected to an IOLinc that normally reports On when the light level is low enough but it struggles on overcast days. It responds immediately in AC to light changes that are obvious but the problem is that it is reporting Off to AC in marginal light changes but never subsequently reporting On in AC after that even though by then it's completely dark. This usually happens in batches of 4 or more where it goes on/off, then on/off again and Off is the final status when it's completely dark, causing lights not to go on. I'm using it for low light conditions to turn on front room lights when it gets dark regardless of time of day and off when it brightens up again, including the next morning.

In thinking about this it makes sense to me that the sensor depends on a certain degree of light level change to report a new status. So my question: Will this program below solve the problem of the light sensor not reporting its status to AC because the light level change isn't large enough? I don't care what happens after 23:15 because it's lights off after 11:30 anyway.

And yes, I know I can get a better light sensor for Zwave and I even have some, I just have trouble parting with stuff that still works.

Check Light Sensor - [ID 000D][Parent 0001]

If
        From    12:01:00AM
        To      11:15:00PM (same day)
 
Then
        Set 'Light Sensor - Sensor' Query
 

 

Posted

A program like that will normally only trigger once, when the time interval becomes true for the first time. Ideally, you'd want to mathematically integrate the analog value of the sensor (take several samples over time and take an average).

The thing is, you're not reading an analog value, only on/off. The iolinc should normally report a status change when it occurs. So instead you'd need to integrate the on (or off) duration time over a time interval instead, like a duty cycle measurement. 

But let me ask you, what is this light sensor? A Light Dependent Resistor (LDR)? If so, there might be a way to calibrate it's sensitivity with an external potentiometer or something.

Posted (edited)

It's a Minotaur light sensor, I think I bought it in the early 2000s. It does have a potentiometer, but it was working at the current setting until recently. I suppose it could become less sensitive as it ages? But it was a bit finicky to adjust and generally (90% of the time) accurately detects when light is needed, which is why I would prefer to leave it as is if possible. The thing is, when the light sensor fails to activate because it turns off when light is already low, as described above, if I query the device it immediately shows On status.

As far as I understand, the Light Sensor turns On when light is below the pot value and Off when it exceeds it, but nothing more, there's no lux value. The IOLinc isn't controlling anything directly (nothing is directly connected to it), so as far as I know its function is just to forward the report of light sensor status to the PLM when it receives a report from the light sensor. Could it be something in these IOLinc settings? These settings are the same for both Light Sensor and IOLinc.

 

image.png.89b9f12ab6156804ca9bac903b35231c.png

Edited by landolfi
Posted

So the problem seems to be one of hysteresis, where the varying light level isn't tripping the sensor output reliably unless the swing in light level is large or fast enough. There isn't much that you can do to program around that if you don't have an actual analog light level reading.

The momentary C setting above is for the output relay of the iolinc, so it isn't relevant to what you're using it for.

Posted

A couple of other things related to the iolinc:

  • If the io linc is old, it could be failing. Unhook the light sensor and try completing the circuit several times to see if you get consistent operation directly
  • The io linc is single band, powerline signals only. Something could have been added to you electrical system that is intermittently blocking the signal to the plm. Try temporarily plugging a dual band plug in device like a lamplimc behind the iolinc and see if things improve
Posted

The IOLinc is a spare I switched to about a year ago when I thought the one I had might not be reliable any more (turns out that one just needed to be reset). This spare had never been used in the 5 years I had it and has been working reliably, so I think it is reliable. When this problem occurs I do not see any reports from the light sensor in the eISY log until I force query it, and when I do, it reports On and AC updates. But I suppose if the line is noisy enough the sensor status report would be completely lost and would not appear in the log at all. There were some X10 commands in the log around the time that there might have been an update from the sensor, so I have disabled that program. Maybe that was it all along.

Good idea to watch the status light on the light sensor, but I suspect I am going to find it is on but the problem is that the PLM/IOLinc just don't know it. Hence my attempts to force the AC to query the sensor to get it to report its current status. If I were to try to do what my simple program above intends, it sounds like I need to add a repeat to the program, something like every 15 minutes.

And to add to the complexity, the light sensor On status update is getting passed on to Home Assistant by the UD Home Assistant integration to inform Home Assistant to turn on some other Zwave lights. So it occurred to me I could use one of my Zwave lux sensor levels in Home Assistant to give the light sensor an assist in case the Zwave sensor knows it's dark but the Insteon light sensor update On from UD hasn't yet been set. That's probably the easiest way to go.

Thanks for all the suggestions.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...