Invalid Encryption Key

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:

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.
 
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:

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.

Thanks Fred for you reply. With Leighton's programming, the program just keeps on repeating every 15 minutes. which programming line is considered a tight loop?
Now with my touchscreen problem, HAi snaplink or PC access can still connect with the controller even if the touchscreens are having problems connecting.
I replaced the switch with a managed gigabit switch last weekend..lets see what happens
 
15 seconds would not be a tight loop, or even 5 seconds for that matter. A tight loop is programming that is REPEATEDLY generating commands/events faster than they can be executed. These are almost always logic error doing something similar to my previous example.

In Leighton's programs I don't see a loop in the code that was posted but this is probably not the only code in his system. Also that code is not exactly the code in his system because he mentioned a typo. What I saw looked fine except for the one item I pointed out (the typo). I don't have enough info to say much more.

If you suspect this sort of problem in your programming, check your work carefully.
 
15 seconds would not be a tight loop, or even 5 seconds for that matter. A tight loop is programming that is REPEATEDLY generating commands/events faster than they can be executed. These are almost always logic error doing something similar to my previous example.

In Leighton's programs I don't see a loop in the code that was posted but this is probably not the only code in his system. Also that code is not exactly the code in his system because he mentioned a typo. What I saw looked fine except for the one item I pointed out (the typo). I don't have enough info to say much more.

If you suspect this sort of problem in your programming, check your work carefully.
I don't suspect this sort of problem in my programming because only the touchscreens are having connection issues. Iphone using Haiku software and PC access can always connect without problem.
thanks
 
I don't suspect this sort of problem in my programming because only the touchscreens are having connection issues. Iphone using Haiku software and PC access can always connect without problem.
thanks
Hi Homeboy

It could very well be a programming issue. The system might be executing a program block with a lot of commands very quickly and as Fred mentioned the touchscreen priority is placed lower and because there is latency on the network the touchscreens are not communicating timeously so they loose connection. Hence the "invalid incryption key". My code was doing much the same with all the irrigation zone stops so i have streamlined my code and it is working better.

Regards
Leighton
 
Back
Top