Comfort  Automation/ Security System Forums Home

 Moderated by: admin  
AuthorPost
schford
UCM Pi Users
 

Joined: Wednesday Feb 25th, 2009
Location:  
Posts: 248
Status: 
Offline

  back to top

Any Chance we coudl get the ability to set a flag straight from the Device to Comfort functionality rather than having to call a response to set the flag.

I want comfort to set a flag in each room so it knows whether the lights are on and off - which I can then use from a logic point of view to switch lights off / on etc.

Thanks

Stuart

schford
UCM Pi Users
 

Joined: Wednesday Feb 25th, 2009
Location:  
Posts: 248
Status: 
Offline

  back to top

Actually thinking out loud is suppose I could just use a counter to store the scene level and then check that the counter <> 0 for future logic.

schford
UCM Pi Users
 

Joined: Wednesday Feb 25th, 2009
Location:  
Posts: 248
Status: 
Offline

  back to top

hmmm obviously doing something wrong with counters (never used them before) is there anyway I can check what is being stored in them through comfigurator?

In UCM Universal I have told it to write to a counter (playroomlight) - I want it to write the last 2 numbers which show the state of the light eg out of <20:00:03 I would want it to write 03 (This is actually scene 1 coming on in room 20.) I believe that as Counter Data Byte/Field offset is 3 this is what it should be writing.

I have created a counter called PlayroomLight to store this data in.

Then when the light would go off it would recieve <20:00:00 and it should write 00 into the counter PlayroomLight

In my response called PlayroomPIROn I have the below (the first part of the timer is used with PlayroomPIRff to switch light off after 30 mins of no movement - this bit keeps resetting timer on movement)

the second bit is designed to only switch the lights on if it is night and they are currently off. (playroomlight is the counter name) - thinking it through i really do want to use counters as for a particular scene in kitchen and living room we are still for a logn time so would want to be able to lengthen autoswitch off.

***

If Timer Playroom <> 0 Then
Stop Timer Playroom
End If
If NightTime <> 0 And Counter PlayroomLight = 0 Then
Do PlayroomLightOn
End If

***

Its not working - so either I have something wrong with my code in the response or the info I need is not being written to the counter. Cant figure it out so help gratefully received.

To explain what I mean when I say it is not working - it keeps switching the light on even if the light is all ready on :-)

Thanks

Stuart

Last edited on Monday Oct 24th, 2011 09:12 pm by schford

schford
UCM Pi Users
 

Joined: Wednesday Feb 25th, 2009
Location:  
Posts: 248
Status: 
Offline

  back to top

Any one got any ideas - am completely stumped! as to how to use counters to store light state for each room..

slychiu
Administrator


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

  back to top

your selection of the byte number may not be correct
Cab you send your cclx file to support@cytech.biz so we can take a look

schford
UCM Pi Users
 

Joined: Wednesday Feb 25th, 2009
Location:  
Posts: 248
Status: 
Offline

  back to top

Thanks - sending it over now :-)


UltraBB 1.172 Copyright © 2007-2014 Data 1 Systems