How to parse the "Context" from HB

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
James D
Senior Member
Posts: 134
Joined: Wed Jun 06, 2007 3:30 pm
Location: Baja California

How to parse the "Context" from HB

Post by James D »

Hey forumers,

I was wondering how I can parse or pull the "context" of a panel from HB so I can select different modes on my lighting theme.

Does any one have a script?

Thanks
James D
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Re: How to parse the "Context" from HB

Post by Osler »

I don't know if you can get at it with a script....not sure.

Is the panel enter list contexted? You could use this to set the mode if it is. If it isn't contexted, this may be a good feature request.

Osler
James D
Senior Member
Posts: 134
Joined: Wed Jun 06, 2007 3:30 pm
Location: Baja California

Re: How to parse the "Context" from HB

Post by James D »

Yes the panel is "Contexted."
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: How to parse the "Context" from HB

Post by Richard Naninck »

So what exactly do you want to do. I control all my lights through a single but contexted pop panel controlling a script as well as for my hvac control in all rooms.

You can define buttons in the panel which put a command in somekind of action property which triggers a script to do something. A button can put a single command in the action property which is unique per context.

For example:

You have a button called 'Light On' and it puts somekind of command in somekind of action property like 'Device^Room light^On. For your bedroom context you can then set 'Device^Bedroom^On and for your living room you can use a different context on the same button setting Device^Livingroom^On.

The script will do the rest as long as you send the right commands per context.
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Re: How to parse the "Context" from HB

Post by Osler »

Yes, I understand the panel is contexted. I mean the PANEL ENTER LIST. This is where you can set certain things to happen (property changes, task exectution, etc.) when a panel is entered. I am just not certain if those lists are contexted. I am home now, though, and it doesn't appear that those lists are context sensitive. Neither are tasks. The only way I can see to do this is to have a seperate script to open the panel for each context and also change the mode at the same time. Instead of a panel change button, use an execute task button to start the script.

Osler

Edit: I see Richard has already pointed that out.
James D
Senior Member
Posts: 134
Joined: Wed Jun 06, 2007 3:30 pm
Location: Baja California

Re: How to parse the "Context" from HB

Post by James D »

Attached is the idea I was looking for. You guys is probably right. And gave another idea to look at. I think I am going to create a property buttons that (when the context is changed) sends a certain property value for that context, then make a "task" will execute what I need.
Attachments
PANEL.jpg
PANEL.jpg (31.91 KiB) Viewed 2966 times
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: How to parse the "Context" from HB

Post by Richard Naninck »

Do you mean this?
Attachments
naamloos.JPG
naamloos.JPG (13.77 KiB) Viewed 2955 times
James D
Senior Member
Posts: 134
Joined: Wed Jun 06, 2007 3:30 pm
Location: Baja California

Re: How to parse the "Context" from HB

Post by James D »

Yes. But I got the function I wanted to work by changing the button on the bottom of my panel to change property button then for each context I have a selected value. Then I have a task that executes whatever I want for the selected value.
Post Reply