|
|
|
|
Have your Ocelot Communicate directly to HAL 2000If you have an Ocelot controller connected to HAL 2000 and need a way to have the Ocelot communicate to HAL without sending X-10 signals, look no further... IMPORTANT: You will need at least 1 real SECU-16 module to make this work. Tasks: 1. Setup Ocelot and at least one real SECU-16 with HAL. 2. Update your Ocelot firmware and set parameter 25 to 5. 3. Create ASCII messages and upload them to the Ocelot. 4. Create equivalent "dummy sensors" in HAL 2000. 5. Write code in Ocelot to send ASCII message based on an event. 6. Create rules in HAL to act on "dummy sensor".The Ocelot controller can have a program running in it at the same time as it is connected to HAL 2000. If you have written a program to run in the ocelot you can instruct the Ocelot to send ASCII messages to HAL that look just like a SECU-16 sensor. This way you can have HAL 2000 execute actions based on events in the Ocelot. I showed this to a friend and he created about 50 ASCII messages in his Leopard Touch Screen which now communicates directly to HAL 2000. Basically what we are doing is fooling HAL 2000 to think that a sensor in a "non-excitant" SECU-16 module turned on or off by sending the exact same message HAL 2000 expects to see. Here is the message structure that the Ocelot sends when a sensor turns on or off. Actual ASCII message:
Where-
First be sure to have your Ocelot (or Leopard) and SECU-16 working with HAL. Make sure you address the SECU-16 with the CMAX software and also enable Adicon / Ocelot I/O sensors in HAL 2000 system settings. You should update your Ocelot firmware to the latest version. Please go here to get at least 2.0b software. After you update the firmware in the Ocelot be sure to change parameter 25 to 5. This parameter is the "wait time" that the Ocelots RS-232 will go to sleep after it sends an ASCII message. Valid numbers are between 1 and 50. "1" is 1/10th of a second, not 1 second therefore 50 is 5 seconds. This is important to reduce, because you don't want the Ocelot to be blind to HAL after you send the ASCII message for the full 5 second default setting. Determine how many different "bogus" sensors you will create. You can always add more at a later date. Next you will want to create and load the ASCII messages the Ocelot will send. You only have to do this once, but keep in mind you do have to load these messages into the Ocelot. When you create these ASCII messages you will pick a unused module address that you are never likely to use. I only have 5 real Adicon modules so I choose to use module number 9. You will also need to determine if you will have a separate message that turns off the sensor in HAL. For example; all my messages (8 of them) simply trigger an event in HAL. To accomplish this I only send the ON command for the sensor input. I never need to send an OFF command since I am just using this as a "trigger". If you want HAL to know if the same sensor is OFF then you will need to create 2 messages for each action and send a separate message to represent the ON and OFF commands. Here is a screen snap-shot of the ASCII messages I use to communicate with HAL 2000. As I mentioned all my messages only turn ON. I am using module 9 inputs 0 through 7. You will create these with the CMAX software that came with your Ocelot. After you create your ASCII messages, be sure save them to a safe location on your PC. Important: You will then Connect to the Ocelot and from the "Serial Messages" menu select ASCII messages. Open your saved file and SEND them to "Master Unit 0" (Which is the Ocelot). You will see the messages being uploaded into the Ocelot. For each message that you created you will then need to add a sensor in HAL 2000 that has the same address and input. Then you will be able to use this sensor in your rules within HAL. Now all you have to do is write some code in the Ocelot to send whichever message you require to trigger the equivalent sensor. Be sure to send the message to "Module # 0" (which is the Ocelot). I think in most cases this is pretty strait forward, however I did have to use a workaround to make this work properly in my particular application. (You may not have to use a timer to send the message, but if it does not seem to work and you have followed the steps above then do as I did and it should work just fine.) For some reason the Ocelot would not send the ASCII message when I was executing certain events, therefore I needed to delay the ASCII message a few seconds. You may not have to do this, but I will show you how just in case. In the screen shot below you will see on line # 53 that I turn on a timer (in place of sending the actual ASCII message). The command (Timer # 1 = 1) means start timer # 1. Then later in the code I have a section that evaluates the timer. If it expires, in my case 4 seconds later, then the ASCII message is sent to HAL 2000. If this approach is necessary you will have to do this for each ASCII message. Once I got this up and running it has worked flawlessly. Please let me know if you were able to send messages without the use of a timer or if you had any problems that were not listed. |