Dear All,
I'm trying to figure out how the Dim and Bright commands are being treated. I don't have the fancy Leviton style modules as I'm in Australia. My Lamp module can receive On, Off, Dim and Bright commands.
If I send A;2;On it turns on the lamp. Then if I A;2;Dim;20 it dims nicely to off, then I can send A;2;Bright;20 and nicley turns up to full brightness.
My problem is that I'm trying to write a script for a slider control to control the Brightness of the lamp and need to send commands for those inbetween stages between off and on.
Are the Dim and Bright commands relative or absolute? Can anyone give me an explanation as to how they work, or point me towards an explanation ?
Many thanks in advance.
Dave.
Dim & Bright Commands
-
- Member
- Posts: 24
- Joined: Sat Sep 20, 2003 7:53 pm
- Location: Australia
Dave,
X10 Dim and Bright commands are relative to the current level of the light. The values specified in HouseBot are the number of relative steps to take from the current position.
As you can imagine, this creates some challenges when trying to programmatically manage the dim level since:
My advice to you is to:
X10 Dim and Bright commands are relative to the current level of the light. The values specified in HouseBot are the number of relative steps to take from the current position.
As you can imagine, this creates some challenges when trying to programmatically manage the dim level since:
- You can not query the dim level of the switch programmatically.
- If the dim level of the switch is changed manually, it invalidates any stored value that you have.
My advice to you is to:
- Add two user defined Properties to the Device to store the Dim level and the desired Dim level.
- Use these values in the script to know how far to brighten or dim the lamp.
- Don't change the dim level of the lamp manually.
- Always turn the lamp "Off" first, and then send the appropriate number of Bright commands.