Menu

#1 Owl server not finding USB device

open
nobody
5
2010-12-08
2010-12-08
Anonymous
No

OS Windows XP
Model OWL +USB (CM160)
I have intsalled Microsoft.NET (up to version 4) and Java was already installed and up to date. The OWL power monitoring software is working and recognises the USB device. However, when I run the the OWL server it does not find the device. Please can you give me some advice on how to get ElectricOwl to recognise the USB device.
Thanks
Mike

Discussion

1 2 > >> (Page 1 of 2)
  • Paul Austen

    Paul Austen - 2010-12-08

    Hi Mike,

    Sorry to hear you'r having trouble with the OWL server. Java is only used by the Electric OWL (client) and therefore should not be related to the problem that you are seeing). The OWLServer runs in the dornet environment and should work fine on Windows XP (which is what I use).

    I've built a debug version of the OWLServer to try and investigate the problem that you are seeing. If you unzip the attatched zip file, and run it from the windows command prompt after rebooting your machine and then plugging in the USB connect device.
    If you could post the output text, we'll see if it sheds any light on your problem.

    Thanks

    Paul

     
  • Nobody/Anonymous

    Thanks for writing the OWLserver_debug program. I have unzipped the file, rebooted and started the program from the Windows command prompt. However, I get an error message that says OWLserver has encountered a problem and needs to close.

     
  • Paul Austen

    Paul Austen - 2010-12-11

    Could you send me the all the text that is shown in the cmd prompt window when you run the debug version please. I'm not sure it's going to tell me what the problem is, but without it I can't see what the problem could be.

    Thanks

    Paul

     
  • Nobody/Anonymous

    Hi Paul
    I could net read the text because the command box closes too quickly. However, I opened the command box first with the cmd command and then I ran the owlserver_debug program and found that the box stayed open so that I could copy the text below:

    Unhandled Exception: System.IO.FileNotFoundException: Could not find file ‘C:\owl_server_log.txt’
    File name: ‘C:\owl_server_log.txt’
    at System.IO__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
    at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
    at Stream.IO.StreaReader..ctor(String path)
    at ConsoleApplication1.Server.isCommaSeparatedLog()
    at ConsoleApplication1.Server.ensureLogFormat()
    at ConsoleApplication1.Server..ctor(String[] args)
    at ConsoleApplication1.Program.Main(String[] args)

     
  • Paul Austen

    Paul Austen - 2010-12-14

    Hi Mike,

    Thanks for the debug info.

    I think that this has allowed me to find the bug. I belive I have fixed the bug and I've uploaded a new OWLserver.zip file. Could you download this file, unzip it, and check to see if it fixes your problem. If it does I'll spin a new ElectricOWL release with this included.

    Paul

     
  • Nobody/Anonymous

    Hi Paul
    I ran the new owlserver.exe file and connected the OWL monitor whilst the INFO: . output was being produced, but the device was not detected and there does not appear to be a debug log saved on the C:\ drive or in the folder from which owlserver.exe was run. The output below was obtained from the command window. I also tried running the new owlserver.exe with the OWL monitor connected and got the same result.

    INFO: Checking for USB Connect device (1.01985)
    INFO: Initialise device sucessful
    INFO: .
    INFO: .
    etc

    ERROR: Failed to find the Electric Owl (USB connect device)

     
  • Paul Austen

    Paul Austen - 2010-12-18

    Hi Mike,

    I'm unsure what the problem may be. I have tried using a USB connect device on Windows XP without problems. The fact that you get the 'Initialise device sucessfull' message, means that the OWLServer software has detected the presence of the USB connect device. The next stage for the OWLServer software is to check to see if the device is available (I.E not used by any other software) and it appears that this step is failing.
    I wonder if the software that comes with the USB connect device is holding onto it even when it's not running. If you still have this software installed on your PC you could try uninstalling and rebooting your PC before trying the OWLServer again ?

    Paul

     
  • Nobody/Anonymous

    Hi Paul
    I uninstalled the software that came with the OWL monitor, rebooted and then ran the new owlserver again. I still get the same output with "Initialise device sucessful" regardless of whether or not the USB Owl monitor is connected or not, so I don't think that the Owl server can be detecting the presence of the Owl monitor connected to the USB.

     
  • Paul Austen

    Paul Austen - 2010-12-22

    Hi Mike,

    Thanks for sticking with this problem. I think you are correct, it does not look like the USB connect device is being detected on your machine. The OWLServer uses a DLL supplied by the company that makes the USB connect device (OWL) and I think there may be an issues with this.

    When I was first writing the software I found that I needed to add a delay between device initialisation and checking if the device is ready. I found that on my system a delay of 0.1 seconds was reliable. I wonder if on your system it takes longer for the USB connect device to become available (not sure why this may be) and so the delay built into the OWLServer.exe file is not long enough.

    I have uploaded yet another version of the OWLServer, this has the above delay changed to 1 second. Could try this to see if this works for you.
    If it fails initially then could you enter OWLServer -w 5 (at the command prompt in the directory where you have the OWLServer.exe file) to start the OWLServer. This will change above delay from 1 to 5 seconds, in case your system needs more than 1 second delay.

    Regards

    Paul

     
  • Nobody/Anonymous

    Hi Paul
    Seems to be a problem with the zipped file.

    Mike

     
  • Paul Austen

    Paul Austen - 2010-12-29

    Could you be more specific. I've download the OWLServer_1_01986.zip file and it appears to work as expected.

    Could you copy the text from your command window when you've attempted to run the OWLServer and send it ?

    Thanks

    Paul

     
  • Nobody/Anonymous

    When trying to unzip the file I get an error message saying "no files to extract"

    Mike

     
  • Paul Austen

    Paul Austen - 2010-12-29

    OWLServer (variable device init delay, 2'nd upload)

     
  • Paul Austen

    Paul Austen - 2010-12-29

    Not sure what the problem is as I appear to be able to download the zip file ok. However I've uploaded the file again (72248 bytes long) so please give it another try.

    Paul

     
  • Nobody/Anonymous

    The new file unzipped ok. I have run the owlserver with both 1 and 5 second delays, with and without the original OWL software installed and with and without the OWL monitor connected but always get the same output. The following was obtainined with the 5 second delay:
    INFO: Checking for USB Connect device (1.01986)
    INFO: Waiting 5 seconds before checking if the OWL USB Connect device is available.
    INFO: Initialise device successfull
    INFO: .
    INFO: .
    INFO: .
    INFO: .
    INFO: .
    INFO: .
    INFO: .
    INFO: .
    INFO: .
    INFO: .
    INFO: .
    INFO: .
    INFO: .
    INFO: .
    INFO: .
    INFO: .
    INFO: .
    INFO: .
    INFO: .
    INFO: .
    ERROR: Failed to find the Electric OWL (USB connect device)

     
  • Paul Austen

    Paul Austen - 2010-12-31

    I have uploaded a new version (v1.9) to sourceforge but I wouldn't expect this to fix the problem that you have on your machine.

    In order to interface to the USB connect device, OWL supplied me with a DLL file. It appears that the problem is inside the DLL (I don't have the source code for this) is where the problem is on your machine. However many ther users are using Electric OWL on Windows XP without problems, although this is not much help to you.
    All I can suggest is that I contact OWL to see if there have been any updates to the DLL file to fix this type of problem, it may take a little while to get a response from OWL on this.

     
  • Bundy Bear

    Bundy Bear - 2011-03-27

    Paul
    I'm having the same problem conecting,
    Did you manage to resolve this? I looked but couldn't find the debug version.

    I'm running
    win XPpro
    MS net 3.5 SP1
    OWL+USB (CM-160)

    have tried with the original software backent("theowl_be.exe") started and stoped but no go.
    In the meantime I wrote a vb5 app that gets the data via the comport (needs the orig S/W backend shutdown) this seems to conect (might shed some light for you)
    https://sourceforge.net/projects/hawkowl/

    Cheers
    Leith

     
  • Bundy Bear

    Bundy Bear - 2011-03-27

    Paul
    I'm also having problems conecting.. did you fix this ??
    I'm Runing
    OWL+USB(CM-160)
    ms NET 3.5 SP1
    XP Pro
    V1.92 & OWLServer_1_01986

    Tried with the original Software's Backend ("theowl_be.exe") running and shutdown, neither conect but both give the same error.

    as a stopgap solution I wrote HawkOWL to get the data out to a CSV file
    https://sourceforge.net/projects/hawkowl/
    This needs the backend shutdown to directly access the COM port, but does work

    the log file in c:\ is empty, so not much help
    I looked but couldn't find the debug ver, I could give it a try if it will help

    Cheers
    Leith

     
  • Bundy Bear

    Bundy Bear - 2011-03-27

    Paul
    I'm also having problems conecting.. did you fix this ??
    I'm Runing
    OWL+USB(CM-160)
    ms NET 3.5 SP1
    XP Pro
    V1.92 & OWLServer_1_01986

    Tried with the original Software's Backend ("theowl_be.exe") running and shutdown, neither conect but both give the same error.

    as a stopgap solution I wrote HawkOWL to get the data out to a CSV file
    https://sourceforge.net/projects/hawkowl/
    This needs the backend shutdown to directly access the COM port, but does work

    the log file in c:\ is empty, so not much help
    I looked but couldn't find the debug ver, I could give it a try if it will help

    Cheers
    Leith

     
  • Paul Austen

    Paul Austen - 2011-03-29

    Hi bundyzbitz,

    I didn't realise OWL had released a new unit that direclty connects to the PC (no need for the USB connect device) but it looks like a much better solution and similar other energy monitors available. Currently electric owl only supports the USB connect device.
    From what you say it sounds like it comes up as a serial port on the PC. It shouldn't be difficult to integrate this with electirc owl. Could you send me the serial port settings (baud rate (Bps), start/stop/parity bits) and a sample of the text sent to the PC from the CM-160 unit, then I'll have a look. As I don't have a CM-160 unit would you be willing to try out any changes I make ?

    Paul

     
  • Bundy Bear

    Bundy Bear - 2011-03-29

    Paul
    Firstly, sorry bout the multi post (had a brain fart)
    Yea, the 160 connects through a virtual Com port, the settings I'm useing are:
    baud rate is 250,000 bps, this is the critical one, used the standard win API

    no parity
    8 data bytes
    1 stop bit , these seem to be less critical

    DTR = enabled
    RTS = disabled

    I've worked out the data structure and some of the control commands, to retreive usage data. See the bottom of the page here => http://hawkowl.sourceforge.net/ (VB5 source available)
    The factory software seems to be able to get the rate/GHG/Voltage/etc settings from the unit, I need to sus this out

    I'd be more than happy to run whatever ya need this end, cause lets face it, (A) it's easier than me reinventing the wheel and (B) I thing the OWL is a great piece of hardware, backed up by lousy software (can't be that great if a weekend hack like me thinks he can do betta, might take a bit though!!)

    as far as output your server gives
    INFO: Checking for USB Connect device (1.01986)
    INFO: Waiting 5 seconds before checking if the OWL USB Connect device is
    available.
    INFO: Initialise device successfull
    INFO: .
    ................
    INFO: .
    ERROR: Failed to find the Electric OWL (USB connect device)

    Tomorow night I'll do some Com port captures (TX's and RX's in hex) so you can compare the command systems. I'll post them on the HawkOWL page and send ya a link (they might be a few kbytes)

    cheers bundy

     
  • Bundy Bear

    Bundy Bear - 2011-03-30

    Paul
    these are the links to the port captures, & some descriptions .

    Simple update - the original owl software had been run in the past & is just updating the database file (See file for additional notes)
    http://hawkowl.sourceforge.net/database%20update.htm

    Imitaton First Run - stoped backend, Deleted database, restart backend (See file for additional notes) , somewhere in here should be the retreival of the rate costs, GHG, LineVoltage, etc (all the settings in the 160 are downloaded to the SQLite dB)
    http://hawkowl.sourceforge.net/First%20Coms.htm

    also threw up an early copy of my be.db file, so you can see just what settings are retrieved
    http://hawkowl.sourceforge.net/be.db

    cheers
    bundy

     
  • Paul Austen

    Paul Austen - 2011-04-04

    Hi bundy,

    Thanks for that, I'll take a look at your take on the protocol and let you know how I get on.

    Paul

     
  • Bundy Bear

    Bundy Bear - 2011-04-04

    Paul
    Pretty simple stuff, as I'm sure you'l see.
    basicaly, open the com port at 250k baud, wait for the identifier to be TX'd (relates to the model I'm thinkn), send 5A , then receive the stored data, after you receive the wait command, sent 5A. from then it's always 5A to get the next chunk(s). A bit of a dumb terminal in a way. Says what it is then spits the data out.
    Two things I've noticed
    One (useing VB5, bit ssllooww), I need to send 5A every few seconds (I'm useing 4 sec atm, but I havn't explored the limits YET) otherwise the conection seems to drop out somewhat so that after I send 5A the datastream starts from the first stored datetime.
    Two If the unit is left pluged-in to the USB you only get data from the last updated/received datatime. However if you unplug then plug-n the display, you get data from the first stored datetime(in the display)
    hope that all makes sense !

    cheers
    Leith

     
  • Paul Austen

    Paul Austen - 2011-05-14

    Hi Bundy Bear,
    I have finally got around to loking nto this (work has been a bit busy of late) and found that the OWL+USB device does indeed come up as a serial device in windows, as you describe.
    However it appears it is the type of USB device (can't remember the name of this type of USB device) that requires the firmware to be loaded as it's plugged in. This requires that theowl_be.exe (installed with the software supplied with the OWL+USB device) software is running on the windows PC. If I kill this process I can get access to the serial port as you describe.
    However as the theowl_be.exe appears to load the firmware to the OWL+USB device and then claims the serial port it cannot be used by other software (E.G ElectricOWL) without manually stopping theowl_be.exe after it has loaded the firmware.
    Therefore this is not a practical solution for ElectricOWL as the user would have to plug in the OWL+USB device (with theowl_be.exe running), then kill the theowl_be.exe process and then start the ElectricOWL software.
    I have been in touch with OWL on this and initially they said the software API that I used previously should work, however it clearly doesn't, I contacted them again and have heard nothing yet.
    Unfortunately I can see no way around this at the moment, if you have any suggestions I'd be interested to hear them. I'll let you know if I get a response from OWL that will allow me to implement an interface to the OWL+USB device.

    Paul

     
1 2 > >> (Page 1 of 2)
MongoDB Logo MongoDB