Page 1 of 1

access AD2USB via Python on Windows

PostPosted: Sun Jan 13, 2019 10:31 am
by kapios
I have a working AD2USB connected to my Vista 20P, successfully monitored using the Windows keypad app.
I would like to use Python so that I can also trigger different actions based on zone faults BUT I am not able to access the AD2USB. When I run the "usb_detection.py" script from GITHUB I get an exception: "No AD2USB devices present".
I have restarted the program, the PC etc but I can not get anywhere.

Please, any help would be appreciated. Thank you!

Re: access AD2USB via Python on Windows

PostPosted: Sun Jan 13, 2019 11:56 am
by mathewss
Are you by chance using the keypad app at the same time? The device can only be opened by one app at a time. If you want more code to be able to connect at the same time then run the ser2sock code inside of the GUI app or on a Raspberry pi.

That being said I have not tested this on Windows but I put it on my list today to tinker with.

Best
SM

Re: access AD2USB via Python on Windows

PostPosted: Sun Jan 13, 2019 12:56 pm
by kapios
I do have the keypad app closed when I try to run the python script. Also, I would assume that the error code would be different if there was a port conflict. For some reason it does not see the device at all.

Unfortunately I don't have a Raspberry pi to try accessing the AD2USB - it does look like the webapp may be able to do the things that I need but I figured I can get Python on Windows to accomplish the same.

Please let me know if there is anything that I may be overlooking after you have had a chance to try it on Windows.

Thanks.

Re: access AD2USB via Python on Windows

PostPosted: Tue Feb 12, 2019 5:16 am
by kapios
I have not been able to make any headway on this. If anyone has been successful using python on windows to get zone tracking, I would appreciate any pointers.

Away from python, is there any other way to programatically monitor zones or trigger actions based on zone changes using the ad2usb? I prefer staying in a windows environment.