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
If NightTime <> 0 And Counter PlayroomLight = 0 Then
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 :-)
Last edited on Monday Oct 24th, 2011 09:12 pm by schford