Comfort Home Automation/ Security System Forums Home
Home Search search Menu menu Not logged in - Login | Register

Response syntax
 Moderated by: admin
 New Topic   Reply   Printer Friendly 
 Rate Topic 
AuthorPost
 Posted: Friday Mar 10th, 2017 10:30 am
   PM  Quote  Reply 
1st Post
Julian.Driver
Member
 

Joined: Tuesday Aug 26th, 2008
Location:  
Posts: 67
Status: 
Offline

  back to top

We are currently writing in to Comfort control of some swish curtains we have, and this has prompted some questions about the use and design of responses:
  1. If we write a response with the wizard which uses a CBus command, does that CBus command needs to be in a response in order to use the ‘Do’ command? If I was to edit the command manually would it be permissible to write: Do Cbus RampInst UCM03 23 0 after 15 seconds using curtain2 or some similar statement?
  2. The curtains we are using have toggle logic built in. So we apply a voltage for ~10 seconds, this drives the motor till the curtains are closed. It senses the end of travel and stops the motor. The next time the power is applied to the motor the curtains travel in the opposite direction till fully open, and so on back and forth each time power is supplied for a period. The only way to keep track of curtain position is to have a flag change state each time, which can sometimes get out of synch. My question is would it be better to use the blinds function for this purpose as that is, I believe, stateful?
  3. This code unbypasses before the curtains have stopped moving, thus setting off the alarm:
Bypass Lounge
Do LivingPwrON                                                           [Cbus RampInst UCM03 23 255]
Do LivingPwrOFF After 15 Seconds Using Curtains2      [Cbus RampInst UCM03 23 0]
Unbypass Lounge
How do I get the ‘unbypass response’ to wait till all commands are complete before completing?



 Posted: Saturday Mar 11th, 2017 01:41 am
   PM  Quote  Reply 
2nd Post
slychiu
Administrator


Joined: Saturday Apr 29th, 2006
Location: Singapore
Posts: 3878
Status: 
Offline

  back to top

If we write a response with the wizard which uses a CBus command, does that CBus command needs to be in a response in order to use the ‘Do’ command? If I was to edit the command manually would it be permissible to write: Do Cbus RampInst UCM03 23 0 after 15 seconds using curtain2 or some similar statement? The Cbus actions must be part of a Response. Do Response will execute a Response.

You can edit the Response manually, but make sure the syntax is corrrect, otherwise an error will be flagged



The curtains we are using have toggle logic built in. So we apply a voltage for ~10 seconds, this drives the motor till the curtains are closed. It senses the end of travel and stops the motor. The next time the power is applied to the motor the curtains travel in the opposite direction till fully open, and so on back and forth each time power is supplied for a period. The only way to keep track of curtain position is to have a flag change state each time, which can sometimes get out of synch. My question is would it be better to use the blinds function for this purpose as that is, I believe, stateful?

The Blinds Function in Comfigurator uses 2 outputs as Up and Down
In your case there is only 1 button for up and down. The blinds has a controller which decides which direction to apply power based on its own logic, so the button does not apply the power to the motor directly
So the best way is to use a flag which toggles every time.
If you want to ensure synchronisation, install a switch or contact when the blinds is in 1 end or another



This code unbypasses before the curtains have stopped moving, thus setting off the alarm:

Bypass Lounge Do LivingPwrON [Cbus RampInst UCM03 23 255]

Do LivingPwrOFF After 15 Seconds Using Curtains2 [Cbus RampInst UCM03 23 0]

Unbypass Lounge

How do I get the ‘unbypass response’ to wait till all commands are complete before completing?


This is a common misunstanding of how the "Do Response after X seconds using Timer"  works. This action starts the Timer and immediately continues to the next line, ie Unbypass Zone. The Timer thread will turn off the power after 15 seconds, so you have unbypassed the zone immediately after you bypass ie effectively no bypass at all

Use the "WAIT for X seconds using Timer" action which waits inline before the next line.



 Posted: Saturday Mar 11th, 2017 01:43 am
   PM  Quote  Reply 
3rd Post
slychiu
Administrator


Joined: Saturday Apr 29th, 2006
Location: Singapore
Posts: 3878
Status: 
Offline

  back to top

By the way another way of controlling cbus is to map Cbus addresses to Flags or counters
If mapped to flag, setting or clearing the flag will turn on or off the cbus relay
If mapped to Counter, putting a value into the counter will send the value to the cbus dimmer



 Current time is 12:25 am
Top




UltraBB 1.172 Copyright © 2007-2014 Data 1 Systems