View Full Version : Centralite Driver Development - Beta Thread
beelzerob
09-27-2007, 09:04 AM
Please try this driver and post in this thread any issues that arise. I'll continue to add to the driver as things get hammered out.
The ActivateLoadLevelRate field works like this:
loadNum,level,rate
So, turning load 5 on to half level at some rate of 8 is: "5,50,8"
For now, consult the protocol docs to determine what the rate value means to your load (there are 2 tables in there)
Events
This driver will send an event upon switch press and release, as long as the switch is configured to do so. The event will be:
Type: SwitchPress or SwitchRelease
Data: Switch number (in 3 digits....so 008 for switch 8).
Config File
You may supply a config file to name your loads and scenes that the driver will control. If you do not supply a config file, then the driver will attempt to get the names directly from the control unit, ignorning any names that are still the default ("Light #3, Scene #5", etc). Note that your firmware may not support getting load and scene names. Consult your dealer to determine that.
If you supply a config file, then it must adhere to these rules:
1) It must reside in the following directory (create it if it doesn't):
CQC\CQCData\MacroFileRoot\Drivers\Centralite\LiteJ et
2) The name of the file must be moniker + "_config.csv". So, if the moniker of this particular driver instance is "CentraliteControl", then the file will be named "CentraliteControl_config.csv". This allows you to load multiple different instances of this driver on the same PC.
Format in the file is as follows:
1) Each line in the file contains either a load, scene, or switch.
2) The format is: "Name, Type, Number, Rate"
Name - Name you want this field to be shown as. Name must adhere to the normal CQC rules for field names (no special characters, no spaces, etc). See below for constraints on field names.
Type - Either "L" for a load, "SW" for a switch, or "SC" for a scene
Number - The ID number of the load, switch, or scene.
Rate - If this is a load, then the rate at which the load will be changed. Refer to the protocol file to see what value corresponds to what rate...it is dependant on load type. If omitted, then a value of 0 will be used.
3) The last line in the config file MUST be "END"
Here is an example file:
LivingRoom,L,3
MasterBedroom,L,4,12
Alarm,S,7
END
This defines LivingRoom to be a Load, Load number 3....MasterBedroom to be a Load, Load number 4 changed at a rate corresponding to 12 (when the load is changed via the driver), and Alarm to be a Scene, Scene number 7.
If the switch or load being defined is on the 2nd board of an LJ48, then at the end of the config line, put ",1". So, in the above example, if the MasterBedroom was actually a load on the 2nd board of an LJ48, then it would look like:
MasterBedroom,L,4,12,1
Field Names and function
Field names are created automatically, for a given name (whether put in the config file, or programmed into the device). Because of that, the names in the config file, or programmed into the device must be unique (except for default names, which are ignored). Any duplicate names will be ignored, and a message put in the log indicating the error.
For given names, "SwitchName", "LoadName", and "SceneName", the following fields will be created:
SwitchNameSwitch_State (boolean) - Writing True to this field acts as a switch press. Writing False to this field acts as a switch release. This does not act like a "press and hold" for the switch, it is a single event.
LoadNameLoad_State (boolean) - Writing True is the same as ActivateLoad, writing False is the same as DeactivateLoad
LoadNameLoad_Level (card) - Writing a value sets the load to that level, range from 0 to 99.
SceneName_State (boolean writeonly) - Writing True is the same as ActivateScene, writing False is the same as DeactivateScene
As you can see, since the words Load, Scene, and Switch are automatically appended to the field name, it might be better to avoid using those words in the actual name...otherwise it can get kind of cumbersome.
----------------------------------------------
This driver requires CQC v. 2.3.0+
Your Litejet MCP must be configured as follows in order for this driver to work:
The LiteJet MCP can communicate with a third-party device through one RS232 interface (channel A of DUART using connector RS232-1 when DIP Switch # 8 is ON). For firmware versions 4.90 and lower, communications parameters for connector RS232-1 are 19.2 K baud (if DIP Switch 3 is OFF) or 9.6 K baud (if DIP Switch 3 is ON), 8 data bits, 1 stop bit and no parity. For firmware versions 5.00 and higher, communications baud rate for connector RS232-1 is in the programming software SETTINGS screen.
This communications link may be used by a third-party device to send some control commands or receive some status information regarding both loads and scenes. In addition, the LITEJET MCP can send an ASCII string to third-party channel indicating when a switch is pressed and when that switch is released (if that switch is programmed to do so). The LITEJET MCP can send an ASCII string to third-party channel indicating when a load is turned ON and when that load is turned OFF (if that load is programmed to do so). Note that each response may be followed (if enabled in Customer Options) by an ASCII carriage return byte (ASCII code $0D).
Specifically, you need to configure your litejet MCP to:
Communicate at 19.2k baud at the port used by cqc (or else choose different connection options).
Program switches to send messages when pressed and released.
beelzerob
09-28-2007, 06:13 PM
New version posted which fixes a connecting problem.
Geez...I thought you guys were eager for this....yet no peep since I posted it. Hmmmm...
pjwinstalls
09-28-2007, 08:58 PM
OK.... it is connected now but when i do activate load or deactive...nothing. no error messages.
beelzerob
09-28-2007, 09:11 PM
Heh, well it's a start.
Please purge your log, set the verbose level for the driver to Medium, and then try to write a valid load number to the ActivateLoad field and then the DeactivateLoad field. Then set the verbose level back to Off, snap the log to a file and either post it here or email it to me.
Thanks!
pjwinstalls
09-29-2007, 01:14 PM
I did what you said but there is no log to query or snap to file when trying those two fields. Just to check, I performed an action with another driver and then was able to see the log and snap to file.
beelzerob
09-29-2007, 04:16 PM
Ok, I found an error, so before we try to sort out the log thing, please give the new .04 version a try.
pjwinstalls
09-29-2007, 06:32 PM
I tried .04....still no go but was able to create a log file this time.
beelzerob
09-29-2007, 06:57 PM
Ok...well, the commands look good and correct, for activating and deactivating load 24.
Let's try a few other things....
1) Try several different load numbers for testing this.
2) First, please make sure that the baud rate for the port is the same as the baud rate when you install the cqc driver. The rs232 protocol docs mentions this about setting the ports:
The CL24 LiteJet™ can communicate with a third-party device through two RS232 interfaces (RS232-1 and RS232-2). Communications parameters for connector RS232-1 are either 19.2 K baud (if DIP Switch 3 is OFF) or 9.6 K baud (if DIP Switch 3 is ON), 8 data bits, 1 stop bit and no parity. Communications parameters for connector RS232-2 are either 19.2 K baud (if DIP Switch 4 is OFF) or 9.6 K baud (if DIP Switch 4 is ON), 8 data bits, 1 stop bit and no parity.
I believe the cqc driver defaults to 19.2k
3) The doc also mentions this:
In addition, the CL24 LiteJet™ can send an ASCII string to both third-party channels indicating when a switch is pressed and when that switch is released (if that switch is programmed to do so).
Do you happen to know if you have some switches that are programmed to do that? If you do, or if you're not sure, then please set the driver running, turn verbose to medium, and then turn those switches on and off a couple times. Then post the log. I want to see if I can capture those messages, that will at least prove I have communication right.
4) Start up hyperterminal, or your rs232 program of choice, connect to the centralite module using the settings that cqc does (19.2 baud, no parity, 8 data bits, 1 stop bit), and then send the string:
^A024 (return)
See if that activates load 24. If so, then the problem is in my communication setup, not in the command I'm sending.
Please give this a try and let me know what works. In my experience writing drivers, establishing communication with the device is always the hardest part.
swegman
09-30-2007, 11:45 AM
Sorry for not trying this. I have had surgery for two detached retinas in the last month in my right eye and can not look at a display/tv for more than 15-20 minutes at a time. Once I am better, i plan to test it out.
Steve
pjwinstalls
09-30-2007, 04:53 PM
I checked all port settings and they are fine.
I turned on ascii on the keypad button. cqc didnt show anything.
hyper terminal connected but sending the string didnt do anything.
I tried this on all 3 panels. I can connect to them no problem with the litejet software.
beelzerob
09-30-2007, 05:04 PM
Are you using the same cable to connect with the litejet software as with the cqc driver?
pjwinstalls
09-30-2007, 05:06 PM
same cable
beelzerob
09-30-2007, 07:04 PM
Well, it not responding to hyperterminal either points to something wrong with the 3rd party comm the rs232 doc talks about.
The CL24 LiteJet™ can communicate with a third-party device through two RS232 interfaces (RS232-1 and RS232-2). Communications parameters for connector RS232-1 are either 19.2 K baud (if DIP Switch 3 is OFF) or 9.6 K baud (if DIP Switch 3 is ON), 8 data bits, 1 stop bit and no
parity. Communications parameters for connector RS232-2 are either 19.2 K baud (if DIP Switch 4 is OFF) or 9.6 K baud (if DIP Switch 4 is ON), 8 data bits, 1 stop bit and no parity. This communications link may be used by a third-party device to either send some control commands or receive some status information regarding both loads and scenes. The CL24 LiteJet™ always acts as a slave to a third-party device, i.e., the CL24 LiteJet™ always responds to commands from that thirdparty device. In addition, the CL24 LiteJet™ can send an ASCII string to both third-party channels indicating when a switch is pressed and when that switch is released (if that switch is programmed to do so). The ASCII string format is “Pnnn” for a pressed switch, and “Rnnn” for a released switch and nnn is a 3-digit ASCII number specifying that switch number (from 001 to 096).
Communications between a third-party device and the CL24 LiteJet™ is always using ASCII code (both directions). All commands are started with ASCII “^” (ASCII code $5E), followed by a 1-byte command code. Command codes are upper-case ASCII “A” - “L” only. The command may be followed by a number of ASCII digits that varies according to the command used. The following table shows the currently supported commands in a single-system configuration, their formats as well as response expected if any. Note that each response may be followed (if enabled in Customer Options) by an ASCII carriage return byte (ASCII code $0D).
The reason why we're testing the switches to establish communication is because that way we're removing any possible error in the format of the message we're sending...we're just trying to receive a message which the device should be sending.
If the switches are programmed to send a message when pressed and released, then something as simple as hyperterminal should show that. If nothing is showing up on hyperterminal, then these are some of the possibilities:
1) The switches aren't properly programmed
2) The LiteJet requires something else in order to send messages out...some setting or something else.
3) The cable....somehow it's always the cable.
Is the centralite support very responsive? Because you SHOULD be able to control your centralite from hyperterminal, and if you can't, then perhaps they can help you figure out why.
It would also help if more of the Centralite fans here tried this too...that way we can also remove your particular setup as a culprit. Of course, if you have double detatched retinas then I suppose I can understand why you haven't yet.... ;-)
beelzerob
10-01-2007, 07:18 AM
Well, there's now been some initial success controlling loads with the driver. Some of the stickiness appears to come from how the MCP is configured, and if it's a litejet 48 or 24 that is connected.
A new protocol document has been obtained which contains slightly different details on how to configure the MCP for RS232 control. I have posted the relevant portions in the first post, so please review that before trying to connect with the cqc driver.
beelzerob
10-07-2007, 04:05 PM
Has anyone had any success with this driver?
pjwinstalls
10-09-2007, 09:23 PM
you know where i stand with it.... I ran into a brick wall. Waiting for others to have some luck with it
kayemsi
10-10-2007, 05:14 AM
I need to get a CQC machine installed in the tech closet (where the centralite panels are installed) in order to test this drriver. I put an old PC in there with the centralite s/w and after I get that to communicate and get the info the installer programmed into the panels downloaded it, I will verify the settings and get to match the 1st post.
Then hopefully that old 400 mhz PC can also act as a test CQC master server so I can load and test the driver. This PC had been a CQC client and had the other components (except being a master server) installed and was working. Not sure how best to try to convert it to be a stand alone master server since the other drivers in my test environment at the current house were all installed on the master server there.
I am thinking I need to rename the CQC folder on this machine to something else and then do a clean standalone install (trial mode) of 2.2.4 and then load this driver.
beelzerob
10-10-2007, 06:37 AM
you know where i stand with it.... I ran into a brick wall. Waiting for others to have some luck with it
Phil, you setup your system according to the protocol page posted on the first post? If so, did you try again with just the litejet24, in case it's a litejet48 problem?
Also, if you haven't tried this, please hook up just the litejet24 to hyperterminal, then press several switches that are programmed to send messages when pressed, and see if anything comes out. If you did all that already, none of it worked?
If none of that worked, it would be worth asking Centralite to help, because it should be a very basic function to be able to see the ASCII messages coming out in hyperterminal when a switch is pressed. And they should be able to help you get to that point.
beelzerob
10-17-2007, 04:35 PM
So, has anyone had any success? There's really not a whole lot more I can do until we figure out why you can't communicate with the litejet even from hyperterminal. (unless someone has a spare one of these they went to send me....loaner, of course. ;) )
kayemsi
10-26-2007, 04:59 PM
I was finally able to get CQC (2.2.5) installed on my old test PC at the new house and installed the version .4 Centralite driver and tried it on one of my LJ24 panels. I think I set all the settings as suggested with the litejet s/w. I tried setting up a test template with 2 command button and assign the activate and deactivate commands for load 2 to them but it did not change the state of the load. Did not get any entries in the log after I set the verbosity to medium.
I had also tried using the browse menu to select the activate item and change field value to 2, with no luck. It says it is connected to device.
I am completely lost on how to use hyperterminal. I opened it and set the communication parameters but really could not figure out what to do to actual send messages to the centralite.
The help for hyperterminal mostly discusses modems but not really about sending ascii to serial devices so it was not helpful. Any other suggestions?
beelzerob
10-26-2007, 07:32 PM
No problem, I can help you figure it out.
First off, go up about 7 posts and read the section of the rs232 protocol I posted. It relates to dip switches and configuration settings that you need to make to the litejet to make it work. Particularly, see if you can accomplish the part where a switch can be programmed to send a message when it is pressed and when it is released.
Then, start hyperterminal. Put in any name and select any icon to get it going. At the next screen, just make sure you select the COM port that your litejet is connected to. Don't worry about area code or anything unless it asks for it. Don't worry, you won't be dialing. Then, put in the settings to match whichever com port you're connected to on the litejet side (again, see the section above...appearantly the litejet has 2 comm ports which may or may not be 2 different speeds). For Flow Control, select none (though we may come back and try a different setting there if this doesn't work).
Once you hit Ok, then you're connected. Anything you type will be sent to the litejet. However, you won't actually be able to SEE what you're typing unless you change a setting in hyperterminal.
So, go to File->Properties->Settings->ASCII Setup. There are 5 check boxes, from top to bottom. Just check the 2nd, 3rd, and 5th boxes, all others are cleared. Then OK until you're back out.
Now then, at the flashing prompt, just type (without quotes): "^K" and hit return. If everything is connected right, you should get back a line of data.
The other test is to press and release a switch that has been configured to send messages when pressed or released. If it has been configured and we're hooked up right, then each press and release should result in a text message being displayed in the hyperterminal screen.
Let's start there and see how it goes. Lemme know if you get stuck anywhere, we'll work it out. And thanks for jumping in to help.
beelzerob
11-06-2007, 07:15 AM
*crickets chirping*
Ummm....did you have any more luck?
I'm almost finished with the new house so I should be able to give it a try in about 2 weeks.
Thanks for your work on it!
Chris
kayemsi
11-07-2007, 04:22 PM
My centralite firmware is recent enough that you set the baud rate in software and not dip switches per the installation instructions. I have my com1 port connected to the RS232-1 port on the LJ24 and can control loads and monitor status from the litejet software. I have that set to 19200 baud.
I close out of the litejet software to release the port and start hyperterminal. I set the baud to 19200, 8bits, 1 stop bit, no parity, flow control to none. I also set the ascii setup as you describe. At the bottom of the hyperterminal window it says connected. At the flashing prompt I type ^K and hit return. It takes a while for each letter I typed to be echoed and the cursor to move to the next location. After I hit return the cursor stays on the same line but moves back the start of the line and just sits there.
No message is returned from the litejet.
Not sure what I am doing wrong. Have any others had sucess with hyperterminal and the litejet. I got mine thru an installer and can not get tech support myself as an enduser or so I am told.
beelzerob
11-07-2007, 06:19 PM
Not sure what I am doing wrong. Have any others had sucess with hyperterminal and the litejet. I got mine thru an installer and can not get tech support myself as an enduser or so I am told.
Wow. That sucks. Coming from a CQC-level of enduser support, that's pretty jarring. :-(
do me a favor...do the exact same everything you did, but choose a different flow control (instead of None). It could be that the centralite software is doing something different in the connection. Try the different hardware/flow control options in hyperterminal and see if that works.
brotsten
11-07-2007, 08:05 PM
Wow. That sucks. Coming from a CQC-level of enduser support, that's pretty jarring. :-(
do me a favor...do the exact same everything you did, but choose a different flow control (instead of None). It could be that the centralite software is doing something different in the connection. Try the different hardware/flow control options in hyperterminal and see if that works.
As far as the Elegance system goes, I know there is no hardware flow control, as I'm using a three wire serial cable from my M1.
Brian
kayemsi
11-07-2007, 08:15 PM
I will try that tomorrow. Thanks for working on this and I am sorry it is taking so long to get you feedback.
We are still not moved in the new house yet and don't have internet service there. Until I get the new server built with the Moxa card, I am using an old PC which only has one serial port and I am having to shift that around from Elk (no M1EXP yet but soon), to Rain8net, to 3 individual centralite panels. I tend to leave it on the rain8 alot as we have to water the new grass every day. We just got the CAV6.6 installed today (mostly) but it will probably not be hooked up to the PC until the new server is ready. I just got the replacement motherboard back from Newegg so hopefully it will build without any further DOA parts.
beelzerob
11-07-2007, 08:40 PM
Ok, thanks for your efforts. I'll be honest, it's a very long shot that it's the flow control, especially after what brotsten said.
What you're trying to communicate with is specifically a "CL24 Litejet", right? It's not a litejet 48, or 2 litejet 24's hooked together or anything like that? Just trying to remove areas that could be affecting this communication.
I wonder if Centralite would be more responsive to my requests for help, given I'm not an end user, but instead am trying to make their bastard product more useful to the home automation arena (little bitterness there).
:oops:
kayemsi
11-07-2007, 09:27 PM
What you're trying to communicate with is specifically a "CL24 Litejet", right? It's not a litejet 48, or 2 litejet 24's hooked together or anything like that? Just trying to remove areas that could be affecting this communication.
I have three individual CL24 Litejets, at the moment. We are still waiting for the part that hooks two of them together to make a litejet 48.
I wonder if Centralite would be more responsive to my requests for help, given I'm not an end user, but instead am trying to make their bastard product more useful to the home automation arena (little bitterness there).
:oops:
I wonder if Brandon from AutomatedOutlet could get any helpful info out of them as AO is a Centralite dealer/distributor. He seemed to be following your driver development when I spoke with him about things CQC/Elk/Centralite earlier.
beelzerob
11-08-2007, 06:58 AM
It would be nice to have some help from "higher up". :-) Heck, maybe Brandon can find me a loaner Centralite 24LJ to work with, that'd make development go real fast. (just a loaner, though....I'm an OnQ man) :tounge
swegman
11-08-2007, 03:27 PM
Here is the link for the RS-232 protocol for the LiteJet24:
http://www.centralite.com/Dealer_login/LiteJet/TechData/LiteJet_RS-232_Protocol.pdf
Here is the link for the RS-232 protocol for the LiteJet48:
http://www.centralite.com/Dealer_login/LiteJet/TechData/LiteJet_RS-232_Protocol_Dual.pdf
Hope this helps you to figure it out. If you have questions, I would suggest calling and ask for Jimmy (the son). He should be able to help, or at least connect you to the correct person at the company.
Steve
beelzerob
11-08-2007, 06:02 PM
Thanks! That does help....your docs are different than the ones I had, though they ALL say they're the 3rd party protocol for the litejet24.
Those of you trying out there, instead of "^K", try "+G". Your goal is to see any response at all.
swegman
11-08-2007, 06:19 PM
Sorry I can't be of more help right now. Just had a fourth procedure on my right eye and am restricted in what I am allowed to do.
I think the protocol may be slightly different for the Litejet 48 as compared to the Litejet 24.
BTW, a Litejet 48 is nothing more than two Litejet 24's connected together by a three-wire serial cable. However, the Litejet 48 includes slightly different firmware. Further, the docs are valid for units running version 7.00 firmware.
beelzerob
11-14-2007, 07:38 PM
kayemsi, did you get a chance to try "+G"? Using the normal connection settings. You should see some kind of response. *crosses fingers*
kayemsi
11-19-2007, 02:33 PM
I will try the +G soon. I have been without internet at the new house for over a week and just was able to check the forum today at work. Time Warner Cable seems to be incompetent with anything out of the norm (we are ~400 ft back from the street and need RG11 cable run, but no one there seems to know how to get that done).
I now have one Litejet 48 with 7.00 firmware and a Litejet 24 with 4.60 (I think) firmware.
beelzerob
11-19-2007, 03:07 PM
Yikes! I hope Atlantic Broadband is more competent, we're 500 ft back and haven't talked to them yet about running that.
BrandonStapp
11-19-2007, 05:33 PM
sorry, been so busy lately i havent been following the forums.
Rob, PM me tommorrow!
beelzerob
11-20-2007, 03:51 PM
Woot, Brandon to the rescue! The cavalry comes into town, wearing the AutomatedOutlet insignia....
Though I was (mostly) joking, Brandon has secured me a "loaner" Litejet for me to develop the driver on. I won't have it for long, but it should be long enough to get that first communication going with the driver. Most things are easier after that.
It won't be here until next Monday (which is ok, because I won't be here either), but after that, I should hope there will be a driver for you all to try.
Thanks Brandon!
swegman
11-20-2007, 06:09 PM
Will you need to make different drivers for the litejet 24 vs. the litejet48?
Steve
beelzerob
11-20-2007, 06:22 PM
Dunno just yet. The "dual MCP" protocol doesn't look to be much different than the regular 24 one....but I'm just focused on that for now. If I can make a common driver for both with minimal difficulty, I'll do it.
beelzerob
11-27-2007, 06:25 PM
It LIIIIIIIIIIIIIIIVES!! :shock:
Plugged it in, and got lots of nice responses in hyperterm. Was able to turn lights on and off via simple commands. That's good!
Expect drivers to be posted soon for general testing.
That is fantastic! Just in time for my house! I love it when a plan comes together... :)
beelzerob
11-27-2007, 07:26 PM
Hmmm.. :-?
Well, my first report is that the driver I already had posted works just great.
I started up the driver, put in 1 in the ActivateLoad field, and sure enough, load 1 came on. Same with loads 2 and 3. Did the same with DeactivateLoad field, and they all went off.
So, if the driver posted at the first post isn't doing that at a minimum, then I'm thinking you have something wrong with your configuration somewhere. Here are some things that I'd think you'd probably have to try:
1) This uses a straight-through serial cable from your PC...NOT a null modem/crossover cable.
2) The port I'm using is setup for the 19.2k baud....you need to make sure the port on the litejet that you're connecting to is also setup that way. I'm sure that setup is somewhere in the menu options.
3) I'm using this in a regular LJ24 (I believe), but the dual protocol uses the same commands, so that shouldn't be an issue.
4) Make sure you're putting in a valid load number. I got the load numbers by hitting Select, then 1 for Lights, and then the load number was displayed. I paged through a few different lights to get a few different load numbers.
So, import the driver pack at the front of this post and give it a try. Just put a valid load number in activate load and see if that light comes on.
kayemsi
11-27-2007, 09:32 PM
Well I had some success with using hyperterminal to connect to my LJ24, this time using port RS232-2. I was able to use ^A015 to turn on a load and ^B015 to turn off the load. I did get some data mostly zeros with ^G. The panel is at firmware version 4.6 (I think)
I had no luck at all with the talking to the LJ48 and RS232-1 on unit 1. RS232-2 on both unit 1 and unit 2 are connected together to make the LJ48. I tried RS232-1 on unit 2 also with no response. These panels are at firmware version 7.00
I tried importing the 0.4 test driver into CQC on my new server which is at 2.2.8 and was told something like incompatible version, don't remember exactly what the message said, but it would not import, so I can't try that out.
beelzerob
11-28-2007, 04:41 AM
Well, that's a start.....
I'm pretty sure I have 2.2.4. I'll upgrade to 2.2.8 and that should solve the version problem.
If you can affect the lights via hyperterminal, then the driver will totally work for you. So that's good.
I only tried one of the RS232 ports last night, and I'm not sure which one it was. I'll try the other one tonight and see if there's some kind of issue about which port you use.
BrandonStapp
11-28-2007, 05:17 AM
really glad i could be of some assistance!
Rob, kayemsi will need to connect Via serial port 2, due to the "com kit" used to tie the two LJ24's together.
beelzerob
11-28-2007, 06:03 AM
really glad i could be of some assistance!
Rob, kayemsi will need to connect Via serial port 2, due to the "com kit" used to tie the two LJ24's together.
It's a tremendous help having that. I'm eager to get it to do some more tricks tonight. I almost posted a new driver already that allows for scene activation and deactivation, as well as load/level/rate settings....but I hadn't quite tested it enough to release it on the unsuspecting public. One thing I did notice is that pressing a button did not send a message out the port. The protocol indicates that the buttons have to be programmed to do that, so at some point I'm going to have to figure out how to do that. So far, the on-device menu has been pretty helpful.
RS232-2 on both unit 1 and unit 2 are connected together to make the LJ48
Brandon, I thought kayemsi was just saying here that his 2 LJ24's are connected to each other via the serial port 2. So, does his 2 LJ24's need to be connected to each other via serial port 1, so that he can connected via PC to serial port 2? A little clarification on which port is meant for what might help some of the confusion for people out there who can't get their setups to work.
Thanks again.
BrandonStapp
11-28-2007, 07:06 AM
from what i understand the com kit connects serial 1 to serial 1, but i will go pull one out and check for myself. :-)
BrandonStapp
11-28-2007, 11:18 AM
LiteJet 48 programming manual:
Connect to RS232-2 on both MCPs
ELK-M1XSP installation manual:
Connect the female end of the supplied 9-pin serial cable to the M1XSP and the male end to the 9-pin serial port on the
Centralite processor board marked "RS232-2".
time to make a phone call or two.
beelzerob
11-28-2007, 01:16 PM
And I guess I'll try RS232-1 tonight and see if that's working for me. I'm assuming that's the "top" one?
kayemsi
11-28-2007, 01:18 PM
Yes, it is very confusing. The Centralite Dual MCP third party protocol that beelzerob linked to indicates that the LJ48 has the same RS232-1 and RS232-2 ports as the LJ24, as the document is almost identical to the one for the LJ24 with only added ASCII messages with lower case to address the unit 2 loads.
I had been hoping this meant that the old RS232-1 on unit 2 would now be RS232-2 for the combined unit. RS232-1 on unit 1 is the programming port. The sheet that came with the LJ48 conversion kit seems to tell you not to use the RS232-1 on unit 2 at all, which will be very limiting in connecting to third party devices.
kayemsi
11-28-2007, 01:22 PM
And I guess I'll try RS232-1 tonight and see if that's working for me. I'm assuming that's the "top" one?
When the unit is installed in the wall and you are facing it, the RS232-1 is the leftmost. RS232-2 is in inboard (to the right) of it.
beelzerob
11-28-2007, 02:52 PM
Heh...what I got from Brandon isn't really wall-mountable. I'll have to see if I can follow the wires to where those ports go....either way, if I can use both ports, it won't matter which is which.
BrandonStapp
11-28-2007, 04:20 PM
sorry rob ... demo ... :-D
it is the one closest to the "light-up-board" :cool
beelzerob
11-28-2007, 06:46 PM
Ok, .0.5 uploaded to first post, compiled with 2.3.0. So if you have 2.3.0 of cqc, give it a try!
beelzerob
11-28-2007, 08:46 PM
Driver worked for me on both RS232 ports, btw.
swegman
11-29-2007, 12:42 PM
If I recall, there is a dip switch setting on the MCP for putting RS232-1 in either the programming mode (to program the panel) or the serial control mode for use by a third party program.
Also, re: the issue of not using RS232-1 on the second panel in a LJ48 configuration, it can be used. However, the port numbers are reversed. That is, when the serial port is used on the first panel, the command for light 1 will control the light on the first panel. On the other hand, if the serial port is used on the second panel, light 1 on the second panel (and not the first panel) will be controlled. Can get confusing.
BTW, Cinemar has a plug-in for the LJ, and it works with both the serial port on the first or second panel (but for the above-noted issue). However, I doubt they would be willing to offer you assistance with getting the driver to work.
beelzerob
11-29-2007, 12:47 PM
Well, Brandon has given me all the help I need to get the driver going....and it's going great! I hope to get a particularly fun version out tonight.
Our problem seems to be just getting people connected to their litejets, not the cqc driver itself.
beelzerob
11-29-2007, 06:34 PM
Dean, I just had a rather frustrating experience. For some reason, my fields weren't showing up in the field monitor, even though I had stepped through the code that was creating the field and then adding it to the field list. Other fields were being created, so I know the field list was set.
Turns out my field names had bad characters in them...spaces, #'s, etc. However, it never threw an exception....they just didn't show up when all the fields were created. That coupled with being unable to get log messages out made this a real b*tch to figure out. :-x
beelzerob
11-29-2007, 08:10 PM
Well, good news and bad news.
Good:
I posted a new driver. What it does now is it goes through the litejet and makes a bool field for each named load. So, whatever you have them named in your litejet, you'd end up with a bool field for that load. (Note: To do this, all spaces and special chars are removed and replaced with "_"'s. For this to work, your load names must be unique after those chars are replaced). Set the field to True, load comes on...to False, load goes off. It works! (and yes, it really is called "eatroom" in the settings.)
http://home.comcast.net/~beelzerob/centralite_fields.jpg
Also Good:
I found the setup option under Buttons->Keypads...->Advanced for "Send Action". If you set that to yes for each button, then it will send out a message when the button is pressed and released, and I will turn that into an event you can capture in CQC.
Bad:
Well, it's not THAT bad, so don't worry too much. The protocol mentions:
Note that each response may be followed (if enabled in Customer Options) by an ASCII carriage return byte (ASCII code $0D).
I'd like to enable this, as it makes capturing the messages from the litejet a lot more reliable. However, I can't seem to find this in any menu on the litejet itself. Where is "customer options"? (Brandon is probably the one who can answer this)
Dean Roddey
11-29-2007, 08:16 PM
Turns out my field names had bad characters in them...spaces, #'s, etc. However, it never threw an exception....they just didn't show up when all the fields were created. That coupled with being unable to get log messages out made this a real b*tch to figure out. :-x
Yes, this has been reported before. It's on the list but I couldn't get to it for this release. I'll fix it next time.
beelzerob
11-29-2007, 09:11 PM
Yes, this has been reported before. It's on the list but I couldn't get to it for this release. I'll fix it next time.
The worst part is I feel certain I've had this same frustrating experience before....but it still didn't help me figure it out this time.
kayemsi
11-29-2007, 11:23 PM
Well some success to report. I upgraded to 2.3.0 and loaded the new 0.6 driver and was able to use the ActivateLoad and DeactivateLoad commands.
I also tried the ActivateLoadLevelRate command and looking at the protocol document for what to enter put 0153515 as the value. Doc says ^Ennnllrr
It set load 15 to what looks like 35% and took a while. But afterward I was unable to get the other command buttons to work anymore. I checked the logs and it was still showing [A015] and [B015] but the load did not respond.
I tried unloading and reloading the driver without sucess. I finally stopped and restarted CQC and then the on and off command buttons worked again, until I tried the button I made to do the ActivateLevelRate command and it was back to unresponsive until I cycled CQC again. My LJ24 is at firmware version 4.6 not 7.00 and I haven't looked at the older protocol doc to see if the commands are different for my version.
Haven't tried the commands for scenes yet as I didn't have one programmed that affected any lights close to my server closet for easy testing. Will have to set some up to test that functionality out.
Thanks for working on this driver. It is going to be great.
beelzerob
11-30-2007, 06:36 AM
Oh ya...I knew I forgot to mention something....
The LoadLevelRate field works like this:
loadNum,level,rate
So, turning load 5 on to half level at some rate of 8 is: "5,50,8"
I say "some rate" because there's different rates depending on what kind of load it is, appearantly. There's 2 tables in the protocol, so putting a "3" in for that last value will get you 2 very different rates depending on the load.
But give that a try. And give the newer driver a try and see if it correctly picks up your named loads.
Thanks for the help!
kayemsi
11-30-2007, 11:19 PM
With the suggested change to my command button action I have verified that the 5 functions all work.
In the log I could see the button presses and releases [P062#R062#] note that I put # but it is really a box which I guess is the carriage return. Sometimes several are strung together in one message. [P062#P064#R062#R064#] This may be from two buttons being pressed quickly after each other as in turning off several lights on one keypad. I don't know if that will cause a problem with interperting them.
I guess a next step is to get status of the loads and put in a driver variable for status display?
beelzerob
12-01-2007, 06:38 AM
No, those messages are all fine, they won't cause any problems. The next version I put out (later today) will include events for those button presses, so you can test those easily.
Did you try the latest driver, and if you did, did it create a field for every load with the correct load name? As of now, all they are are boolean fields for "on" and "off", basically. I'm not sure exactly what I'm going to do with them, but being able to get all the load names is easier than having to rely on a config file.
kayemsi
12-01-2007, 07:48 AM
I had downloaded version 0.6 earlier and thought it had not changed.
Centralite_CL24LiteJet_dev_v.0.6.CQCDrvPack I got it at 11/29/2007 11:59PM and I did not see any fields except the Activate and Deactivate ones.
I just downloaded from the first post again and will install that version 0.6.
beelzerob
12-01-2007, 03:49 PM
Did you name your light loads in the control panel? If you didn't, then the light loads will default to "Light #....", and "Scene #"...which I omit from making fields (or I'd make 100 load fields doing that). So if they contain the above strings, they won't show up. But if you give them names, they should show up.
kayemsi
12-01-2007, 07:38 PM
All the actual loads have names. There are a few load positions that did not get used as the electrician had to combine some togther to stay under the amperage limit per module. Those positions just have the default name "Light # 8".
When I imported the v 0.6 file I downloaded this morning, it said it was successful. But when I look at "Driver Info" it says version 0.4 I just see the Activate and DeActivate type fields, nothing with load names.
Is there something I need to do to remove the older driver before loading a newer version of a beta?
beelzerob
12-01-2007, 08:13 PM
That's my fault...I'm lazy about the .manifest version number. I usually just update the driver internal version number, which is USUALLY visible via a read-only field in the driver..however, I don't think this driver has that yet.
If you imported it successfully, then I'm sure you're using it.
Ok, let me add a lot of debug code and I'll post a new version you can try. That's annoying that it works so well with what I have, but not with yours.
kayemsi
12-02-2007, 11:29 AM
I went back and looked at the older protocol doc I originally had and it is definitely a subset of commands to the latest one you are using. I think the problem is that the firmware for my LJ24 is 4.6 and doesn't support the new functions.
I will try again to figure out how to get my LJ48 to talk and maybe it will support those new functions as it's firmware is 7.00.
I also need to check into buying a firmware upgrade chip for the LJ24. I know our installer had planned to get the update chip that fixed the daylight savings time change, so I would have thought it would have upgraded the firmware to a later version than 4.6. I didn't notice any issues when the change came, but we weren't moved in yet so may not have noticed if that patch had not been made.
I wonder if, when you design the functionality of the driver, that you could provide a way to check the firmware version (or ask the user to enter it) and based on that to generate default names and let the user update them and otherwise work around the missing functionality. It looks like the newer functionality will be important to support (like getting status of load levels instead of just on/off status) so you don't want to program to the lowest common denominator. But many have older firmware and it would be good to support what functionality they do have.
beelzerob
12-02-2007, 11:36 AM
I wonder if, when you design the functionality of the driver, that you could provide a way to check the firmware version (or ask the user to enter it) and based on that to generate default names and let the user update them and otherwise work around the missing functionality.
Ick.
Brandon, do you happen to know what the firmware is on this thing? I couldn't find it in the menu.
Is updating the firware for a centralite device not trivial?
BrandonStapp
12-02-2007, 11:43 AM
sorry, it should be imprinted on the chip, and no, only the bootware is field upgradeable, the firmware upgrade involves a firmware chip from what i understand.
beelzerob
12-02-2007, 11:50 AM
LiteJet SC7.0F67F....so I guess that means "7.0". If that's the case, then maybe if he switches to his 7.0 machine he'd be ok.
Kayemsi, can you send me a link or an actual copy of the protocol spec you are referring to that is different? Let me take a look at it, maybe it's trivial to support the differences.
beelzerob
12-02-2007, 01:27 PM
Uploaded a new version, .0.7.
This driver will send an event upon switch press and release, as long as the switch is configured to do so. The event will be:
Type: SwitchPress or SwitchRelease
Data: Switch number (in 3 digits....so 008 for switch 8).
pjwinstalls
12-02-2007, 10:29 PM
I tried the 0.7 driver and it worked with my litejet 24 panel. I do not know how to test the events though.
The problem is that it isnt working with the panels configured as litejet 48. I tried the ports on both units....it says the driver is connected but thats all.
beelzerob
12-03-2007, 06:22 AM
Hmm...I'll take a look at the "dual" protocol I got from Brandon and see if the commands are the same or not...I really thought they were. Then again, something has to be different, as you've doubled the number of switches and loads.
pj, you have my email address....could you set verbose to Medium, and make a log of the driver connecting to the LJ48 and email that to me? Maybe it'll give some clues.
kayemsi
12-03-2007, 08:43 AM
Kayemsi, can you send me a link or an actual copy of the protocol spec you are referring to that is different? Let me take a look at it, maybe it's trivial to support the differences.
I was talking about the one in the link on the official driver request thread.
Protocol: http://worthingtonsolutions.com/Manuals/CentraLite/LiteJet_RS-232_Protocol.pdf
pjwinstalls
12-03-2007, 09:21 AM
I will have that to you early tonight.
beelzerob
12-03-2007, 10:28 AM
I was talking about the one in the link on the official driver request thread.
Protocol: http://worthingtonsolutions.com/Manuals/CentraLite/LiteJet_RS-232_Protocol.pdf
Ok, I just wanted to make sure...I've received a lot of protocols from the litejet.
Ya, I can see exactly what you mean...there is no means to poll the switch names, nor a way to have their loads sent asynchronously. At least press/release works.
I can see how to work around that...it basically means that the nifty bells and whistles of 7.0 really aren't going to help.
The only way to relate load names to numbers then is for a config file to be used. Ah well. It's more work, but if doing so this driver will support all reasonable firmware versions, then it'll be worth it.
kayemsi
12-03-2007, 02:03 PM
Ok, I just wanted to make sure...I've received a lot of protocols from the litejet.
Ya, I can see exactly what you mean...there is no means to poll the switch names, nor a way to have their loads sent asynchronously. At least press/release works.
I can see how to work around that...it basically means that the nifty bells and whistles of 7.0 really aren't going to help.
The only way to relate load names to numbers then is for a config file to be used. Ah well. It's more work, but if doing so this driver will support all reasonable firmware versions, then it'll be worth it.
I would suggest using your method of asking for the names and if that doesn't work then have a default name assigned. That lessens the work for folks that have the later firmware and for those that don't care what the name is. If there was a way to edit the generated names in the generated config file then that would be good for the earlier releases and for those that don't necessarily want to use the exact load names as defined in the litejet.
I assume one would use these names in dynamic text fields in the templates?
beelzerob
12-03-2007, 04:05 PM
I assume one would use these names in dynamic text fields in the templates?
No, the point of the names is that they become your actual driver fields. So, instead of having to write a load number to ActivateLoad field, you'd simply set the LivingRoom boolean field to True. In doing so, you wouldn't have to worry about the actual switch or load numbers anymore...it'd be a tad more intuitive when using with the interface designer.
BrandonStapp
12-03-2007, 04:45 PM
which from what i understand is what the LJ48 is actually looking for, i spoke with the C-Lite guys again today, and apparrently the names are the important factor.
kayemsi
12-03-2007, 05:38 PM
which from what i understand is what the LJ48 is actually looking for, i spoke with the C-Lite guys again today, and apparrently the names are the important factor.
So, did they tell you what we need to do to make one of the RS232-1 ports a third party port that CQC can talk on? Can we use the RS232-1 port on unit 2, so we can save the RS232-1 port on unit 1 as a programming port.
The dual MCP protocol doc did not mention sending the name with the command. It still says ^Annn and that nnn was load number.
beelzerob
12-03-2007, 05:50 PM
Pj...Sooo...when you use this driver on a regular LJ24, the driver works fine and produces field names according to what is programmed in the unit? Does it do that with the other LJ24 also?
I checked the log you sent me, and it's not responding at all to the request for names. I'm wondering if BOTH of those LJ24's are 7.0 firmware?
Brandon...not entirely sure what you mean, but kayemsi is right in that regard...all commands are in terms of load number, not name. The names are mostly just a convenience/nifty thing.
I see how the dual works now, and it's pretty easy to work with.
Here's where I see problems already....if an LJ48 is just 2 LJ24's hooked together...then does that mean 2 LJ24's with different firmware versions can be hooked together? I just don't see how that could work.
pjwinstalls
12-03-2007, 07:05 PM
To have a lj48 configuration, you must have two lj24's connected with the lj48 upgrade kit. The kit comes with two identical firmware chips to replace the ones in the two lj24 units. So yes, identical firmware. I have 1 lj48 configuration, and one standalone lj24 for my second floor. When i was plugged into the stand alone unit, it gave me like 2 loads, 1 fan, a scene, and i think one low voltage relay. Not really sure why only those, I never named anything so i dont know exactly where its getting that info from. When i connected to the lj48 system, there werent any additional field names.
beelzerob
12-03-2007, 07:21 PM
Ok, that explains some of the problem.
My driver automatically ignores "default" names in the Centralite...so, things named "Light #3", "Scene #5", etc. The .7 driver had a timing problem so that it would still pick up some of those default names and create fields for them, which is why you were getting some fields. So if you havent named any loads or scene in your controller, then you won't get any named fields.
I've just uploaded a new driver which takes care of that timing problem (note, it causes connect to take alot longer....just be warned)....which probably means you won't get any load or scene fields.
So then here's some questions.....
1) Do you want fields based on a name, or is working with a load/scene number good enough for you?
2) Do you want to be able to make a name config file, or just take the names from the controller (if your firmware supports it)
Basically, how do you want to control your lights? I need somewhere to display what the current load level is for that particular load. I can either make fields like Load1, Load2, Load3, etc....or I can make fields that are more understandable like Bedroom2_Load, MasterBedroom_Load, Party_Scene....
pjwinstalls
12-03-2007, 07:48 PM
I got it working on the litejet 48.. it has to be plugged into rs232 -1 on the unit 1. Jumper 8 to on. unplug mcp power supply then plug back in.
Viola!
To get it to control lights on unit 2, instead of ^A001 ...for unit two it has to be ^a001 I guess you can make seperate fields to unit 2. It came up with all the named scenes...all on, all off, alarm, vacation mode, etc....
The litejet only supports a few programmable scenes. I want to make that limitless. My goal is when i press button 28, it triggers cqc to send a command back to the lite jet to turn on loads 2,6, 21....etc....
Its coming along now!
beelzerob
12-03-2007, 08:00 PM
good!
Ya, the dual protocol is pretty easy...just lowercase commands for the 2nd unit.
My plan, though, is that you don't have to do anything different, whether it's in the first unit or the 2nd. If you want to control the lights via load number, then I will have to create separate Activate and Deactivate fields for the 2nd unit, but if we got with names instead, then that won't be the case. 'sup to you, really.
pjwinstalls
12-03-2007, 08:06 PM
I really dont want to rely on the litejet for naming scenes loads etc.... I want to do it all with cqc. I want the scenes to be stored in cqc. So i guess the best way would be a name config file.
How would this work though......
I press button 5 on the standalone lj24 and i want it turn on load 4 on that panel but also load 13 and load 21 on the litejet 48?
Thanks
Philip
beelzerob
12-03-2007, 08:14 PM
Ok, I'll work towards the config file next, since that will support kayemsi too. Basically what I'll do is if there is no config file, then I'll read them from the panel....so you don't have to make a config file if you've already named the loads (and have the right firmware).
As far as that working, here is what I would think you'd do....you'd capture the button press event, and then create an action that just turns on the loads you want, one by one. You'd reference the loads by name (that you'll name in the config file), not by number. So, in the config file you'll have a line that says: "LivingRoom,13,2", which means you've named Load 13 on unit2 to be "LivingRoom". So, when the button press event happens and you catch it, you'd turn the LivingRoom field to On.
Does that sound like the functionality you'd like to work with?
pjwinstalls
12-03-2007, 08:25 PM
that sounds what i need. it addition to turning on loads on different units with one button, will i be able to tell it to set certain dim levels when turning those loads on?
Also, when you press a key and hold it with the litejet it ramps the light up and press again and hold to ramp down.... is that possible with cqc?
beelzerob
12-04-2007, 06:34 AM
Yes, that's the LoadLevelRate field now... you put in a load number, a level (0 - 99) and a rate. That's the non-intuitive way to do it right now....I'm not quite sure how I'm going to do it with field names. Hopefully I'll figure out something clever.
As far as the pressing and holding....I've had this same question before, but in regards to a different driver. It's really more a function of what the interface can do. I don't believe there's a button in the interface that will keep sending messages as long as you hold it down. Part of the problem in that is that every step decrease in brightness means sending a message and getting a return message. That can really mean a slow change in light level.
Now, what you COULD do is tie the load level for that load to a slider bar. The light would not change while you move the slider, but once you stop on a value, the light would change to that value. I don't know of a more elegant way.
Dean might have some insight into how the interface and a driver might interact so you have "press and hold" functionality.
pjwinstalls
12-04-2007, 07:06 AM
i understand. I had the same idea for the slider with my touchscreens etc.... I was trying to give more control over to cqc with the litejet buttons but thats asking too much. When you have an updated driver again, ill test it out!
Thanks again
Don't have anything to contribute but I wanted to make sure you knew that there were more lurkers out there that will be using this driver! I don't have my servers moved into the new house yet so I can't test anything (actually I guess I could connect with my laptop...). If you need another person with a functioning LiteJet 48 I'm in. Like pjwinstalls I really like the idea to move the scenes to CQC as the scene limit is one of the major limitations of the LiteJet.
beelzerob
12-04-2007, 08:07 AM
Well, I'll take all the testers I can get, anytime...but having the LJ24 here with me makes a huge difference.
Tonight the goal will be to implement the config file (I've done a driver with one recently, so my skills are still up) and then get to 2-way on/off and level.
kayemsi
12-04-2007, 09:18 AM
I got it working on the litejet 48.. it has to be plugged into rs232 -1 on the unit 1. Jumper 8 to on. unplug mcp power supply then plug back in.
I will check and set my LJ48 this way tonight and try again. I had thought that jumper 8 on both units were already set to on, but will check again.
Where do you unplug the MCP power supply? My units are installed in the wall and I assumed hardwired to the circuit breaker. Anyway I don't see a power plug. There is a switch on the board, but I am not sure exactly what that is. I will probably have to cycle power to all the breakers feeding the litejets.
pjwinstalls
12-04-2007, 05:41 PM
when you take off the front cover of the mcp, half way down the panel, there is a black power adapter...just unplug it for a minute and plug it back in.
beelzerob
12-04-2007, 09:43 PM
Ok, I posted a new version that works with a config file. The instructions for how to set it up are in the first post. If you want to just let it get the names from the unit itself, then simply don't create a config file.
Note: Currently, this will only work with the litejet 24, not the 48. That's in good time....
kayemsi
12-05-2007, 02:42 PM
Does the config file get read only when you install the driver, or is it re-read everytime CQC is restart?
If you want to make changes to the load names, I was wondering if you need to remove the driver, edit the config file, and reload the driver (or just cycle CQC).
Along those lines for those with the right firmware to get auto-generated names: what happens when you add scenes, change load names, etc in the litejet. You probably have to unload the driver or stop CQC to be able to communicate with the litejet anyway, but I was just wondering how you get updated field names for added scenes, etc.
Dean Roddey
12-05-2007, 02:57 PM
I don't know what the driver does now, but it could provide a Reload field that you can write to to force it to re-load the file.
beelzerob
12-05-2007, 04:07 PM
Ya, what Dean said. You'll be able to rescan either the device or the file by writing to the Reload.
kayemsi
12-06-2007, 11:58 AM
I got the config files setup and it is loading and I have fields for my loads and scenes. I am still unclear exactly how to use the button press/release in a triggered event.
Have you gotten this to work with your test system? Do you have a code snippet you could suggest to get started with?
beelzerob
12-06-2007, 04:38 PM
My achilles heel.....
I've simply had no time (or need so far) to learn interface design, so I didn't actually test this, as I've never done event capture. However, I coded it exactly like the Grand concerto driver events, and I know those work (ya ya, I know...no guarantee that means it works ).
I'd have to learn events before I could come up with something that tests it....anyone else here can help kayemsi out?
If nothing else, ask robertmee, he's quite adept at event coding.
Do the fields you created from your config file work? I guess the next step is 2-way.
kayemsi
12-07-2007, 11:09 AM
Well, I tried again to setup my LJ48 to test with the driver. So far, I have not had much luck with getting it to respond to commands. I can see in the logs when the driver sends the commands to activate and deactivate loads based on interface command butttons. But nothing happens. It did not setup the load/scene names and there is something odd going on with the key press messages. It looks like it is getting out of sync with the carriage returns.
For instance, I can see a Msg received [P108] without the box character for a carriage return,
driver says <ProcessMessage>: P108
then Msg received [@R10] (I am using @ for CR)
and driver says could not match character: (three little boxes),
then Msg received [8@^K]
and driver says could not match character:8,
then Msg received [0014]
Before that there was a lot of entries where the driver was sending the requests for the names, and then another press misalignment, and some unhandled messages. I will paste an exerpt below:
12/07 08:51:21-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.150, Status/App Status
<Send> Msg sent: [^M040]
}
12/07 08:51:21-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.150, Status/App Status
<Send> Msg sent: [^M041]
}
12/07 08:52:34-homecontroller, CQCServer, CIDOrbSrvWorkThread_2
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.623, Status/App Status
<CardFldChanged> ActivateScene Value: 1
}
12/07 08:52:34-homecontroller, CQCServer, CIDOrbSrvWorkThread_2
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.150, Status/App Status
<Send> Msg sent: [^C001]
}
12/07 08:53:35-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.296, Status/App Status
<GetMessage>: Msg received [^K01899]
}
12/07 08:53:35-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.179, Status/App Status
<ProcessMessage>: ^K01899
}
12/07 08:53:35-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.224, Status/App Status
<ProcessMessage>: Unhandled case.
}
12/07 08:53:35-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.296, Status/App Status
<GetMessage>: Msg received [^K01899]
}
12/07 08:53:35-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.179, Status/App Status
<ProcessMessage>: ^K01899
}
12/07 08:53:35-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.224, Status/App Status
<ProcessMessage>: Unhandled case.
}
12/07 08:53:44-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.296, Status/App Status
<GetMessage>: Msg received [P110]
}
12/07 08:53:44-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.179, Status/App Status
<ProcessMessage>: P110
}
12/07 08:53:44-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.296, Status/App Status
<GetMessage>: Msg received [
R11]
}
12/07 08:53:44-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.329, Status/App Status
<GetMessage>: Could not match char:
}
12/07 08:53:44-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.296, Status/App Status
<GetMessage>: Msg received [0
^K]
}
12/07 08:53:44-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.329, Status/App Status
<GetMessage>: Could not match char: 0
}
12/07 08:53:44-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.296, Status/App Status
<GetMessage>: Msg received [0139]
}
12/07 08:53:44-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.329, Status/App Status
<GetMessage>: Could not match char: 0
}
12/07 08:53:44-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.296, Status/App Status
<GetMessage>: Msg received [9^K0]
}
12/07 08:53:44-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.329, Status/App Status
<GetMessage>: Could not match char: 9
}
12/07 08:53:44-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.296, Status/App Status
<GetMessage>: Msg received [1999]
}
12/07 08:53:44-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.329, Status/App Status
<GetMessage>: Could not match char: 1
}
12/07 08:53:45-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.296, Status/App Status
<GetMessage>: Msg received [^K01999]
}
12/07 08:53:45-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.179, Status/App Status
<ProcessMessage>: ^K01999
}
12/07 08:53:45-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.224, Status/App Status
<ProcessMessage>: Unhandled case.
}
12/07 08:53:46-homecontroller, CQCServer, CQCDrv_CentraLite_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.CL24LiteJet.Drive rImpl.296, Status/App Status
<GetMessage>: Msg received [^K01399]
}
kayemsi
12-07-2007, 11:24 AM
Also, before I got to that point, I had disconnected my LJ24 serial cable which was on com 2, then connected another cable from com5 to the LJ48. I had left the working driver for the LJ24 installed.
I then loaded another centralite driver, with a different moniker, specifying com5. I expected to see the driver for the LJ24 be wait for connect, but it had a status of connected to device and had the load names from the config files as previously, the LJ24 did not respond to commands as expected (since it's cable was disconnected). The new driver also said connected to device and had loaded the same names from the config file.
I did not get this setup to work, so I disconnected both cables, removed drivers and moved the config file elsewhere. cycled power to litejet and rebooted pc, just to be sure everything was cleared out. Then I loaded a fresh driver for the LJ48 on com5. It did not create names and responded (or not) as I mentioned in the previous post.
I am starting to fear that this will mean that I cannot have both LJ24 & LJ48 connected to CQC at the same time, which is a bummer. Maybe I can put them on to different PCs, then I only have to worry about the single config.csv file that each would try to load and the names for one would be wrong.
beelzerob
12-07-2007, 09:11 PM
Well, this is a very EARLY version of the driver....so ya, at this point there's only one name config file, all drivers will load those names and load nums. Putting them on different PC's would work, since the config file is local...but that'd only be a temporary fix. Basically what I'll do is prepend the drivers moniker to the config file, since you can't have duplicate monikers.
As far as the other problems connecting....the issue is that yours is outputting a <CR>, and I had not accounted for that, since mine doesn't and I didn't know how to turn that on. The hardest part is that when names are requested from the machine, there is no hard message formats...though a <CR> should clearly be in error.
For now, if you know how to turn off <CR> at the end of message sends, do that...but otherwise, a version is coming soon that will be smarter about that.
kayemsi
12-07-2007, 09:51 PM
Since the first post said to enable CR, I had done that on my LJ24 and that been working. In the Litejet software main page, select Settings which will bring up a dialog with two areas, Desired Settings and Current Settings. In the Desired Settings area is a radio button to enable or disable the CR. You set it and click the send button.
Thanks again for working on this!
beelzerob
12-08-2007, 07:02 PM
Heh, ya, you're right...I did tell ya to enable CR's. It's just that no one else did, and this one I have wasn't either, so I went from that perspective.
However, your testing can be very helpful....please re-enable your CR's and do your testing from that perspective. That way my code will have to handle whether enabled or not (it's not that big a deal to not have them...I'd rather they were always just on or off, less uncertainty for me to deal with).
I posted a new version which might fix the CR issue, please give it a try.
beelzerob
12-09-2007, 02:35 PM
Dean, I'm pondering a means of doing something here....
For a given field name, you've got the following info to keep track of for it:
Type (Load, Switch, Scene)
Level (if Load)
On/Off
Rate (if Load)
IdNum
I had thought to use a named value map, where the key would be the field name (for instance "LivingRoom"), and the subkeys are the above values, and the value is the data to store.
So, for the Load "LivingRoom", I'd store:
LivingRoom,Type,Load
LivingRoom,Level,65
LivingRoom,State,On
LivingRoom,Rate,5
LivingRoom,Id,3
Are named value maps terribly inefficient at this? There's going to be SOME conversions from strings to cards and back at times in order to store them. Would it be better to have arrays of Cards or Strings as needed, and just use the same index into all of them for a given item?
Does it sound good enough to go with the namedvalmap?
Dean Roddey
12-09-2007, 02:39 PM
After you create the fields, then generally it's always just a mapping from field id back to the field info, and that's a numeric thing. So you can store a list of objects (that hold the info you need) in order to field creation (which will be in order of increasing field id) and use a binary lookup to find a particular one.
beelzerob
12-09-2007, 03:04 PM
You mean create an object to hold all of the necessary info? And then create an array of those type of objects? And then use the field ID as the index into that array?
The field ID's start at about 15, though, don't they? All of the default fields get created first, so that raises the field Id of the first user created field to above 0.
Do I have the idea right?
Dean Roddey
12-09-2007, 07:15 PM
Yeh. You can just use the id of the first field to know what the first id of yours is, and just subtract that from any id you get, and you have the index.
kayemsi
12-09-2007, 07:30 PM
So if you want to use a boolean image to indicate whether a specific light is on or off, you would set the field to LivingRoom.State?
A first thought about using this in an interface is to have the name of the light (probably static text) next to a boolean image that would indicate on/off and clicking it would either use ActivateLoad or DeactivateLoad depending. Then have a slider beside it that shows level and moving it would change the level with the ActivateLoadLevelRate command, but I am not sure how you indicate the rate without coding a default into the action.
beelzerob
12-10-2007, 09:06 AM
Ya, you've got the right idea. What I'll add to the config file is a default rate for each load you specify. Then, if you want to use a custom rate, you'd use the LoadLevelRate field instead. But otherwise, if you change the level in the LivingRoom.Level field, it will apply the default rate.
Things are going well in this....it takes a lot of coding to do these objects, and I have to remember how. Fortunately, I did this for the DataNab devices, so it's just an issue of adapting it for this use.
I plan to have something very very close to feature complete before the end of this week.
beelzerob
12-11-2007, 07:35 PM
Ok, uploaded a new driver file. There are changes to the config file, including naming and line format, so please read all of the text in the first post.
There are new fields to try too.
Currently, the new fields only work if you load using a config file. I'm working on reading from the device next. If it does not move past connect and you are trying to use a config file, then set verbose to medium and check the log, it'll tell you if the config file was found or not.
Give er a rip! I should be able to post the device-reading version soon too.
kayemsi
12-12-2007, 07:57 PM
I tried to load the new version but got an error. I have the LJ24 currently connected to a different server than the master server and did have this working with the previous version. I removed the 1.0 version and then modified the config.csv file to add one rate for testing sake and named it CentraLite_config.csv. I then imported the new driver pack and tried to load the driver again (I now have two centralite drivers to choose from since the new one has a different name). I chose the Litejet one instead of the older CL24 one. I got an error and it failed to load. The message was "Driver CentraLite failed to initialize, so it will not load. See the logs for details"
I queried the log and did snap to file and attached.
beelzerob
12-12-2007, 08:06 PM
Doh! My mistake. Try 1.5 I just uploaded.
beelzerob
12-14-2007, 02:40 PM
Hey Dean....any chance you might add a Peek() command to the comm port class? The litejets can be configured to either append a CR or not. I don't rely on those for reading, since I can't guarantee they'll be there...but I do have to clean them up so they don't screw up the next read. It'd be handy to be able to just peek in the buffer after I get my data and see if there's a CR next so I can eat it, rather than having to read and test every char.
kayemsi
12-15-2007, 08:11 AM
I finally got a chance to try the 1.5 driver and still get the error that the driver failed to initialize. I am trying it to connect to the LJ24.
I tried twice with the same error. I attached the snap-to-file log. Hope this has some useful data. Let me know if there is something else I can do to help.
Dean Roddey
12-15-2007, 10:28 AM
Hey Dean....any chance you might add a Peek() command to the comm port class? The litejets can be configured to either append a CR or not. I don't rely on those for reading, since I can't guarantee they'll be there...but I do have to clean them up so they don't screw up the next read. It'd be handy to be able to just peek in the buffer after I get my data and see if there's a CR next so I can eat it, rather than having to read and test every char.
You should just require that it be configured to append the CR for now.
beelzerob
12-15-2007, 11:14 AM
I finally got a chance to try the 1.5 driver and still get the error that the driver failed to initialize. I am trying it to connect to the LJ24.
I tried twice with the same error. I attached the snap-to-file log. Hope this has some useful data. Let me know if there is something else I can do to help.
Ok, I see what it is, and why I wouldn't have had that problem.
Redownload 1.5 again.
beelzerob
12-15-2007, 11:15 AM
You should just require that it be configured to append the CR for now.
Well, I'll have to check with Brandon and make sure that all litejet owners have access to the software where you configure that (since I don't currently have that software ;-) )
Dean Roddey
12-15-2007, 12:33 PM
If not, then you can provide a driver prompt that lets them indicate which way it is, or you can do a quick test upon connect where you try it and see what happens and set a flag that indicates which way to go.
brotsten
12-15-2007, 01:51 PM
Well, I'll have to check with Brandon and make sure that all litejet owners have access to the software where you configure that (since I don't currently have that software ;-) )
All the documentation and programs are on the Centralite (http://centralite.com/dealer_login/index.aspx) site.
Brian
beelzerob
12-15-2007, 02:25 PM
Well, I downloaded the software, but (amusingly) I can't get it to connect. It's probably because I'm using a USB-serial cable, although it works fine with the driver harness.
Oh well, I'll just do the non-CR testing and rely on the crowd to test the CR stuff. Not a big deal.
beelzerob
12-15-2007, 07:33 PM
Ok, 1.6 uploaded. Level fields for loads are now 2-way. When you change the load, whether via a switch or front panel, or by turning the load on or off, the change should be reflected in the associated Load_Level field.
NOTE: For this to work, you have to configure the light to "send action". You do this via the front panel under Edit settings for each light. (Maybe you can do it via the software, dunno).
Next is load and switch on/off settings.
kayemsi
12-16-2007, 06:05 AM
Thanks! Got the 1.6 version loaded and connected up my boolean images. Now I can press and activate the lights. The image changes reb/green when I press from the interface.
But it does not change when I manually press the button and turn the load on/off. Are you reading state from the device yet? For the older firmware I have, I think you would have to poll and request the big status word that send the status of all the loads at once and parse that. I am sure parsing that would be hard.
beelzerob
12-16-2007, 07:19 AM
But it does not change when I manually press the button and turn the load on/off. Are you reading state from the device yet? For the older firmware I have, I think you would have to poll and request the big status word that send the status of all the loads at once and parse that. I am sure parsing that would be hard.
No 2-way states yet....that's next. Well that, and identifying older firmware versions and when CR's are being sent...stuff like that.
And yes, it's very hard!! ;-)
beelzerob
12-17-2007, 09:46 AM
Well, here's what it's boiled down to....I think I'm going to have to return to the requirement that a <CR> is appended to every message. That's because far too many messages sent by the controller have no prefix or other kind of info for me to figure out what it is. Because of that, when I ask for a name, I have to leave it wide open and just accept everything I can read, because there is otherwise no termination to a given message.
What that means is that during connect, when you're reading names from the controller...if someone presses a switch, you're screwed. Granted, I could require during connect that no one touches nothin....but it's just cleaner, safer, and more reliable to require that you enable <CR> sending. Since the software is free, then that should not be an unreasonable burden on Centralite owners.
Unfortunately for me, I can't seem to get that software to run at this point. When I select the port, I get a red RS232 icon instead of green. The problem for me is 2-fold....we upgraded our PC's and they're so new and shiny, they don't have comm ports at all (I've been using USB-RS232 adapters fresh off ebay, and they appear to work just fine...except in some cases like this). However, I can use my laptop to connect just for the configuring purposes, but the other fold of the problem is that I don't have a straight-thru serial cable, just a null modem....and all my regular cables are packed away. :-( However, I think I can overcome that problem without incurring more cost buying more cables that I already have somewhere.
So, assuming I can actually configure mine to send the <CR>'s, then expect that it's going to be a requirement of anyone who uses this driver. Just letting you know...you might want to get familiar with that part of the software.
Dean Roddey
12-17-2007, 10:26 AM
Oh, I thought that you meant that maybe it had either LF or CR/LF or something like that, based on configuration, not that it had CR or nothing. In that case, then yeh, you'd absolutely require that the CR be there, else it would be crazy.
beelzerob
12-17-2007, 11:40 AM
Ya, it's all or nothing. Having the CR appended to the end HELPS....but given the perfect circumstances, it still wouldn't prevent me from interpretting wrong values because so few responses have any kind of data header.
I'm kinda surprised, given the popularity of Centralite, that their protocol is so poor. I've written drivers for MUCH cheaper devices that have brilliant protocols by comparison.
beelzerob
12-17-2007, 07:37 PM
Well Brandon, I'm going to need some of your superior Centralite support it seems. I now understand what all the complaining by the other guys was about... :-(
So, using my laptop with Win2k and the litejet software installed, I cannot get the litejet software to connect.
I've used hyperterminal to confirm that I'm actually connected to the device. I was able to send it commands and I received back valid responses. Then, without changing anything, I closed hyperterminal and opened the litejet software, and it was still not able to connect. I tried both RS232 ports on the centralite, no difference.
If I try to connect manually, then I get the red RS232 icon. I also found that if I let it try to connect automatically, and I then go and press buttons on the centralite that I know will send data out the RS232 port...then I EVENTUALLY get a red RS232 icon.
When the centralite is automatically searching for the port, I see it flash by that Com1 is "OK", and that is the port it is connected to.
I'm almost wondering if the software is trying to connect via 9600 baud instead of 19.2k. Amusingly, I can't change the baud of those ports to test this theory because....the ports can only be changed via the software. :roll: I would thus HOPE that it would be smart enough to try both baud rates.
Any suggestions Brandon?
pjwinstalls
12-23-2007, 11:26 PM
stupid question but.... u dont have cqc installed on that machine do u with the litejet driver?
beelzerob
12-24-2007, 07:56 AM
stupid question but.... u dont have cqc installed on that machine do u with the litejet driver?
not a dumb question. I don't recall if I had yet installed cqc on the laptop when I tried the Centralite software. Are you thinking it might cause some kind of conflict?
kayemsi
12-25-2007, 06:11 PM
I have CQC and the litejet software on the same computer. To program the litejet I plug the serial cable into rs232-1 (I think you can check status, etc via rs232-2 with the litejet software). When I use the CQC driver I plug it into rs232-2. I stop CQC before I start the litejet software.
If the litejet software has communication issues, it stops responding and I have had to cycle power to the unit to get it to talk again.
BTW, the last I heard Brandon had been ill.
sweethip
12-27-2007, 04:50 AM
quick questions about Centralite.. is this lighting system for new homes only? do they require a neutral wire? and how expensive are they compared to Zwave,insteon,etc
BrandonStapp
12-27-2007, 06:28 AM
sorry Rob,
I have only been back in the office for a day (was in the hospital 9 days), and still suffering the effects of pneumonia. I should be back on the rocker by this weekend, in the mean time I will see what i can figure out for you. :-(
BrandonStapp
12-27-2007, 06:32 AM
quickie for you off the top of my head. Within the LiteJet software, click on the settings button, and as long as your serial cable is connected, click the "Read Settings" button and it should pull down all the settings needed to connect.
They built that in for the convenience of people using "3rd party software". :-)
beelzerob
12-27-2007, 11:54 AM
I was pretty sure I tried that, and nothing happened to it. I'll try again, but it won't be until this Sunday.
Get better!
pjwinstalls
01-04-2008, 01:46 PM
any luck beelzebob?
beelzerob
01-04-2008, 07:29 PM
Nope!
I connected my laptop to the litejet, and verified via hyperterminal that I was able to receive messages from the litejet. But when I closed hyperterminal and tried to connect, I still got the red RS232 symbol. I also tried doing the "Read Settings" that Brandon suggested, but I didn't notice anything happen. I also tried just setting the carriage return to on, and it didn't take.
So I'm still at square one.
Sorry I never responded about this....it's been 1000% house wiring since Sunday, and won't really let up until it's done. However, I can devote at least some time at night to this, if Brandon has anything new to try??
kayemsi
01-05-2008, 05:39 PM
Are you trying to connect the litejet software to RS232-1? I have to connect to RS232-1 to use the litejet software and use RS232-2 to get your CQC driver to talk to it. I move the serial cable between the ports on the LJ24.
beelzerob
01-06-2008, 04:46 AM
Ya know, I'm pretty sure I was at -2 when I tried. When I get home from todays episode of wiring the house, I'll try both ports to be sure. I know at some point in the past, I tried both ports.
brotsten
01-06-2008, 02:39 PM
I know you are knee deep in wiring at the moment, but I tried the driver on my Elegance system today.
It gets pretty unhappy when it queries the system for the load names and information. This seems reasonable as the documentation I have on the Elegance protocol doesn't list this feature.
When I supplied a configuration file with a single load name and associated load number, it both transmitted and received the correct information. WooHoo. I checked the logs and saw no errors.
When I get some more time, I will do some more complete testing.
Thanks,
Brian
beelzerob
01-06-2008, 05:15 PM
Hey, I can always make some time for good news! That's great to hear!
beelzerob
01-07-2008, 12:23 PM
Well, I tried RS232-1 now also...same deal. Clicking "Get Settings" does nothing, and when I try to connect manually, I get the red RS232 icon.
I have another PC I can try this on...maybe it's either a problem with my laptop or Win2k?
beelzerob
01-07-2008, 02:07 PM
Ok, I tried it on my media PC, which runs WinXP Home, and no luck either. I tried both ports, I tried rebooting the Centralite, I tried looking for something in the centralite panel menu (and found nothing there towards setup)...nothing. I just kept it on automatic connection while doing all those things, and it never gave me anything other than the red RS232. I tried the manual connect too, and no luck.
Brandon, is there some way to reset the centralite, maybe to factory defaults? I'm not sure if you want me to do that or not, and I hate to lose the programmed scenes and light names, they're helpful for testing, but I need to set the CR to continue the developing.
brotsten
01-07-2008, 02:22 PM
The manual (3.1.5) says:
"Make sure that the unit is on and all dip switches are in the off position."
I'm sure you tried turning it on :-) , did you turn all the dips off?
Brian
beelzerob
01-07-2008, 02:31 PM
Hmm....3 and 8 are in the On position. It's...involved...to move these dip switches. Heh. But since it won't permanently damage his nifty case, I'll get into them and give that a try. Thanks for the idea!
kayemsi
01-07-2008, 02:32 PM
The manual (3.1.5) says:
"Make sure that the unit is on and all dip switches are in the off position."
I'm sure you tried turning it on :-) , did you turn all the dips off?
Brian
He has a demo unit for a LJ24, not an Elegance. I think he has the 7.0 firmware that supposedly does not need the baud rate to be set via dip switches, but is set/get in the litejet software. Not sure if all the dip switches have the same meaning between LJ24 and Elegance. I will check how my LJ24 dip switches are set, but I have older (4.6) firmware.
beelzerob
01-07-2008, 03:14 PM
Woot! You win, sir! I went in, switched the dips down, ran setup, green RS232! I set "send CR always", and then read settings and it was set! I switched the dips back up that were up, and I'm back in business. Thanks!
Be warned, all of you...the next driver version will expect that you'll have set your centralite to always send CR's, so I suggest working on that.
brotsten
01-07-2008, 03:44 PM
He has a demo unit for a LJ24, not an Elegance. I think he has the 7.0 firmware that supposedly does not need the baud rate to be set via dip switches, but is set/get in the litejet software. Not sure if all the dip switches have the same meaning between LJ24 and Elegance. I will check how my LJ24 dip switches are set, but I have older (4.6) firmware.
That was a quote from the litejet manual.
Glad to hear it works, a small payback.
Brian
brotsten
01-12-2008, 09:54 PM
I've done some more playing around.
I used the "Report" function of the Centralite Elegance programming package and created a list of Loads. It contains way too much information, so I stripped out the extras with Excel and was able to load the driver with all 96 of my loads.
So far, so good. Looking forward to the feedback feature.
Brian
beelzerob
01-13-2008, 06:10 PM
Ok guys, if you would, please download 1.9 and give it a try. As promised, this now requires the use of enabling the "send CR to third party" function using the setup software. Without it, this driver will never even connect.
I don't know if I mentioned it or not, but this also should determine initial load levels. Note: After initial load level, this driver may lose track of load levels unless you enable your loads to "send action" via the keypad. At this point, I'd recommend you enable everything to send actions.....switches, loads, etc.
Next step (when time permits) will be getting initial load state.
kayemsi
01-15-2008, 05:18 PM
I will give the 1.9 version a try tonight. Is determining the initial load state something that is available to older firmware versions (4.6)?
I really appreciate your efforts on this!
By the way, before we get a lot further in the development of this driver, we need to clarify the meaning of the term "switch". There really isn't a switch term in the Centralite manuals. There are lights or loads, that you can turn on/off and set dimming levels and rates for. There are scenes that can be turned on/off and dimmed where all the loads in that scene are dimmed from their defined level together by holding the assigned keypad buttons. All units have these. There are keypads with buttons (not called switches) that one can assign to a load or a scene. All installations can have these.
The units also support two types of optional modules, fan control and low voltage relays. I think the protocol doc is referring to relays when they say switch. The fans and relays can also be programmed to send rs232 messages (At least there is a Load RS232 checkbox for each fan and relay as well as the lights). I don't have either type of optional module.
Button presses from the keypad buttons can be programmed to send the press and release messages with the button number. The scenes can also be programmed to send a user defined ascii message out rs232-1 and/or rs232-2.
I was getting confused when your event names are switchpress and switchrelease instead of button press / release. And you are defining loads, scenes, and switches in the config file.
beelzerob
01-15-2008, 06:23 PM
I'm just using "switch" as the protocol does. It's up to you guys to figure out what that is. ;-)
From the protocol doc: "38‐digit ASCII hex number that holds the ON/OFF state of 96 button switches (0 for OFF and 1 for ON) and 42 FP switches."
So, the "switches" are the buttons that control loads, and the front panel buttons...near as I can tell.
brotsten
01-16-2008, 08:19 PM
It still works on my Elegance system.
Brian
beelzerob
01-28-2008, 07:07 AM
fyi haven't forgotten about you guys....hopefully I can make some progress on this tonight or the next. I've already made progress towards init load state.
beelzerob
02-02-2008, 03:51 PM
Ok, sorry for the delay.
2.1 is uploaded....that gets the initial state of all loads, and also updates the load states when they are changed, whether explicitely changed, or if the load level is set to 0. Please give it a try.
kayemsi
02-07-2008, 11:37 PM
Great news! I am on travel to San Franciso, but will give this a try as soon as I get home (~2/15)
beelzerob
02-08-2008, 04:08 AM
Hehe...I think "great news" would be more along the lines of "Hey, I tested the driver and it works flawlessly and your house is done a month ahead of schedule!" ....but I'll take what I can get.
By the time you test it on 2/15, I should have the remaining items from the protocol in there...next up is initial switch position, which looks not quite as easy as initial load state was.
beelzerob
02-11-2008, 06:40 PM
Well, I was right...it's not as easy.
The problem I seem to be having is getting the message with all the switch states in it. No matter what I do for switch positions, the message always comes back with all 0's (off) and a single 1 (on).
Since none of the switches I have are actual toggle switches, I'm assuming that if the little LED light on the button is on, then that switch is considered on? It doesn't seem to matter either way. I've tried all on, all off, and something in between, but when I query instant on/off status of all switches, I keep getting the same message back.
Brandon, any guesses on what to try next?
brotsten
02-11-2008, 08:25 PM
Well, I was right...it's not as easy.
The problem I seem to be having is getting the message with all the switch states in it. No matter what I do for switch positions, the message always comes back with all 0's (off) and a single 1 (on).
Since none of the switches I have are actual toggle switches, I'm assuming that if the little LED light on the button is on, then that switch is considered on? It doesn't seem to matter either way. I've tried all on, all off, and something in between, but when I query instant on/off status of all switches, I keep getting the same message back.
Brandon, any guesses on what to try next?
Is it perhaps the actual state of the switch? Have you tried holding a switch in the closed position and issuing the query?
Brian
beelzerob
02-12-2008, 04:48 AM
I considered that...that would be interesting. If that's the case, then I'm going to have to find out which of the switches it currently states is "on". But I would tend to think that would also lead to confusion, as I would consider even these button switches to be "on" if their little LED light is on. I'm not sure what value there is with "on" meaning that the button is being held down. I'm already sending out events for buttonpress and buttonrelease, so that seems almost redundant. (though I understand using this protocol call for the initial state, which the events wouldn't tell you)
Are these button switches the only type that goes with Centralite? Something like a toggle switch would clearly mean up = on, down = off.
Brandon, if you could, can you ask the Centralite people just what an "on" switch means? If it means being pressed, then no problem. If it means the LED light is on....then I've got a problem somewhere.
brotsten
02-12-2008, 06:44 AM
Are these button switches the only type that goes with Centralite? Something like a toggle switch would clearly mean up = on, down = off.
At least for the Elegance, you can attach any type of switch you want. The documentation examples a motion switch. There is a setting on the input page of the configuration software that defines the type of switch.
Brian
beelzerob
02-12-2008, 08:16 AM
Hmmm. Well, tonight I'll try holding down the switch and see. Maybe for buttons, being held in is the only "on" condition.
beelzerob
02-16-2008, 11:54 AM
Well, you're right! I held down a button, then started it up, and sure enough, it changed the bit pattern.
So I guess this is just a momentary/instantaneous kind of info thing. There are already switch pressed/released events, and now in case you start up the driver and someone is currently pressing the switch, then it will show the correct state. Seems like honestly a real low value in knowing that info....but still, it's there to be had.
So...once I polish that part of the code, then I'd say I'm actually done with the LJ24 aspect. The next step will be to handle the LJ48. I don't have one myself, so I'll need someone to actively help in debugging it. I don't expect it to be all that difficult, but it'll still need to be tested.
brotsten
02-16-2008, 02:10 PM
Seems like honestly a real low value in knowing that info....but still, it's there to be had.
Centralite uses that information to flag stuck switches.
Brian
kayemsi
02-16-2008, 02:30 PM
I loaded the 2.1 driver and it got the initial load states correctly, but still doesn't update the load state when it is changed at the button. In the CQC field browser, I tried the Reload button but it still did not register the correct state of a load that had been changed at the button since the driver was initially loaded. This is a Litejet 24 with firmware version 4.6.
I also tried the ResetFields field from the Field Browser and that set the load states all to false, even the one that had been true since the initial load. What is the purpose of that field?
brotsten
02-16-2008, 02:36 PM
I also installed the 2.1 driver. I was using version 1.9.
2.1 broke the Elegance function. :shock: Will not connect.
Brian
beelzerob
02-16-2008, 06:22 PM
I loaded the 2.1 driver and it got the initial load states correctly, but still doesn't update the load state when it is changed at the button. In the CQC field browser, I tried the Reload button but it still did not register the correct state of a load that had been changed at the button since the driver was initially loaded. This is a Litejet 24 with firmware version 4.6.
I also tried the ResetFields field from the Field Browser and that set the load states all to false, even the one that had been true since the initial load. What is the purpose of that field?
First, are you sure you set all your loads to "Send Action"? Because otherwise, they won't tell CQC that their load level changed. For loads where their state does not change, does their level field change? If neither change, then I'm sure it's not been configured to Send Action.
The ResetFields is just supposed to cause the driver to either reload the config file, or re-scan the device for names....it's basically a driver reboot. I'll test mine to make sure it recovers from a reload correctly.
beelzerob
02-16-2008, 06:43 PM
I also installed the 2.1 driver. I was using version 1.9.
2.1 broke the Elegance function. :shock: Will not connect.
Brian
Ok, try 2.4. I don't expect it to fix it, but the logfile will give me some more info.
And just email me the logfile instead of posting it....drives Dean nuts. PM me for my email address.
kayemsi
02-17-2008, 02:05 PM
Ok, try 2.4. I don't expect it to fix it, but the logfile will give me some more info.
And just email me the logfile instead of posting it....drives Dean nuts. PM me for my email address.
FYI, The first post still shows 2.1 (edited 2/2)
beelzerob
02-17-2008, 02:15 PM
doh...try again.
kayemsi
02-17-2008, 03:40 PM
I checked and all my lights have the "Load RS232" checked. I also have all my scenes with their RS232-1 and RS232-2 checked. All my buttons have send action checked. Are you getting the load change status by polling with the all loads status query command? My LJ24 has firmware 4.6 so doesn't support the request for individual load status and level query.
beelzerob
02-17-2008, 04:24 PM
Oh ya...ick.
The protocol actually does support querying a load for it's level...and from that, the state can be derived. However, it does not send messages when a load changes. That means all the loads will have to be polled. Ick. It's too bad there wasn't some way to tie switch numbers to loads, because then I could just poll the particular load when the switch press happens.
Is there a 1 to 1 correlation between switches and loads? I mean, does a switch only correspond to a single load? I know that a load can correspond to multiple switches. If it is 1 to 1, then I may just make you add the associated load number in the config file, and that way I won't need to poll. I'd really rather not poll...
brotsten, lemme know when you can send me a new logfile.
kayemsi
02-17-2008, 06:34 PM
Loads can be assigned to multiple buttons and loads can also be changed as part of (possibly multiple different) scenes that can be assigned to switches or invoked from timed events within the LJ24.
Does your demo unit send messages when the load changes from various sources (switch press, as part of a scene activation, etc)?
If you created a command the user could invoke that sent the ^G and got back the on/off state of all the loads, and processed the response to update the field states then I could have the lighting template call it during OnLoad and possibly put a command button to refresh the status. Not ideal, but maybe better than having the state wrong and no way to get a correct picture without reinstalling the driver.
I would guess that processing the ^G would be less time consuming than sending the ^Fnnn for each load individually, but then again the ^Fnnn would give you level.
kayemsi
02-17-2008, 06:50 PM
Of course, I guess you could send the ^G on ANY switch press as it is likely that some load has changed state due to the switch press (although it might have just changed the level of a load or a scene but it wouldn't really hurt to get the states again). Doing this is probably less intensive than polling.
beelzerob
02-17-2008, 06:52 PM
Ya, ^G wouldn't tell ya much, whereas getting the level tells you state AND level (0 = off, > 0 is on).
Yes, the new firmware sends a message when the load changes, regardless of how. Very handy. And I see what you mean...the load can change regardless of button pressed..or at the very least, a scene button would be too messy to try and associate with a bunch of loads.
So...I guess it's down to polling loads for older firmware. Ick.
Well, as soon as Brot replies with a newer logfile so I can track down his problem, then I'll probably be ready to return this demo unit to Brandon....the LJ48 and load polling really doesn't require this local hardware.
kayemsi
02-17-2008, 07:41 PM
I asked Brandon back in December for pricing on a firmware upgrade for my LJ24, but still no response. But I guess there may be others besides me with older firmware, so it would be good to support it.
My LJ48 has newer firmware (7.0) but I have not tried connecting it to CQC since early days of the driver development when I could not get it to connect.
beelzerob
02-17-2008, 07:58 PM
I thought the LJ48 was just 2 LJ24's hooked together....
Well, polling the loads isn't the end of the world.
kayemsi
02-17-2008, 08:29 PM
An LJ48 is two LJ24's hooked together with a serial cable between the RS-232-2 connectors on each unit and specalized firmware chips. Then the PC with the Litejet software has to talk to the RS-232-1 on unit 1 in programming mode. The docs say not to use RS-232-1 on unit 2 (especially not in programming mode as it could screw up your setup since it needs to figure out which is unit 1 with its specific loads and which is unit 2 with different loads)
Now the dual MCP protocol doc still mentions third party communication via RS-232-2 (but they are no longer available as they are hooked together) so I am not sure which port to use for CQC connection (RS-232-1 on unit 1 or RS-232-1 on unit 2). I am not sure how accurate the dual MCP protocol document is.
Brandon never could get the LJ48 to talk to the ELK via M1XSP even though ELK and CentraLite both claim it should work.
beelzerob
02-18-2008, 04:04 AM
Well, if you haven't tried it in a while, go ahead....the driver SHOULD work with all of the loads on the "A" unit (the one the cqc serial cable is plugged into).
kayemsi
02-18-2008, 02:26 PM
I intend to try it tonight. I will note that for my LJ24, I can only get CQC to connect on RS-232-2 (the third party port). I had moved the cable over to RS-232-1 to connect the Litejet software to check the things you asked about and then exited and restated CQC without moving the cable to RS-232-2 and the driver sat at wait for connect. Stopped CQC, moved the cable to RS-232-2, restarted and it connected. I am relating this because I am not clear if I will be able to connect CQC to the RS-232-1 connector on the "A" unit (only one available).
Target
02-20-2008, 09:25 AM
Is there an update as to how this project is going? I will have an up and running Elegance system in about 2 weeks, and will go through the whole thread then. I am more than willing to help test. My limited coding abilities will probably not help much on the writing side.
Target
beelzerob
02-20-2008, 09:52 AM
By your 2 weeks, this driver will essentially be done. It appears to be working with the Elegance with few problems, if any.
Target
02-20-2008, 10:07 AM
Well, that's great! Sorry that I couldn't help, but I'm glad that its working. Wince it will be done, will I be wasting money if I have my local HA firm (supplying the Centralite system) do an initial programming of the system (as if it were stand alone)?
Thanks a ton, and I can't wait to test it.
Target
brotsten
02-20-2008, 10:13 AM
Well, that's great! Sorry that I couldn't help, but I'm glad that its working. Wince it will be done, will I be wasting money if I have my local HA firm (supplying the Centralite system) do an initial programming of the system (as if it were stand alone)?
Thanks a ton, and I can't wait to test it.
Target
They will still have to program the MCP. (That should be part of the install anyway)
In addition, you will have to create a config file as show on the first post.
Brian
beelzerob
02-20-2008, 10:54 AM
Ya, I have no idea....listen to Brian. Check the first post, because there are some other configuring items that have to happen before you can use the driver, but those really shouldn't take a professional to do. You can use the Centralite software to do that.
beelzerob
02-27-2008, 12:28 PM
Kayemsi, any luck with the LJ48?
kayemsi
02-27-2008, 12:53 PM
Kayemsi, any luck with the LJ48?
I have not been able to get the LJ48 to connect. I had not tried to use the litejet software to connect since early January, when I was able to change some loads assigned to buttons without any problems. When I went to try this before attempting to connect to CQC, it keeps cycling thru all the com ports but can't connect. When this has happened in the past I have shut off the breakers to the panels and turn them back on to reset. This did not help this time. I tried everything I can think of to get it to reset. I tried changing some of the dip switches even though I have not changed any previously.
I have 2 CQC server PCs in the closet with the LiteJet panels. I tried disconnecting the other one that interfaces CQC with the LJ24 and tried connecting that one to the LJ48, with no better luck than I had with using the master server with the moxa card.
The LJ48 is still working correctly in controlling the loads and scenes, etc. It just wont connect. So no luck so far.
I thought there was someone else who had a LJ48 who was watching this thread. I wonder if they have tried it recently.
beelzerob
02-27-2008, 01:50 PM
Did you try Brotsten's suggestion, which helped me connect my LJ24?
The manual (3.1.5) says:
"Make sure that the unit is on and all dip switches are in the off position."
I'm sure you tried turning it on , did you turn all the dips off?
Brian
beelzerob
03-07-2008, 05:19 AM
Kayemsi, if you haven't already, check out this thread at cocoontech (http://www.cocoontech.com/index.php?showtopic=9691&st=15&start=15) in which someone describes their troubles connecting with a LJ48. Interesting the final solution:
Resolution: Both boards sent as replacements were shipped with firmware SC7.0 instead of DC7.0. The S stands for single and the D stands for dual.
kayemsi
03-08-2008, 12:20 PM
The firmware on panels of my LJ48 are marked "LiteJet DC7.0 E3DB".
I looked at the thread you linked to and tried setting all the DIP swithes to off on both panels and then pushing the reset buttons under the DIP switches (note that these are not labeled so I had never tried them before). I was then able to connect with the litejet software.
I the tried loading the CentraLite CQC driver and it is at Wait for Connect. I got an error (don't remember exact wording) about being unable to set verbose mode. When I click the button in the Admin Interface and choose the PC the CL48 driver is on, it takes a very long time to come up then I get a dialog that says "The driver verbose mode set was not sucessful"
The field browser for that driver shows a lot of fields *Scene_State and *Switch_State, but no *Load_State. Some of the * are names I recognize from the litejet. There are also some where the * for Switch_State is 1-9 and A-Z but I don't have any named that. Also the Scene_States are the predefined ones Vacation_Mode, Alarm_Flash, All_On, and All_Off, but none of the ones I defined myself.
I have been checking the view logs screen periodically and I see messages to the CL48 still being processed but no new fields are being added to the list in Field Browser. Still shows driver status as Wait for Connect
kayemsi
03-08-2008, 08:48 PM
After the driver had been trying to connect for a long while, I looked at the log again and it appears that it got stuck trying to get switch named NONE. I had gone thru and for some keypad buttons that did not have anything assigned to that button and called them NONE. The LiteJet software did not care if the button names are unique. In some cases I had named several All_Off as I had that scene assigned to more than one button.
I attached the snapped log file, just in case.
Dean Roddey
03-08-2008, 08:59 PM
The duplicate names are preventing it from initializing. You'll have to give them unique names or take them out if that's doable. The driver is creating field names based on those names, and the field names have to be unique.
beelzerob
03-08-2008, 10:36 PM
Ya, what Dean said, they'll have to be unique. If they're not unique, then I'd have to modify the driver to make each one unique, and I can guarantee they wouldn't be pretty fieldnames by the time I got done...so probably better that you do it. Even if it's just NONE1, NONE2, etc.
I didn't know the Centralite allows duplicate names, but that makes sense. However, the same issue applies to them as to you in that regard....theyll have to be unique.
This shouldn't be an unreasonable request...
Dean Roddey
03-08-2008, 11:42 PM
It would probably be better to just drop those that are dups, so that the driver will load, even if it doesn't have all the fields.
beelzerob
03-09-2008, 06:31 AM
Is there an easy/elegant way to do that, or do I just have to keep track of all fields I've created and reject duplicates as they happen?
Dean Roddey
03-09-2008, 12:41 PM
You'd just need to createa vector of strings and put each new field name into it as you are creating them, after searching it to make sure that name isn't already there. I need to do a hash set type collection for CML I guess, to make that kind of thing more efficient.
kayemsi
03-09-2008, 03:53 PM
I went into the LiteJet software and set the names for the non-existent buttons back to Button #37 or whatever the appropriate number instead of NONE. As I recall, for the loads you were ignoring those with default type names. I had unloaded the driver and stopped CQC on the master server before I opened the LiteJet software.
I restarted CQC and loaded the driver again using the Moniker CentraLite48 this time. It is still at Wait for Connect. I did a snap of the logfile again and am attaching it.
I noticed an error: Driver 'CentraLite48' does not have a field id of 150
I don't have any loads, buttons, or scenes named 150 and I had looked thru them all to check for duplicates. Note that the unused items on both units are defaulted with the same set of names like Button #01 for instance. But if you are ignoring those, it shouldn't matter right?
Dean Roddey
03-09-2008, 05:40 PM
I think that's a bug in the driver. It's looking up the field ids of the fields it creates and is storing them, but seems to be perhaps incorrectly indexing that list and therefore getting a bad id, so he'll have to help you with that one. There's some msg coming in from the Centralite, and he's looking up that field, and it probably is not really a valid one in his list, and he's trying to store something using that field id.
beelzerob
03-09-2008, 06:30 PM
Ya, probably.
beelzerob
03-10-2008, 06:57 PM
Ok, try 2.8. It does a number of things.
First, it should reject all duplicate field names. If you find a field is missing, then turn verbose up to Low, and it will output an ERROR message, along with the name of the field that was a duplicate. Note that the name must only be unique within its particular group (switches, scenes, or loads). I'm hoping that this change will also fix the mysterious "There is no 150 field ID" error.
Second, when installing the driver, you'll now be asked to choose your firmware. This only affects whether the driver will have to poll for loads or not. It does not affect whether it uses a config file or not. If it is older firmware, you'll have to use a config file. If you have newer firmware, then it will only use a config file if it finds one.
Third, for older firmware, the driver should now poll for loads. This means that load changes should be reflected in the fields now, both in state and level. I have it currently set to poll all loads within 4 polls, which is about 1 second. This may be a bit ambitious, depending on how many loads you have...let me know if you experience performance issues. The alternative is to poll less loads per round, which means the fields will be updated slower.
Have at it.
kayemsi
03-10-2008, 08:52 PM
Well I have some sucess to report! For the LJ24 with older firmware, I am now able to get feedback status when I change the loads from the keypads, both on/off and level.
For the LJ48, with 7.0 firmware. It still got an error loading while getting the names from the LJ. Now the field not found was 149. I will attach that log file.
But I tried creating a config file and was sucessful with naming the first 24 loads. It is connected to device and I can control it and get feedback!
I tried adding the other 24 loads in the config file with the numbers 41-64 because a doc I have about configuring the LJ48 from the TouchPanels states "On Unit 1 - Lights 41 through 64 represent Lights 1 through 24 on Unit 2". I wasn't sure it this was working correctly so I removed those lines so I only configured for the 1st 24. I don't know if the driver is actually trying to support the LJ48 protocol yet (small letters for commands with load numbers 1-24 to mean those on Unit 2). If so, what load numbers should I put in the config file?
I am also getting lines <Connect> [Exception] Index 40 is invalid for this collection object.
I was also getting lines:
Other side (192.168.0.110:13507) is too busy to accept data
The server at 192.168.0.110:13507 has closed the connection.
That is the IP of the master server which has the LJ48 driver. An other machine which has the LJ24 (which is now polling) is an old 400 MHz P2. I did not know which was causing the messages and was seeing some jerkiness when trying to look at the fields for the CentraLite drivers in the field browser. Lockup for a moment then reload the list.
I have stopped CQC on that old machine and will try to see if that jerkiness and messages was caused by the polling.
kayemsi
03-10-2008, 09:13 PM
I have the CQC server with the LJ24 stopped overnight to see if I get more of those server too busy messages. I am not sure it is the polling on the LJ24 or the LJ48 driver so I am doing a test. In the morning I will unload the LJ48 driver and restart the LJ24 server and let that run tomorrow and see if it has problems with the polling.
beelzerob
03-10-2008, 09:14 PM
No, the driver isn't setup yet for the LJ48. It should actually work ok for all loads on the device that the serial cable is attached to, but won't work for loads on the "other" device. As for configuring that, I believe what we're going to have to do is add another data item to the config file, a "1", or "2" at the end of the line to indicate which LJ24 it is on.
How many loads are on the device that is polling? I don't believe that long poll()'s on one machine would affect sluggishness on a different machine. If you're experiencing stuttering on a machine, and then remove the polling driver, and it goes away, then that's a good indicator.
I didn't see any driver messages in that logfile, so verbose must not have been on? Can you set verbose to medium, and then let it run again? Also, email me the logfile (or host it somewhere and post a linke) instead of posting it...drives Dean nuts. PM me for email address, if you don't have it already.
kayemsi
03-10-2008, 09:24 PM
I have tried several things tonight and flushed the log file several times. Maybe I should remove the drivers and flush the log and reload and set the logging to medium. What setup would you like a file for? LJ48 without a config file, LJ48 with a config file for 24 loads, LJ24 for the polling? I think I should only have one driver loaded at a time.
beelzerob
03-11-2008, 05:16 AM
I only want a logfile for the one that is giving the "invalid field ID" error. The others sound like they're working right.
How many loads does the LJ24 have? I'm guessing it was too ambitious to try and poll all of them in a second.
kayemsi
03-11-2008, 06:36 AM
I only want a logfile for the one that is giving the "invalid field ID" error. The others sound like they're working right.
How many loads does the LJ24 have? I'm guessing it was too ambitious to try and poll all of them in a second.
Somehow everything reset in the middle of the night and so this morning both servers with their centralite drivers were running. I captured a dump of the log file, but my router's connection to the internet was offline, so I did not get a chance to PM you or been able to send it. That log has invalid field ID for other numbers and the server too busy message as well, but as both servers are running, I don't know what caused it. I will try again tonight when I get home to get a clean dump.
The LJ24 has about 19-20 loads. Several of the inputs on a module are hooked together for 1 load due to the possible current draw (outside flood lights, etc) so not all are used as single loads.
My LJ48 has all 48 loads used as individual loads. But as it is new firmware, it doesn't need to poll.
kayemsi
03-11-2008, 06:42 AM
I didn't see any driver messages in that logfile, so verbose must not have been on?
That second log had:
03/10 22:12:04-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread19
{
CQCKit, CQCKit_DriverBase.cpp.4409, API Failed/Not Found, Error: 2000/0/0
Driver 'CentraLite48' does not have a field id of 149
}
and
03/10 22:12:04-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread19
{
CIDMacroEng, CIDMacroEng_MethodImpl.cpp.881, Status/App Status
An exception was thrown from method MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.ProcessMessage
}
03/10 22:12:04-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread19
{
CIDMacroEng, CIDMacroEng_MethodImpl.cpp.881, Status/App Status
An exception was thrown from method MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.WaitForMessage
}
03/10 22:12:06-homecontroller, CQCClient, CIDOrbClientSpoolThread_4
{
CIDSock, CIDSock_StreamSocket.cpp.1256, API Failed/Not Ready, Error: 5046/0/0
Other side (192.168.0.110:13507) is too busy to accept data
}
03/10 22:12:06-homecontroller, CQCClient, CIDOrbClientSpoolThread_4
{
CIDOrb, CIDOrb_ClientBaseHelpers.cpp.680, API Failed/Lost Connection
The server at 192.168.0.110:13507 has closed the connection
}
03/10 22:12:06-homecontroller, CQCClient, CIDOrbClientSpoolThread_4
{
CIDOrb, CIDOrb_ClientBaseHelpers.cpp.702, API Failed/Lost Connection
The server at 192.168.0.110:13507 has closed the connection
}
beelzerob
03-11-2008, 06:56 AM
I'm sorry...what I meant is that I didn't see any messages specifically that I had output from the driver, which will only be seen if the verbose level is set high enough. The messages there are system messages, not driver messages. So, please set the verbose to medium and give a try again. Then there should be messages specifically from my driver.
beelzerob
03-11-2008, 06:58 AM
Maybe Dean can shed light on what the "too busy" thing means...but if this only started occuring with you using this latest driver, then it seems certain it's going poll crazy. Tonight I'll output a new version that should ease that, and we'll see what happens.
Dean Roddey
03-11-2008, 11:29 AM
That means that the socket's incoming buffer on the other side is backed up and more data cannot be accepted to a send from the client side failed. The other side here is CQCServer, so the target would be a driver almost certainly. It's an odd error to get in that kind of situation, and possibly semi-bogus, really caused by the fact that the connection got dropped because of the error.
But clearly it's related to the msgs from the driver just before it since they happen at the same time. Some outgoing write command probably came in, the driver went to do it and failed and threw an exception, and that caused the error back to the client.
I don't have a lot to add but I thought I would throw this out in regards to polling.
"Note: Version 5.5 or later of the Centralite firmware places a 1 second delay between each load change transmission. This
means that multiple load changes can and will take several seconds to reach the M1. An ALL ON command could take well
over a minute for all loads to report in."
This is from the Elk M1XSP install manual.
Maybe this doesn't apply to polling (ie CQC actively asking the status of the loads) and only applies to reporting load state changes. Anyway, FYI.
Chris
beelzerob
03-11-2008, 01:04 PM
Well, I'm not sure exactly where 5.5 falls in the "latest" firmware realm...I don't know if the protocol I have applies only to 7.0 or not. However, it seems to imply that load changes are automatically sent out, which would make it similar to 7.0.
But that seems to be a specific restriction in regards to the Elk interface with Centralite, since it's from the Elk manual. Just for fun, I'll try the All-On tonight and see how it reacts. Interesting that....there's no timing restriction to polling the loads that I'm aware of, but a 1 second day for asynch messages...geez! That means it'd actually be snappier to poll loads even when firmware would support sending out the load changes.
kayemsi
03-11-2008, 04:40 PM
I PM'd you with the address where I uploaded the log files. I just added a 4th one where I set the verbose for the LJ24 to off and the LJ48 to medium. The LJ48 is using a config file. I could unload it and rename the config file so I can reinstall and let try getting it ask for names.
kayemsi
03-11-2008, 05:52 PM
Now there is a 5th log file that has EXCEPTIONS:
03/11 19:53:42-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread21
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.235, Status/App Status
<LoadNumToFieldId>: [EXCEPTION] Index 61 is invalid for this collection object
}
03/11 19:53:42-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread21
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.385, Status/App Status
<ProcessMessage>: [EXCEPTION] Field $BadMsg was accessed as a type different from its defined type
}
Note that CentraLite48 is the LJ48 with verbose at Medium and CentraLite is the LJ24 with verbose at Off. Using a config file for both.
beelzerob
03-15-2008, 11:23 AM
Ok, based on the logfile you sent me, kayemsi, I found the problem in a loop I was running through. Also if you don't have all loads specified, and an unknown load sends the driver a message, it didn't handle it all that well. So now in driver 2.9, when an unknown load sends the driver a message (such as a load change message), it'll simply put out a log message saying it couldn't find the load, and then do nothing.
What was the next issue with the current driver? Was there anything else? If no one has any other issues, then I'll move to the next step which is getting the dual to work.
Dean Roddey
03-15-2008, 11:32 AM
That message should probably be a verbose mode message, so that it doesn't just fill up the logs if they aren't paying attention. If htey want to know if unknown loads are sending, they can crank up the verbosity.
beelzerob
03-15-2008, 11:37 AM
Minor omission of details...it is of course a medium verbose message.
beelzerob
03-15-2008, 04:52 PM
Ok, version 3.0 uploaded. It fixes a problem caused if an invalid fieldname is supplied. That causes all sorts of cascading problems...so now, if an illegal fieldname is attempted to be registered, then connect will fail.
Remember that valid fieldnames only contain alphanumeric,underscore and dash.
beelzerob
03-16-2008, 12:49 PM
Allrighty...3.2 uploaded. It does a few things. First, it will make sure the driver goes offline if the cable is disconnected or the control unit loses power. Second, it makes sure it recovers from that condition gracefully (appearantly the unit needs a few seconds to compose itself before it'll start answering questions...). Third, I discovered that, except for initial settings, the switch states never would have changed. So now that's fixed, so switch states actually WILL reflect what the switch is doing.
And other assorted fixes.
So there it is. I consider this complete, except for dual control.
beelzerob
03-16-2008, 01:28 PM
Kayemsi, and anyone else who has a dual unit....do me a favor.
I uploaded a "dual" version of the 3.2 driver. It isn't really dual, but what it should do is allow you to control the things on the "other" unit.
So, if 3.2 works on your dual LJ48 to control the loads, scenes, etc on the first unit...then remove that driver and install the 3.2Dual driver in its place (don't change where the cable is plugged in). I just want to see if it will allow for control of things on that other box. (Essentially all I did was change all the control letters to lower case).
This is just a quick and dirty test to see if it'll be as easy as the protocol indicates...
kayemsi
03-16-2008, 03:24 PM
I want to make sure I understand what to do.
Do I need to remove both instances of the 3.0 driver (LJ24 and LJ48) before I import 3.0 Dual? And leave the LJ24 unloaded for the test?
I have been using a config file, so to make sure I can keep track and test, I am making a new config file with the loads 1-24 having the names for loads 1-24 on Unit 2. I would save off the current config file with a dummy name and rename the new one with the one I had been using. Then load 3.0 dual with the same moniker CentraLite48?
beelzerob
03-16-2008, 03:30 PM
Well, first off, scrap 3.0 and use 3.3. The polling I have to do to check connection makes way too much log spam, so I fixed that.
Otherwise, you can leave your LJ24 driver as is...it shouldn't affect anything else by itself. As long as it works, just keep the LJ24 driver a'hummin'.
For the LJ48, you've got the right idea....remove the driver, change the config file to reflect loads on the 2nd unit, and then restart the driver. Hopefully that will let you control loads ONLY on the 2nd unit (the first unit loads will then not work). Again, this is just a quick and dirty test of controlling both units. Since I know the driver works to control loads on unit 1 of the LJ48, I now want to see if it'll control loads on unit2.
Thanks!
kayemsi
03-16-2008, 03:39 PM
OK, I decided to just forget about names and just used the old config file so the interface template worked. I loaded the 3.0 Dual and it connected, I checked the log then (verbose was off) and saw that it showed the template loaded and then a message about an error loading and missing field names, I then set the verbose to medium and checked template. I showed one load on, but I don't really know if this was correct as I couldn't see a light on and don't know which load really is the same number as the one from the other unit. Anyway I can push a button to turn on a load and the state does not change in the interface. If I use the interface to turn on a load, that seems to turn on the right load, but the interface does not show that it turned on.
Then load only shows [^f001] and the response either 00 or 99. Which corresponds to the state of load 1 on the unit2 as it should, but there are so many of the ^f001 messages, it writes over the other messages very quickly so I had to try a few times before I captured both the on and off state in one file along with a error message when it changed.
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.475, Status/App Status
<GetMessage>: Msg received [99]
}
03/16 18:34:54-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread23
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.567, Status/App Status
<GetMessage>: Msg type: LoadLevel
}
03/16 18:34:54-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread23
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.303, Status/App Status
<ProcessMessage>: [99]
}
03/16 18:34:54-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread23
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.475, Status/App Status
<GetMessage>: Msg received [^K04100]
}
03/16 18:34:54-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread23
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.567, Status/App Status
<GetMessage>: Msg type: LoadChange
}
03/16 18:34:54-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread23
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.303, Status/App Status
<ProcessMessage>: [^K04100]
}
03/16 18:34:54-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread23
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.348, Status/App Status
<ProcessMessage>: LoadChange could not find load: 041
}
03/16 18:34:55-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread23
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.194, Status/App Status
<Send> Msg sent: [^f001]
}
03/16 18:34:55-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread23
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.475, Status/App Status
<GetMessage>: Msg received [00]
}
03/16 18:34:55-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread23
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.567, Status/App Status
<GetMessage>: Msg type: LoadLevel
}
03/16 18:34:55-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread23
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.303, Status/App Status
<ProcessMessage>: [00]
}
03/16 18:34:55-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread23
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.194, Status/App Status
<Send> Msg sent: [^f001]
}
beelzerob
03-16-2008, 03:52 PM
Ya, try it again with 3.3 if ya could...it'll make a much clearer logfile.
kayemsi
03-17-2008, 08:01 PM
From the logs with the 3.3 dual and some Centralite docs, it appears that when the centralite sends a status message from a state change, it references loads 1-24 on unit 1 as 1-24, but loads 1-24 on unit 2 are numbered 41-64. But the protocol for sending it commands uses 1-24 for both units, but uses upper case command letters for unit 1 and lower case letters for unit 2.
I think you are going to need to ask if this is a LJ48 on the install and then use that to determine the format you use to send commands and what load number to use. I suggest that you consider assigning the load numbers 1-24 for the loads on unit 1 and 41-64 for the loads on unit 2 and this is how a config file should reference them. Then when the status messages come in they will correspond to the right load number associated with the field and may not need special treatment. Then use the IsLJ48 flag and load_number > 40 test for formatting the commands. If it is an LJ48 and the load number > 40 then subtract 40 and use lower case command letters, otherwise just use uppercase command letters.
BTW, loads 25-28 are fans and loads 29-40 are Low Voltage Relays on unit 1 and likewise loads 65-68 are the fans and 69-80 are the relays on unit 2.
This is just a suggested appoach that you can consider.
I think that for a Elegance, the loads are just number 1-192 and only use upper case commands.
beelzerob
03-18-2008, 08:47 AM
So...for sending commands to the 2nd unit of the litejet, then the load numbers are < 40, and the commands are lower case...that agrees with the protocol.
But you're saying that if load 13 on unit 2 changes its load level, and thus sends a message to the PC, it will arrive as load (13 + 40) = 53? Oh joy. Amazing they didn't include that little detail in the protocol....
kayemsi
03-18-2008, 09:30 AM
So...for sending commands to the 2nd unit of the litejet, then the load numbers are < 40, and the commands are lower case...that agrees with the protocol.
But you're saying that if load 13 on unit 2 changes its load level, and thus sends a message to the PC, it will arrive as load (13 + 40) = 53? Oh joy. Amazing they didn't include that little detail in the protocol....
That appears to be the case. When I pushed a button bound to load 1 on unit 2 and turned the light on, the log file showed ^K04199 as being received and the driver did not recognize load 41 (of course, since for the test I only had loads 1-24 in the config file) and the interface widget associated with load 1 on unit 2 did not show a status update. When I used the interface with the 3.3 dual driver and clicked a checkbox widget to turn on the load associated with load 2 on unit 2, the light turned on as it should, the log showed a message that the associated field name_state had changed (I don't remember the exact wording), and then received a message with ^K04299 and then a message that load 42 was not found. So the lower case command messages to change the state using the load numbers 1-24 seems to effect loads 1-24 on unit 2 as we expected for this test.
kayemsi
03-18-2008, 09:43 AM
I don't think the protocol addresses these asynchronous messages from the LJ that are sent when the user has checked that a particular load should send a message out the RS-232 port.
I know it mentioned the format for the button press/release that is a separate setting on the button definition page.
There is also a setting to send an RS-232 message when a scene is activated, but I think that the message sent is up to the user. The scene page has a text box for you to enter whatever ascii code you want to send out the rs-232 port when the scene is activated to facilitate control of third party devices from the LiteJet. So we could use that as a way to react to scene activation since there is not a protocol command to get the status of a scene. But we would have to come up with a set of ascii strings we want to support (either to indicate the scene status to the scenenameScene_state field or a way to pass that to another driver field for the CQC enduser to use as they like).
beelzerob
03-18-2008, 10:35 AM
Ok, that's good info. Thanks for that. When you press a button on unit 2, and that button is set to send an action, what message comes in? Is it a P or p? And what button number? Just wondering if buttons are treated the same way as loads.
For now, I'd like just to support what's in the protocol....so I'll keep scene activation on the back burner. I want to get this thing finished and "shipped", as I've had it for too long and my life is about to get turned upside down in a month with moving. So I'll press forward for the dual control, and then we can sit and make sure that works.
kayemsi
03-18-2008, 10:59 AM
I will have to check when I get home tonight. I believe that those messages that I referenced above were in the last set of log files that I emailed to you (Sunday?). I don't remember if I saw any [Pxxx] type buttons, but was not looking for those. Do those show up at verbose level medium?
I know that I have all my programmed buttons set to send on the LJ24, but I need to go back and check that on the LJ48.
beelzerob
03-18-2008, 11:16 AM
Ya, Verbose medium will get that info.
Thanks, this is really good info, and will make putting in the dual capability much easier I think.
kayemsi
03-18-2008, 07:36 PM
As far as I can tell, the button numbers just keep increasing from unit 1 to unit 2. And it uses P and R for buttons on both units, just as it uses K for sending the load status change messages.
After several times of switching between LiteJet software and loading the driver without a config file, I was able to get all the unacceptable characters out of the button, scene and load names and it is finally connected to device with out a config file. The ^f001 spamming made it kind of hard to used the log viewer to catch the issues as they kept scrolling out of the 256 message limit. It still took a fairly log time to connect, at least 10 minutes.
But I have made progress!
beelzerob
03-18-2008, 07:46 PM
Ok then...let's attempt what you suggested, which is to use a single config file, and just take the load numbers and switch numbers up past the single device limit for the 2nd unit. So, loads on unit 2 would start at 41, scenes at 42, and buttons at 139.
Something's wrong if you're still getting the spamming...I'll have to check that. Also, that spamming shouldn't be showing up at all until after connect.
Finally...ya, connect does take quite a while, and the only way to see that it's actually making progress is to periodically check the logfile as it displays which switches it's checking....but 10 minutes seems pretty lethargic. The LJ24 I have here takes maybe a minute.
kayemsi
03-18-2008, 07:55 PM
Unit 1 and Unit 2 share the same scenes, so I did not get double the scenes with a LJ48. Still have the same number as a LJ24, which goes up to 30 I think.
beelzerob
03-18-2008, 07:56 PM
Ok, I found the problem...you can use 3.4 and you won't get the Send spam.
I didn't bother to put the dual one up, since that was just a test and it served its purpose.
You may notice in the driver manifest that it now asks if you have new firmware LJ24, old firmware LJ24, or an LJ48. That doesn't do anything in the code yet, but it'll help soon.
beelzerob
03-23-2008, 07:02 PM
kayemsi, just as input...which is easier for you to deal with, on a config file basis....do you want to just use ID numbers to indicate which unit the load/switch is on (so, over 40 means on 2nd unit, etc), or do you want to use another field in the config file line that indicates which unit the load is on, and all load numbers will be below 40. So, instead of:
MasterBedroom,L,13,3
You'd have:
MasterBedroom,L,13,3,2
to indicate that load 13 is on unit 2.
Either method won't really affect my code, it's just a matter of which feels easier to you.
beelzerob
03-23-2008, 08:02 PM
Ok, please try 3.7. Even if you don't have an LJ48, please keep trying these new versions, because I don't want to break existing functionality.
What 3.7 does is:
1) Read loads, scenes, and switches from both devices.
2) React correctly to load change messages from LJ48 2nd unit
3) Allow load state changes, regardless of which board it is on.
That's all it does for now...so, switches don't work, and reading from a config file for LJ48 won't work. so please try out what DOES work and see if it's good.
kayemsi
03-23-2008, 08:26 PM
kayemsi, just as input...which is easier for you to deal with, on a config file basis....do you want to just use ID numbers to indicate which unit the load/switch is on (so, over 40 means on 2nd unit, etc), or do you want to use another field in the config file line that indicates which unit the load is on, and all load numbers will be below 40. So, instead of:
MasterBedroom,L,13,3
You'd have:
MasterBedroom,L,13,3,2
to indicate that load 13 is on unit 2.
Either method won't really affect my code, it's just a matter of which feels easier to you.
Sorry I did not respond sooner. I just got a chance to check the forum.
I think that using numbers over 40 for the loads on unit 2 makes more sense than having another field, just for a LJ48. That way the format of the config file is the same for all the models. Adding the 40 when creating the config file (or subtracting when checking an existing one) isn't too big a deal.
But I can deal with either way, if someone else has a strong preference.
I have just loaded the 3.7 driver without a config file for the LJ48. I am going to load it for the LJ24 next (with a config file of course).
beelzerob
03-24-2008, 07:04 PM
kayemsi, try 3.8 now. All I did was add more debug that will show up during the connect...that way I can make sure it's handling the loads and such on the 2nd board correctly. Here's what I need:
I need the entire logfile of just the connect sequence for the LJ48 (with no config file). So, here's what I suggest. Download the new driver, and remove the old one. Purge the logfile using the Admin client menu option. Then, unplug the serial cable to the LJ48. Install the new driver and then set verbose to Medium. Then, plug in the serial cable. Once the driver goes to Connected, then dump the entire log and please email it to me. Thanks!
kayemsi
03-27-2008, 08:18 PM
I just noticed the post (Sorry :oops: ) and followed your instructions and dumped a log using the snap to file from the log viewer (set to 256). I just emailed the log to you.
There are so many loads and switches that it fills the log really fast. I don't know if it captured what you were looking for. Is there any other tool to dump the entire log file?
beelzerob
03-27-2008, 08:30 PM
Yes, there's a very obscure and user-unfriendly method to dump the entire log (subtle hint hint to someone whose name starts with "Dean").
1) Go to the start menu, find the cqc group, and start the CQC Command Prompt
2) At the command prompt, type: CIDLogAdmin testdump
3) That produces a CIDLogServer.Dump file in your /Windows/system32/ directory. That's a dump of everything that was in the log
4) Zip it and email to me!
Here's how I'd suggest capturing the log. First, disconnect the serial cable to the litejet. Then, go in and set the verbose to medium for the driver. Then, go to the Admin log menu and Flush the logs. Then, reconnect the serial cable. Once the driver has gone to Connected, set the verbose to Off, and then dump the log as indicated above.
Let me know if you need anymore help, and thanks!
kayemsi
03-27-2008, 09:06 PM
Sent you a dump of the entire log file.
beelzerob
04-01-2008, 08:00 AM
Does anyone else have the LJ48 that would like to help with the testing of this? Kayemsi has been a great help, but more help would make things go faster. I'd REALLY like to get this done before I have to tear apart all my PC stuff for our move mid-month. I'm still waiting to find out what kind of internet service we'll have out there..... *crosses fingers*
kayemsi
04-08-2008, 05:29 PM
Any luck processing the load change messages from an LJ48? As of 3.8 I am not getting feedback from lights turned on manualy from buttons. I am getting feedback from the same version of the driver on the LJ24.
Just a quick example from invoking changes from the interface, you can see where it is cannot find load 018 from a status message ^K01899 even though it had just sent ^A018 to turn the light on. In this case the field in the driver changes as I expect that came from toggling the field from the interface. If it was turned on from a button it would not change in the interface.
04/08 20:19:58-homecontroller, CQCServer, CIDOrbSrvWorkThread_3
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.1410, Status/App Status
<BoolFldChanged> Upstairs_HallwayLoad_State Value: True
}
04/08 20:19:58-homecontroller, CQCServer, CIDOrbSrvWorkThread_3
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.209, Status/App Status
<Send> Msg sent: [^A018]
}
04/08 20:19:58-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.526, Status/App Status
<GetMessage>: Msg received [^K01899]
}
04/08 20:19:58-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.618, Status/App Status
<GetMessage>: Msg type: LoadChange
}
04/08 20:19:58-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.354, Status/App Status
<ProcessMessage>: [^K01899]
}
04/08 20:19:58-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.399, Status/App Status
<ProcessMessage>: LoadChange could not find load: 018
}
04/08 20:19:58-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.526, Status/App Status
<GetMessage>: Msg received [^K01899]
}
04/08 20:19:58-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.618, Status/App Status
<GetMessage>: Msg type: LoadChange
}
04/08 20:19:58-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.354, Status/App Status
<ProcessMessage>: [^K01899]
}
04/08 20:19:58-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.399, Status/App Status
<ProcessMessage>: LoadChange could not find load: 018
}
04/08 20:20:04-homecontroller, CQCServer, CIDOrbSrvWorkThread_3
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.1410, Status/App Status
<BoolFldChanged> Upstairs_HallwayLoad_State Value: False
}
04/08 20:20:04-homecontroller, CQCServer, CIDOrbSrvWorkThread_3
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.209, Status/App Status
<Send> Msg sent: [^B018]
}
04/08 20:20:04-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.526, Status/App Status
<GetMessage>: Msg received [^K01800]
}
04/08 20:20:04-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.618, Status/App Status
<GetMessage>: Msg type: LoadChange
}
04/08 20:20:04-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.354, Status/App Status
<ProcessMessage>: [^K01800]
}
04/08 20:20:04-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.399, Status/App Status
<ProcessMessage>: LoadChange could not find load: 018
}
04/08 20:20:04-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.526, Status/App Status
<GetMessage>: Msg received [^K01800]
}
04/08 20:20:04-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.618, Status/App Status
<GetMessage>: Msg type: LoadChange
}
04/08 20:20:04-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.354, Status/App Status
<ProcessMessage>: [^K01800]
}
04/08 20:20:04-homecontroller, CQCServer, CQCDrv_CentraLite48_Thread13
{
CQCGenDrvS, MEng.User.CQC.Drivers.Centralite.LiteJet.DriverImp l.399, Status/App Status
<ProcessMessage>: LoadChange could not find load: 018
}
beelzerob
04-08-2008, 05:37 PM
See post #244 for what I need next, for debugging info.
vBulletin v3.5.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.