[SOLVED] Light/Lamp Dimming bug

Forum to discuss X10 Commander iPhone/iPod/iPad/Android client for X10 Devices

[SOLVED] Light/Lamp Dimming bug

Postby FutureStyle » Thu Oct 23, 2008 9:16 pm

I think I've come upon a bug, perhaps in the math of the dimming function works. I've opened up AHP to see how it reacts to help troubleshoot this:

1. Used AHP to turn the light on to 100% brightness.
2. Change the iphone slider to 49% brightness and touch the "Dim Lights" button - AHP shows that it's been dimmed to 51% brightness and the lights act accordingly.
3. Use the iphone to change back to 100%, then AHP & the lights go to 0%, but AHP still shows the light as being turned on.
4. Use the ipone to turn on the light & AHP shows the light as on, but the brightness at 0%. The light itself is in fact on, but very, very dim.
5. Use AHP to trun the brightness up & the lights act accordingly.

I can repeat the process with 100% consistency with different brightness levels. Everytime I use the phone to dim the lights, instead of dimming TO the selected number, it always dims it BY the selected number. So if I try to go from 100% to 75%, the light actually dims to 25%. Having said that, it doesn't work the opposite way. If I then try to go from that 25% back up to 85%, the light (according to AHP) dims to 0% but maintains it's "On" status. At this point, turning it off via the phone does it off & turning it back on (via the phone) turns in on, but only to the previous brightness level - in this case visibly on, very dim and showing 0% on AHP. However it does consistently turn back on at the previous brightness level no matter what it was. From what I can discern it seems to always go back to 0% when you move the dim slider from a lower number to a higher number.

I hope I've made this clear and that it helps get to the bottom of this. If you have any questions or need anything clarified, just let me know!

KMP
FutureStyle
 
Posts: 5
Joined: Thu Oct 23, 2008 1:08 pm

Re: Light/Lamp Dimming bug

Postby Melloware » Thu Oct 23, 2008 10:45 pm

I actually don't think this is a bug but I could be wrong....

Do me a favor. Re-run your test but using the ahcd.exe app from X10.

In your C:\Program Files\AHSDK\bin\ahcmd.exe directory open a command prompt.

Try executing your scenario but use the syntax

Code: Select all
C:>ahcmd.exe sendplc a2 off
C:>ahcmd.exe sendplc a2 on
C:>ahcmd.exe sendplc a1 dim 49


Let me know the results. I am hoping they are the exact same results as from X10 Commander as it is using the same API as the X10 software and I coded to spec. I think it has to do with it "dimming a percentage" and not dimming to that level. So Dim 20 doesn't dim your lights to 20% brightness, I think it Dim's the lights BY 20%. But I am not quite sure. Each unit is different CM11, CM15, Cm17 etc. Let me know the results of your tests.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11017
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: Light/Lamp Dimming bug

Postby FutureStyle » Fri Oct 24, 2008 8:10 pm

Oooh, the command line stuff is cool . . .

I did as you asked in the CLI and you are right, it's definitely not a bug. It did behave exactly as expected. I was totally misinterpreting the functionality there. I was thinking that putting the slider on a higher number would act inversely so to speak - the same as invoking the "bright" command, I suppose. As I said the other day, I'm very new to the x10 thing but I'm learning. I just got all this stuff 3 days ago so I'm still getting it figured out. As suggestions go, admittedly, it would be cool to be able to invoke the "bright" command from the iPhone but it's certainly cool enough as is right now. Thanks again for helping me get all this worked out!

KMP
FutureStyle
 
Posts: 5
Joined: Thu Oct 23, 2008 1:08 pm

Re: Light/Lamp Dimming bug

Postby Melloware » Fri Oct 24, 2008 8:47 pm

No problem...that is what I am here for. And thanks for the excellent AppStore review!

I think I need to add to version 1.1 a Brighten button and not just a DIM button on the iPhone app. What do you think?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11017
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: [SOLVED] Light/Lamp Dimming bug

Postby gtwest088 » Wed Oct 29, 2008 3:53 am

im an avid x10 user. my entire house is equiped with x10. literally every single switch has been replaced. i have had many problems with the % brighten / dim functions. this is actually not a bug with AHP or the x10commamder app! it is actually a "problem" with the engineering from x10. the support center for x10 has actually admitted this to me! unless you have the two-way modules from x10, AHP has no way to know at what level the switch or module is currently set at. the problem with two-way modules and switches is that they are much more expensive and larger than the standard ones. x10 released "new" standard modules and switches that recall the last brightness level when the switch is pressed. the model number did not change and x10 did not release any info about this change. at first, i was excited when i hooked the "new" ones up and realized that the switch would recall the last brightness and that i could dim the switch manually by holding the button. the previous versions would go back to 100% when the switch was turned off then back on and had to be dimed/brightened through a remote or AHP. so, tying to make this as short and sweet as possible, when you have the "new" switches and modules, ... x10support says... AHP can not communicate with the switch or module to tell what level the light is currently at. so, AHP assumes that the light is at the last level it was set to by AHP. the problem is that the light brightness can be changed by other things like remotes , wireless wall switches or holding the switch button. So, ... say you use AHP to turn a light on and dim to 50%. AHP will in fact turn the light on (100%) and then dim it down to 50%. this only works correctly if the light began in the off position! (not 0%... this is not the same as off) But.... say the light actually began at 75% ... ahp dims the light to what it thinks is the 50% point...the light is now at only 25% because it started at 75%. AHP CAN ONLY DIM TO THE CORRECT LEVEL WHEN THE LIGHT STARTS AT THE 100% LEVEL! other than always turning the light on / setting to 100% first and then dimming to your desired level or buying the ridiculously priced and sized two-way modules, there is just no way to fix the problem.
gtwest088
 
