Jump to content

THEN code only partly running


Recommended Posts

Posted

I am somewhat perplexed - I have two programs that perform different functions based on the same conditions, Please see the screen shots

177684474_ScreenShot2020-02-24at6_28_19PM.png.7a0e1fc1c3b14ba7b82bd463af007f98.png529557853_ScreenShot2020-02-24at6_28_29PM.png.79a056e1e33b254048d2950ea823ab14.png

 

The issue is both cases, the THEN state is invoked but in, how shall I say, a half-assed way.

For the Interior Motion program, the lights all turn on as programmed, but not to the levels specified - for example, the MAIN HALL LIGHT is programmed for 65%, but it turns onto 80%. Other lights are similarly incorrect. The other issue is it never gets past the 15 minute wait, so the two lights specific do not turn off and the others do not dim

Note that these are SCENES being invoked in the program, as all of them are virtual multi-ways.

In the case of the FRONT PORCH MOTION, it turns on but never turns off.

Is there a known issue with longer wait steps getting lost by ISY? I can't determine why the programmed steps would start but not complete.

Thanks

 

 

Posted

When a program enters a Wait or a Repeat, it is subject to preemption by another instance of the same program if the trigger events occur again. What’s more, because the trigger events are reevaluated, the new instance may take a different path, e.g. the Else path.

For example, if the Zwave multi-level sensor is in proximity to one of the lights turned on at the front of the Then branch, when it enters the Wait, the change in the light level may restart the program and cause it to go down the Else branch.

The solution is to have two programs, the first with your trigger conditions that executes the second program in its Then branch. The second program contains all of your commands/statements and has no conditions. The second program is also disabled. Therefore once it starts, that run of the second program won’t be preempted by new trigger conditions.

Posted

So meaning, in my current setup, if the motion sensor is triggered again while the programs are running from a prior trigger, they get borked?

I tested by just running the THEN statements from admin console, and it worked. But there was no action on my front porch during the test

So I'll try what you've suggested... my head was already going toward some interrupt issue with repeated motion, so you are seemingly confirming this... thanks

 

Posted

So this...

Trigger Program:

161648774_ScreenShot2020-02-24at7_25_20PM.png.d14e3eca6da1ac89a0a02cb2d150f280.png

 

Disabled Programs:

1293376873_ScreenShot2020-02-24at7_26_00PM.png.874081451051d6e64156a444846d6380.png

286598540_ScreenShot2020-02-24at7_26_50PM.png.76f79c1d0f81c1e8e76823aab9f7dda4.png

 

What I still need to see is why the levels aren't set as programmed...unless this addresses the issue by isolating the trigger conditions from the commands themselves...

 

Thanks

Posted

Yes. And in fact you may often rely on this “feature” in programs triggered by motion, where you want to turn the light on and have it stay on until, say, 5 minutes after the last motion, where you turn it off.

Generally the two program model works for things like the light level sensor where when lights are turned on causes the program to re-enter and go down a different (Else) branch. It will not work for multiple motion events, because the subsequent motion will cause the second program to be run again, preempting the one sitting in the Wait. Like I said, this is often desired behavior.

Posted

Ok, just tested and confirmed.

The only thing I cannot determine is why the dim levels are not correct. Depsite the dim level settings, they are turning on to their Scene default levels - I just checked.

Does this mean you cannot invoke programmatic control over a scene level? If so, I would have to individually load all devices in each virtual circuit, or just the load switch?

Thanks

Posted
45 minutes ago, Goose66 said:

I’m an Insteon user, not a Zwave user.

Well, the switches are all Insteon... only the Motion sensor is Z-Wave because it is on the porch and more weather resistant than Insteon's current offering...So the programs are sending commands to all Insteon products...

Do you know whether or not programs can set a scene level? I mean, it allows it, but doesn't seem to do it based on what is happening...

Thanks

Posted
Well, the switches are all Insteon... only the Motion sensor is Z-Wave because it is on the porch and more weather resistant than Insteon's current offering...So the programs are sending commands to all Insteon products...
Do you know whether or not programs can set a scene level? I mean, it allows it, but doesn't seem to do it based on what is happening...
Thanks
ISY can change scene levels of devices inside scenes but it should not be considered dynamic.

