genielabs / HomeGenie

HomeGenie, the programmable automation intelligence
https://homegenie.it
GNU General Public License v3.0
387 stars 154 forks source link

CM19 interface driver creates constant error messages in Windows log #426

Closed HalRum closed 1 year ago

HalRum commented 3 years ago

Version HG V1.3-14 and v1.3-19

Describe the bug If I install, then enable X10 Interface for the CM19, the log immediately starts showing these errors. If I disable, the messages stop. I have been able to control an X10 light with HG, even though these messages continue to repeat. I am using a CM19A and apparently this only is happening on Windows 10 platform and not a Raspberry Pi with a CM19E.

Code to Reproduce Write a small snippet to isolate your bug and could be possible to our team test. (REQUIRED)

Expected behavior These messages should not be occurring and filling the log with superfluous messages.

Screenshots/Stacktrace LibUsbDotNet.Main.UsbException: Repeated calls to wait with a submit is not allowed. at LibUsbDotNet.Internal.OverlappedTransferContext.Wait(Int32& transferredCount, Boolean cancel) at CM19Lib.Driver.CM19.ReadData() LibUsbDotNet.Main.UsbException: Repeated calls to wait with a submit is not allowed. at LibUsbDotNet.Internal.OverlappedTransferContext.Wait(Int32& transferredCount, Boolean cancel) at CM19Lib.Driver.CM19.ReadData()

Additional context I talked with Peter Atkinson on HomeGenie Club site and he confirmed no messages on a PI server. I tried clearing off any possibly conflicting drivers and only used the HomeGenie supplied drivers, but log still shows messages. Perhaps this is an issue with differences between the CM19A versus CM19E, or a difference between the CM19 and the CM15 which this driver was evidently built upon?

Additional information provided by Peter: I just noted you are using a CM19a, the US version and depending on age of your CM19a there was I believe a number of version changes in this model. Determining the Vendor ID number may be helpful.

Clearly from the error message your X10 command is being executed yet the CM19 is still waiting for a response. You might want to read this and include it in your GitHub issue as a solution to your problem for inclusion in any further release https://stackoverflow.com/questions/20841117/libusbdotnet-error-on-exiting-wpf-application-safe-handle-has-been-closed