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
How to parse the "Context" from HB
Re: How to parse the "Context" from HB
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
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
Re: How to parse the "Context" from HB
Yes the panel is "Contexted."
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Re: How to parse the "Context" from HB
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.
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.
Re: How to parse the "Context" from HB
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.
Osler
Edit: I see Richard has already pointed that out.
Re: How to parse the "Context" from HB
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 (31.91 KiB) Viewed 2964 times
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Re: How to parse the "Context" from HB
Do you mean this?
- Attachments
-
- naamloos.JPG (13.77 KiB) Viewed 2953 times
Re: How to parse the "Context" from HB
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.