It takes time to send the new data and reprogram the eprom inside Insteon devices. Use multiple scenes. Insteon devices can hold about 256 different scenes each.

If you are only controlling one device from any program there is no point in not having confirmation of reception from your devices, and no retries.

Sent using Tapatalk

Posted
22 minutes ago, larryllix said:

ISY can change scene levels of devices inside scenes but it should not be considered dynamic.

It takes time to send the new data and reprogram the eprom inside Insteon devices. Use multiple scenes. Insteon devices can hold about 256 different scenes each.

If you are only controlling one device from any program there is no point in not having confirmation of reception from your devices, and no retries.

Sent using Tapatalk
 

Thanks for the reply but I'm not following. Currently, any SCENE in my program does not respond to the level called for in the program. It only turns on to the SCENE preset level, or will turn off.

So my MAIN HALL scene (virtual group of one keypad and two dimmers) is being instructed to turn on to 65% in my program posted above. It turns on, but at 80% (which is the default level in the scene)

In the case of the FRONT PORCH scene, its only a single switch, so no scene in the program - just the device itself and thats working as expected.

But all four MAIN HALL participant lights are multi-ways, so I was trying to avoid calling in every instance of the individual switches and instead call on the scenes set up for the multi-way. 

If I can't set the level to a scene from a program, do I need to add all devices in a scene, or anyone of them (or the LOAD switch only)?

I have plans to do many more like this, so want to get this understood. Adding three or four device instances for multiway circuits, when you want to control several, will become tedious and error prone to say the least.

Hope I'm making sense...

 

Thanks

Posted
Thanks for the reply but I'm not following. Currently, any SCENE in my program does not respond to the level called for in the program. It only turns on to the SCENE preset level, or will turn off.
So my MAIN HALL scene (virtual group of one keypad and two dimmers) is being instructed to turn on to 65% in my program posted above. It turns on, but at 80% (which is the default level in the scene)
In the case of the FRONT PORCH scene, its only a single switch, so no scene in the program - just the device itself and thats working as expected.
But all four MAIN HALL participant lights are multi-ways, so I was trying to avoid calling in every instance of the individual switches and instead call on the scenes set up for the multi-way. 
If I can't set the level to a scene from a program, do I need to add all devices in a scene, or anyone of them (or the LOAD switch only)?
I have plans to do many more like this, so want to get this understood. Adding three or four device instances for multiway circuits, when you want to control several, will become tedious and error prone to say the least.
Hope I'm making sense...
 
Thanks
Scenes are like station presets on your car radio. There is no 'sort of'. They are on or off.

You can reprogram them but not as you press the button, only as a separate process.

ISY can change scenes but expect about 2 seconds for the devices scene table eprom to get reprogrammed.

Sent using Tapatalk

Posted
41 minutes ago, thrang said:

If I can't set the level to a scene from a program, do I need to add all devices in a scene, or anyone of them (or the LOAD switch only)?

My approach would be, simply, to create another scene with the new levels you want them to come on.  All devices would be responders.  There is little practical reason that you cannot have a group of devices in multiple scenes, so long that you don't try to make any given device controller of multiple scenes.

Posted

I'd create a single scene and add all devices to that scene. 1 scene=1 activation.

Even though you have lights going on a few seconds after the program starts, simply change the ramp rate to equal that time. 

Posted

Thanks all. I think I have a better understanding, though it might be nice if a future version allowed definition of multi-way circuits as specially-classed scenes (as they are all responders for the same circuit). Call it a multi-way switch group perhaps. And these groups could respond to different program steps for levels, or ramp for example, since it’s all for a single circuit. This way, you are only creating one instance of those grouped switches that could serve a variety of customization needs. As it stands, one might have to create a lot of hardwired scenes to accomplish various levels for various needs.

Even in my example, I’d have to have another scene for the two lights I want to dim after 15 minutes.

 

 

Posted

The problem with that is links are stored within the device itself. Besides that, how is the system to know what you want at any particular time? While extra work, the most efficient way is the current way. Making things too complicated is worse than taking a few extra simple steps

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...