PDA

View Full Version : Building a Class from a scenario


rhamer
16-07-2005, 09:14 AM
Does any body have an example of building a class from within a scenario? And also when do you run it.

I am finally finding time to recommission my Thinkboxx in my new house and I want to build the classic 'All Lights' class. I didn't do it this way in my old place, I just used a C-Bus area address.

I remembered if you build the class by hand using the GUI when the controller is reloaded it looses all the class elements. So you have to do it in a scenario.

I created a scenario called 'Build All Lights Class' and put stuff like this in it;

Add 'Bathroom 37 [Lighting]' to 'All C-Bus Lights'.
Add 'Bedroom 2 WIR 24 [Lighting]' to 'All C-Bus Lights'.
Add 'Bedroom 2 23 [Lighting]' to 'All C-Bus Lights'.
Add 'Bathroom Vanity S~01 [Lighting]' to 'All C-Bus Lights'.
Add 'Bedroom 3 25 [Lighting]' to 'All C-Bus Lights'.
etc.....

I then included this scenario in my always scenario so it would add the elements on startup.

That all worked ok, but then I noticed that Thinkboxx stopped doing anything else. It seemed to be hanging.

I removed the include from the always scenario and reloaded the controller and it works again.

So am I doing it correctly? I even read the Thinkboxx manual and I think I'm doing it right.

Any Ideas?

I am using V4.0.6

Regards

Rohan

Forumadmin
17-07-2005, 11:59 PM
Hmm,

The Class needs to be loaded if one of these things happen. Minder comms or a controller restart. Hope it makes sense.

Create "system Monitor" scenario
place something similar to these into it. Explains itself.
{
If 'Minder Comms Lost' is 'On', then include 'Class Initialise'.
If 'Controller Restarted' is 'On', then include 'Class Initialise'.
}

Create a Scenario "class initialise"
{
Reset 'Controller Restarted'.
... Lighting Control
Add 'light1 [Lighting]' to 'Lighting Class'.
Add 'light2 [Lighting]' to 'Lighting Class'.
etc,
etc.
...
Exclude 'Class Initialise'.}

Works a treat.
Cheers
:)

rhamer
18-07-2005, 08:11 AM
Thanks Ross,

I thought it would be something like that, but I wanted to find out from someone who has actually done it.

Thanks again.

Rohan

Forumadmin
18-07-2005, 02:07 PM
No probleemos.