From: Ken Cameron <kcameron@st...> - 2010-10-29 19:19:41
I think I have direct dimming working for X10 using cm11 interface. So far it has worked for me and Walt.
Got dimming working for Insteon but left some loose ends to fix up. Like some of the driving X10 from Insteon given what I've figured out for cm11.
It won't work with very old X10 modules; the command wasn't in existence back then for the module. I've found some of my original ones (from Radio Shack and at least 20 years old) don't understand the command that works with any of the newer dimmers (that I have tried so far). So either we will need to just fail with some very old modules or add a flag in the variable light so the code can try the old style 'step dim' method if the direct doesn't work. Granted this has been shown to frequently get out of sync and not dim correctly.
I've seen from testing that many of the modules work best for dimming if you only use dimming commands, including using dim 0 for off and dim 100% for on, mixing causes odd jumps in the lights. And I've found documents that confirm that is part of the design that we have to live with. This is another case where a flag in the variable light might help. Either let the user specify that all commands should just use dim settings, or auto-set the flag when the first 'set intensity' is sent for the lamp.
A number of the parts are in the powerline class and instead I think they should be in the cm11 like the Insteon and cp290 implementations have. It turns out some of the parts were thought to be more common between interfaces, but are not. If I understand the design right it looks like:
1. copy the powerline class files (like SerialX10Light) and create a cm11/SpecificX10Light that has the same stuff, but should only be used when the interface is cm11.
2. do 'something' to the file remaining in the powerline class so it is just stuff common to all implementations but not really doing anything by itself.
3. likely other fiddling, but this class stuff is a little weak in my own mind on what is right or wrong.
I've got a couple more minor fixes to finish testing and submit. Then I'd like to ask Bob to do the magic with the classes as he seems to 'get it' and can turn that out in a snap compared to how long it might take me to get it right. Then do any needed code tweaks after the classes are fixed up.
Syracuse Model Railroad Club http://www.SyracuseModelRr.org/
CNY Modelers http://www.cnymod.com/
In the Upstate New York US area of the world