View Full Version : WebControl Driver (Native)
Sendero
12-05-2009, 09:25 PM
Well, took the plunge and decided to write a CML driver for the WebControl unit. It's attached. Let me know of any issues/feedback.
Exposed Fields:
{ReadOnly} AnalogInput1,2, 3
{ReadOnly} DigitalInput1,2,3,4,5,6,7,8
{Read/Write} DigitalOutput1,2,3,4,5,6,7,8
{ReadOnly} Temperature1,2,3,4,5,6,7,8
{ReadOnly} Humidity
trouble
01-27-2010, 12:18 AM
G'day
I cant get CQC to connect, what username/password do we need to set on the webcontrol, or do we need to disable it?
Paul
Sendero
01-27-2010, 06:00 PM
G'day
I cant get CQC to connect, what username/password do we need to set on the webcontrol, or do we need to disable it?
Paul
Hi Paul,
You need to disable the authentication. I don't have mine online right now to recall specifically the config setting, but you do need to turn off authentication.
trouble
01-28-2010, 01:41 AM
Thanks, i tried that but the driver just showed waiting for initialization, or something to that effect.
Sendero
01-29-2010, 07:48 AM
Thanks, i tried that but the driver just showed waiting for initialization, or something to that effect.
From the CQC machine that you're installing the driver on, what happens when you launch IE and go to http://<WebControl IP>:80? Do you get directly in to the status page? Thats all the driver is trying to do for connect. It's actually a very basic driver (which is why it's my first one).
trouble
02-05-2010, 06:10 PM
G'day
Yes it lets me straight in.
I had removed the device as it kept causing all my drivers to go offline and back online every 15 seconds. I just reinstalled it, and set verbose to high, this is what i found in the logs:
02/06 14:02:05-fx160, CQCServer, CIDOrbSrvWorkThread_3
{
CQCServer, CQCServer_DriverCtrl.cpp.61, Status/App Status
Remote client forcing load of driver. Moniker=WebControl1. M/M/V=WebControl//0.5
}
02/06 14:02:05-fx160, CQCServer, CIDOrbSrvWorkThread_3
{
CQCServer, CQCServer_DriverCtrl.cpp.133, Status/App Status
Remotely loaded driver WebControl1 loaded successfully
}
02/06 14:02:20-fx160, CQCServer, CQCDrv_WebControl1_Thread21
{
CQCKit, CQCKit_DriverBase.cpp.2591, Status/App Status
Driver 'WebControl1' is beginning initialization
}
02/06 14:02:26-fx160, CQCServer, CQCDrv_WebControl1_Thread21
{
CIDMacroEng, CIDMacroEng_Engine.cpp.1323, Status/App Status
Exception 'StringErrors.BadIndex' was thrown from line 322
MEng.String
}
02/06 14:02:26-fx160, CQCServer, CQCDrv_WebControl1_Thread21
{
CQCKit, CQCKit_DriverBase.cpp.2664, Status/App Status
Driver WebControl1 returned failure status on initialization
}
02/06 14:02:36-fx160, CQCServer, CQCDrv_WebControl1_Thread21
{
CQCKit, CQCKit_DriverBase.cpp.2591, Status/App Status
Driver 'WebControl1' is beginning initialization
}
Paul
znelbok
02-05-2010, 09:17 PM
What is this diver for - what is the WebControl, is it hardware, software?
Mick
jrunde
02-05-2010, 09:56 PM
It is a hardware device. http://www.cainetworks.com/products/webcontrol/index.html
Dean Roddey
02-05-2010, 09:57 PM
G'day
Yes it lets me straight in.
I had removed the device as it kept causing all my drivers to go offline and back online every 15 seconds. I just reinstalled it, and set verbose to high, this is what i found in the logs:Paul
Something it's getting is causing an exception during driver init that it's not dealing with gracefully, so it's not even able to load the driver. So you may as well remove it for now.
trouble
02-06-2010, 02:45 AM
Dean
Thanks, can you point me where to look to see what could be causing the issue?
Paul
Dean Roddey
02-06-2010, 12:54 PM
It would require loading the driver into the driver test harness and debugging through it. If you've never done that, it's not something for a lazy afternoon's amusment or anything, so it may not be something you want to do, I dunno.
Sendero
02-06-2010, 04:19 PM
I just PM'd you with my e-mail address so you can send me the HTML dump from your unit. I suspect that something that the HTML you're getting from the unit is different than mine. I can look in to this tomorrow once I get the HTML.
trouble
02-08-2010, 12:13 PM
Can someone tell me how to get the HTML dump?
Paul
Sendero
02-08-2010, 05:46 PM
Can someone tell me how to get the HTML dump?
Paul
I just mean to view the page in IE or FireFox and save the HTML out to a file. Then just e-mail me that file.
Sendero
02-09-2010, 04:37 PM
Try the attached driver and let me know if it works. I ran it against your page and it worked fine.
I also added a lot more logging to it so that we'll see what fails, if anything. It does respect the logging level so you'll need to set it to Verbose and then it'll log the start and end of each section its parsing.
trouble
02-10-2010, 04:09 PM
G'day
Its connected OK and showing me some values, will test it properly tonight and let you know.
Paul
robolo
02-14-2010, 06:37 PM
Where do you buy that and what is the price? Couldn't find the info on the website.
jrunde
02-15-2010, 12:42 PM
I got mine at Amazon (http://www.amazon.com/Webcontrol-Universal-Temperature-Humidity-Controller/dp/B001H4JXLU/ref=sr_1_1?ie=UTF8&s=electronics&qid=1266270124&sr=8-1).
trouble
02-17-2010, 02:24 AM
I got mine from ebay, unit price was cheap - shipping was very expensive.
DaveB
02-17-2010, 05:10 PM
That is a cool little PCL board! I just bought one!
trouble
02-17-2010, 07:20 PM
Yeah but I am having issues with it showing all my temp sensors at 127.9 degrees. Think it might be the power supply.
robolo
08-25-2010, 11:55 AM
Getting ready to buy one of these. There are 2 firmware versions of the WebControl, one with BRE and one with PCL. Does the CQC driver support one of these specifically, or does it not matter?
robolo
potts.mike
02-09-2012, 07:26 AM
Has this driver been relatively stable for everyone? I need some digital inputs as well as humidity and was looking at the webcontrol board.
Sendero
05-22-2012, 02:06 PM
I don't know if its adoption rate has been too high. Mine works fine but I think I've heard the UI has changed and since the driver scrapes the UI there may be some work required for it.
I can share the driver code for others to modify if they like. I would offer to update to handle both old & new UI but I don't quite have to time to really work on it right now.
bbrendon
03-09-2013, 10:53 AM
I just tried this driver on my unit. Didn't work. I'm running the 916 beta. Attached is the log.
Dean Roddey
03-09-2013, 11:01 AM
It was going along, and doing ok. Then it started parsing the response for digital inputs and failed with a string index error. After that, it started getting URL not fully qualified errors, then it cycled. Not sure if the string index is related to the URL errors or not. But somewhere in the processing of the digital input values it appeared to go wrong.
I'm not sure if you have maybe a newer version, or just have some scenario not forseen originally that's tripped it up. Hard to say without actually testing it in the IDE.
bbrendon
03-09-2013, 11:12 AM
I poked around a bit and noticed its loading index.cgi which isn't valid on my webcontrol. Its index.htm. I changed that part of the driver, but didn't fix it. I thought I might get lucky.
I attached the index.htm file. I renamed it to html because the forums don't like htm.
bbrendon
03-09-2013, 01:48 PM
This is the deepest I've dug into CQC drivers. I've found a few things.
It seems the device I have is significantly different than the one the driver supports. The status page says "Version: v03.02.17". The index.cgi doesn't exist and I can't find the string or similar that the driver references "Temperature 1-8 =". Also the documentation says to references URLs to access the sensors such as http://10.0.1.54/geth1.cgi
So I hacked up the driver. Its not pretty but its working for me :)
All it does is humidity and temp right now. Hopefully I'll be able to clean it up soon. If someone wants it as is, just let me know.
bbrendon
03-10-2013, 08:29 PM
I never thought I would be writing a CQC driver, but it's true. I've pretty much re-written this thing with all of the original functionality. All but a few bits remain. I was originally just going to make the old driver work, but you know... One thing leads to another. So yea, its basically a rewrite.
It now works on the current Webcontrol PLC units with XML parsing, error checking, faster, better, stronger, etc :)
My main concern was error checking and taking the driver offline if a sensor disconnects because I'm going to be using this with a DIY thermostat.
Its attached.
vBulletin v3.5.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.