HAI_fjh
Active Member
Homeboy,
Grouping multiple commands in a single block is not the problem, in fact it is preferred. I do the same thing for several blocks. I have blocks triggered by various buttons (Away, Sleep, Vacation, etc.) When I arm away it runs the Away button. I have implemented it as a button because sometimes I want the house in the "Away" mode without arming the system. In the "Away" block I turn off all the lights, fans, etc. that should be off when I am away. I don't use the "ALL OFF" command because many things like outdoor lighting, sprinklers, pool pumps, etc. are controlled by automation schedules and go on and off according to schedule.
An example of a tight loop is:
This is what happens:
When the living room goes ON, it triggers the first event. A command is sent to turn the light to go off. This command is put into the serial queue and sent out the PIM. Next a notification is set out to all of the network devices and an OFF event is put into the event queue. All these things happen in less than a second. This is not a problem, but the OFF event triggers the second block. This event is processes and puts an ON command in the serial queue for the PIM, and corresponding ON notifications in the network queue, and an ON event in the event queue.
Since there are no time delays specified, this ON/OFF sequence repeats forever as fast as the events can be processed. The problem is that the events are processed much faster than the commands can actually go out the PIM or across the network. Within a very short time these queues fill up. Now when your touch screen asks for something the response ends up at the end of the queue and depending on how many items are in front of it, the response may not actually get processed and transmitted back in time. This results in timeouts, retries and eventually disconnects.
This is a SIMPLIFIED version of what goes on but you can see the problem. Check for programming where command A, triggers command B, that triggers command A with no delays in between. This is a tight loop.
Grouping multiple commands in a single block is not the problem, in fact it is preferred. I do the same thing for several blocks. I have blocks triggered by various buttons (Away, Sleep, Vacation, etc.) When I arm away it runs the Away button. I have implemented it as a button because sometimes I want the house in the "Away" mode without arming the system. In the "Away" block I turn off all the lights, fans, etc. that should be off when I am away. I don't use the "ALL OFF" command because many things like outdoor lighting, sprinklers, pool pumps, etc. are controlled by automation schedules and go on and off according to schedule.
An example of a tight loop is:
Code:
WHEN Living Room ON
THEN Living Room OFF
WHEN Living Room OFF
THEN Living Room ON
This is what happens:
When the living room goes ON, it triggers the first event. A command is sent to turn the light to go off. This command is put into the serial queue and sent out the PIM. Next a notification is set out to all of the network devices and an OFF event is put into the event queue. All these things happen in less than a second. This is not a problem, but the OFF event triggers the second block. This event is processes and puts an ON command in the serial queue for the PIM, and corresponding ON notifications in the network queue, and an ON event in the event queue.
Since there are no time delays specified, this ON/OFF sequence repeats forever as fast as the events can be processed. The problem is that the events are processed much faster than the commands can actually go out the PIM or across the network. Within a very short time these queues fill up. Now when your touch screen asks for something the response ends up at the end of the queue and depending on how many items are in front of it, the response may not actually get processed and transmitted back in time. This results in timeouts, retries and eventually disconnects.
This is a SIMPLIFIED version of what goes on but you can see the problem. Check for programming where command A, triggers command B, that triggers command A with no delays in between. This is a tight loop.