Posts: 1
Joined: Wed Oct 29, 2008 3:26 am

Re: [SOLVED] Light/Lamp Dimming bug

Postby Melloware » Wed Oct 29, 2008 5:55 am

Thanks gtwest088! This stuff can be so confusing. I was originally under the impression as many users are that Dim 50 means set the light to half level but as you pointed out its relative to its current position. Weak!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11017
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: [SOLVED] Light/Lamp Dimming bug

Postby rockinthesix » Thu May 14, 2009 7:56 pm

I know this is [SOLVED], but I'd like to say that it's still a little annoying since we never know what the "current" dimming level is at.

Wouldn't it be better if the X10Commander sent TWO calls to AHP? One to dim to 0 and then one to brighten to X?... there could even be a boolean switch in the Windows App asking which mode the user would like to use... 1) Classic Mode, 2) Accuracy Mode.
rockinthesix
 
Posts: 9
Joined: Thu May 14, 2009 7:52 pm

Re: [SOLVED] Light/Lamp Dimming bug

Postby Melloware » Fri May 15, 2009 7:38 am

rockinthesix wrote:I know this is [SOLVED], but I'd like to say that it's still a little annoying since we never know what the "current" dimming level is at.

Wouldn't it be better if the X10Commander sent TWO calls to AHP? One to dim to 0 and then one to brighten to X?... there could even be a boolean switch in the Windows App asking which mode the user would like to use... 1) Classic Mode, 2) Accuracy Mode.



Right I don't know what the current dimming level of your devices is either. It is just the way X10 designed their API.

I think what you are saying is that if someone want to dim to 70% for me to actually turn the light OFF, then ON so it's at 100% brightness, then call Dim 30% so it dim's it to 70% overall? That might be more confusing than anything.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11017
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: [SOLVED] Light/Lamp Dimming bug

Postby rockinthesix » Fri May 15, 2009 9:12 am

In using your app, I can simply go from brightness X%, push it to 100% and then dim back down to exactly 30% (or whatever). I do this right now in order to get an accurate dimming level... in other words, I don't turn it off first, just bump it 100% and then back down.

Even though your app doesn't know the current dimming level, it cannot go higher than 100%, so sending an initial 100% command will give you consistant results every time.
rockinthesix
 
Posts: 9
Joined: Thu May 14, 2009 7:52 pm

Re: [SOLVED] Light/Lamp Dimming bug

Postby Melloware » Fri May 15, 2009 9:14 am

rockinthesix wrote:In using your app, I can simply go from brightness X%, push it to 100% and then dim back down to exactly 30% (or whatever). I do this right now in order to get an accurate dimming level... in other words, I don't turn it off first, just bump it 100% and then back down.

Even though your app doesn't know the current dimming level, it cannot go higher than 100%, so sending an initial 100% command will give you consistant results every time.


AHHH I see what you are saying. Just basically just call BRIGHT 100 before any DIM command. Are you using a CM15 or CM19?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11017
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: [SOLVED] Light/Lamp Dimming bug

Postby rockinthesix » Fri May 15, 2009 9:31 am

I'm using CM15A
rockinthesix
 
Posts: 9
Joined: Thu May 14, 2009 7:52 pm

Re: [SOLVED] Light/Lamp Dimming bug

Postby Melloware » Fri May 15, 2009 9:44 am

rockinthesix wrote:I'm using CM15A


OK try this BETA.

http://melloware.biz/download/warez/x10commander.zip

I added a Registry entry
Code: Select all
HKEY_CURRENT_USER\Software\Melloware\X10Commander\DimAccuracyEnabled
which will be ON by default and if you send a DIM command for the CM15 or CM19 it will automatically set to BRIGHT 100 first and then call the DIM. Give it a shot.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11017
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: [SOLVED] Light/Lamp Dimming bug

Postby rockinthesix » Fri May 15, 2009 10:01 am

I just got an error

Server Error:
expecting: sendpic address {AllUnitsOff | AllLightsOn | On | Off | Dim | Bright | AllLightsOff | ExtCode | HailRequest | HailAcknowledge | PresetDim1 | PresetDim2 | ExtendedDataTransfer | StatusOn | StatusOff | StatusRequest}

EDIT: It happens when I hit the "Dim" button
rockinthesix
 
Posts: 9
Joined: Thu May 14, 2009 7:52 pm

Re: [SOLVED] Light/Lamp Dimming bug

Postby Melloware » Fri May 15, 2009 10:08 am

rockinthesix wrote:I just got an error

Server Error:
expecting: sendpic address {AllUnitsOff | AllLightsOn | On | Off | Dim | Bright | AllLightsOff | ExtCode | HailRequest | HailAcknowledge | PresetDim1 | PresetDim2 | ExtendedDataTransfer | StatusOn | StatusOff | StatusRequest}

EDIT: It happens when I hit the "Dim" button



Whoops, try again..

http://melloware.biz/download/warez/x10commander.zip
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11017
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: [SOLVED] Light/Lamp Dimming bug

Postby rockinthesix » Fri May 15, 2009 10:17 am

It works except backwards.

If I set my slider to 68% and hit "dim", it will bump it to 100% and then down to 32%
If I set my slider to 68% and hit "bright", it will bump it to 100% and then leave it there.

Also is there a way to speed up the transition? maybe a 1/5 second?
rockinthesix
 
Posts: 9
Joined: Thu May 14, 2009 7:52 pm

Next

Return to X10 Commander

Who is online

Users browsing this forum: No registered users and 2 guests