Insteaon: Setting DIm level with button control

Having problems? Maybe others have had the same problem too. Post HouseBot technical issues here.
Post Reply
Steve Horn
HouseBot Guru
Posts: 750
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Insteaon: Setting DIm level with button control

Post by Steve Horn »

Ok, so now I'm sold on Insteon. But I need help - I have added two button controls to control the dim level of an Insteon lamp dimmer. One button for brighten; one for dim. (There is a separate multistate button to turn the device on and off.) Each button ideally increases or decreases the value of the dim level property by some fixed amount. Example: One click of the brighten button adds 10 to the current dim level of the device. The dim button decreases the value of the dim level by 10. Except it doesnt work. My brighten and dim tasks (triggered by the bright and dim buttons) each have one statement that reads something like:
Change 'Theater->Lighting\Theater wall washers.Dim Level' to '%%Theater wall washers.Dim Level%% + 10'
(Thats for the brighten task. The dim task decrements by 10.)
What happens is the Dim task dims the light to the preset dim value, set up at the switch. Changing the value (-10) does not affect the resulting dim level. The brighten task more often than not crashes the HB server.
Sorry to be so wordy, but I'm obviously overlooking something either Insteon or HB related. Anyone have a similar setup?
Steve
ScottBot
Site Admin
Posts: 2787
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Steve,

That looks like a HouseBot issue, not related to Insteon. The problem is that using the value of the target property as the substitution string to set the target property throws HB into a loop.
Scott
Steve Horn
HouseBot Guru
Posts: 750
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Post by Steve Horn »

Ok, thanks. I tried to come up with another way to do this but have nothing so far. I suppose I could use a slider to adjust the dim level, but I've found sliders to be cumbersome using a touch screen display.
Steve
ScottBot
Site Admin
Posts: 2787
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

You could also do the same thing with a simple script (without using PV substitution). Or maybe even create a duplicate property that mirrors the value of the one you are updating to be used in the Task (I haven't tested that, but it's just a theory/suggestion).
Scott
Steve Horn
HouseBot Guru
Posts: 750
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Post by Steve Horn »

Ok, I created a VB script that brightens the light by 10 percent (sort of.. increases the Dim Level property by 10). That was interesting, as my VB Script knowledge is very limited. Anyway... several questions arise. 1) How can one pass parm values to the script from the task that calls it? (Why should I have to create a bunch of virtually identical scripts when only a few variables (i.e. Insteon device, dim increment, dim direction (+/-) change?)
2) Why is the resulting device Dim Level Value off by one from what I set it to? (no big deal, curiosity question.)
Steve
jkish
Member
Posts: 29
Joined: Thu Jun 07, 2007 1:17 pm
Location: Roswell GA

Post by jkish »

You can create a script device that has properties that you set for the variables you would have passed to the script. The device script is always running and picks up work to do (dim a light, etc) from a device property and then looks at other device properties for other settings (which light, how much to dim, etc)
Post Reply