Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
[solved] KMK USB 5 Input 8 Output Channels Controller
Re: KMK USB 5 Input 8 Output Channels Controller
Hi.
That solved the problem.
What about making a new Action like restart polling just like the Set digital Output ON and off. That way we could use the: System.DeviceAttached [u'\\\\?\\USB#VID_0403&PID_6001#KMSHF43V#{a5dcbf10-6530-11d2-901f-00c04fb951ed}'] In a macro to get it up and going again. There might be a way to have the plugin do it itself. I am blank. Hope you understand. -Jostein
That solved the problem.
What about making a new Action like restart polling just like the Set digital Output ON and off. That way we could use the: System.DeviceAttached [u'\\\\?\\USB#VID_0403&PID_6001#KMSHF43V#{a5dcbf10-6530-11d2-901f-00c04fb951ed}'] In a macro to get it up and going again. There might be a way to have the plugin do it itself. I am blank. Hope you understand. -Jostein
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: KMK USB 5 Input 8 Output Channels Controller
Thanks heaven!
I understand exactly what you think of, it is a good idea. I have however to think a bit before because it might be a bit more complex to make. I have already tried to let the thread start itself after failure but with no success. Maybe it might be possible to do it with an action instead. I will experiment a while...
Best regards & thanks again
I understand exactly what you think of, it is a good idea. I have however to think a bit before because it might be a bit more complex to make. I have already tried to let the thread start itself after failure but with no success. Maybe it might be possible to do it with an action instead. I will experiment a while...
Best regards & thanks again
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: KMK USB 5 Input 8 Output Channels Controller
Jostein,
Attached is a version I believe/hope will work with the board. I have tried to simulate as much as possible
Changes are
- detects when a board is not responding and then responding again (creates events when this happens)
- added additional information to events and printouts to help identify which board they belongs to (in case you would have multiple boards connected)
I found that the best way to check whether the board is responding or not is to read inputs. There is also no need to stop threads because we communicate with the OCX and not the boards directly
If you start with the board connected it should work fine and fast. If you then disconnect the board you will get an event. Connect the board again and when the board is found, you get a new event for that and then everything should be back in normal operation again
Best regards, Walter
Attached is a version I believe/hope will work with the board. I have tried to simulate as much as possible
Changes are
- detects when a board is not responding and then responding again (creates events when this happens)
- added additional information to events and printouts to help identify which board they belongs to (in case you would have multiple boards connected)
I found that the best way to check whether the board is responding or not is to read inputs. There is also no need to stop threads because we communicate with the OCX and not the boards directly
If you start with the board connected it should work fine and fast. If you then disconnect the board you will get an event. Connect the board again and when the board is found, you get a new event for that and then everything should be back in normal operation again
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: KMK USB 5 Input 8 Output Channels Controller
Will test it tonight.
Re: KMK USB 5 Input 8 Output Channels Controller
Hi.
Just tested. It does not start up again after disconect and reconect.
I was thinking that you forgot to open the port after close but after what i can se from the code it opens at line 293. The way i understand it when it disconects that tread gets run every 10secund instead of the "thread wait time"?
I tried changing bits and pices but unfortuntly i did not get it to work.
Do you have any more ideas on what the problem could be? -Jostein
Just tested. It does not start up again after disconect and reconect.
I was thinking that you forgot to open the port after close but after what i can se from the code it opens at line 293. The way i understand it when it disconects that tread gets run every 10secund instead of the "thread wait time"?
I tried changing bits and pices but unfortuntly i did not get it to work.
Do you have any more ideas on what the problem could be? -Jostein
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: KMK USB 5 Input 8 Output Channels Controller
Hi Jostein,
My ideas are that we need to do some more initiations when we check if the board is back. I guessed that it would be enough to just read the inputs, I thought the OCX would handle the things for us in respect to find the board automatically when it was reconnected
To start with, I believe that our connection with the OCX is preserved even if we disconnect the board (but we cannot be sure)
We will have to work this out step by step
Step 1) It might be enough that we add the closing/opening of the port also in this part of the code like this
Step 2) If this does not help, we will have to set the device as well like this
Best regards, Walter
PS My boards are on the way so in a few days I will also be able to enjoy & test better
My ideas are that we need to do some more initiations when we check if the board is back. I guessed that it would be enough to just read the inputs, I thought the OCX would handle the things for us in respect to find the board automatically when it was reconnected
To start with, I believe that our connection with the OCX is preserved even if we disconnect the board (but we cannot be sure)
We will have to work this out step by step
Step 1) It might be enough that we add the closing/opening of the port also in this part of the code like this
Code: Select all
else:
#The board is not responding
self.toggle = True
self.TriggerEvent(
self.text.txt_boardError+
str(self.b_nbr)
)
AxkmkusbT.port_open_close = 0
stopThreadEvent.wait(10.0)
AxkmkusbT.port_open_close = 1
time.sleep(0.5)
Code: Select all
else:
#The board is not responding
self.toggle = True
self.TriggerEvent(
self.text.txt_boardError+
str(self.b_nbr)
)
AxkmkusbT.device = self.b_nbr
AxkmkusbT.port_open_close = 0
stopThreadEvent.wait(10.0)
AxkmkusbT.port_open_close = 1
time.sleep(0.5)
Best regards, Walter
PS My boards are on the way so in a few days I will also be able to enjoy & test better
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: KMK USB 5 Input 8 Output Channels Controller
Hi krambriw.
Sorry for not testing before but i have bean away for work the last weeks without access to the I/O card.
I tried both of your suggestions. Whithout any luck.
I am lost a bit. The way i understand the plugin now is that you close the port then wait for 10sec opens the port and try reading again. Is this correct?
1st suggestion: 2nd suggestion: Have you recieved the I/O card?
Regards Jostein
Sorry for not testing before but i have bean away for work the last weeks without access to the I/O card.
I tried both of your suggestions. Whithout any luck.
I am lost a bit. The way i understand the plugin now is that you close the port then wait for 10sec opens the port and try reading again. Is this correct?
1st suggestion: 2nd suggestion: Have you recieved the I/O card?
Regards Jostein
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: KMK USB 5 Input 8 Output Channels Controller
Hello Jostein,
I picked them up from the post today (was also travelling last week). As you said, the quality is really good it seems
It's so much easier to debug and test now
Attached the version that works for me (with two boards connected and running)
If I disconnect/reconnect it recovers the communication, the input triggering and the last known output states
Best regards, Walter
I picked them up from the post today (was also travelling last week). As you said, the quality is really good it seems
It's so much easier to debug and test now
Attached the version that works for me (with two boards connected and running)
If I disconnect/reconnect it recovers the communication, the input triggering and the last known output states
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: KMK USB 5 Input 8 Output Channels Controller
Hi krambriw.
Yes it works indead. Thanks.
Have attached the plugin to the first post and changed the subject to solved so that people can se that there is a working plugin without reding the whole post.
Regards Jostein
Yes it works indead. Thanks.
Have attached the plugin to the first post and changed the subject to solved so that people can se that there is a working plugin without reding the whole post.
Regards Jostein
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: [solved] KMK USB 5 Input 8 Output Channels Controller
Hello Jostein,
I have made some re-work...so there is a new version below
- Changed the configuration and handling of input alarms. Now you can configure when you want to have an eg event generated (when input state changes to 0, 1 or both)
- Improved the board disconnect/reconnect procedure
- Made some improvements to handle more then one board
Also made a little test application using the OCX, it helps to find the device and the serial number!
If this version still works ok after a few days test, I will make an official version 1.0
Best regards, Walter
I have made some re-work...so there is a new version below
- Changed the configuration and handling of input alarms. Now you can configure when you want to have an eg event generated (when input state changes to 0, 1 or both)
- Improved the board disconnect/reconnect procedure
- Made some improvements to handle more then one board
Also made a little test application using the OCX, it helps to find the device and the serial number!
If this version still works ok after a few days test, I will make an official version 1.0
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: [solved] KMK USB 5 Input 8 Output Channels Controller
Hi krambriw.
I like the new version where you can chose 1, 0 or both and the fact that you can chose for each switch. The smal testing i have done with it it is very satesfying and i havent found any bugs or mishaps.
Adding the OCX software is probarly a good idea if anybody beside me and you deside to by a card, i had forgoten how mutch i strugled getting that application out of the OSX just to get the serial.
If i remember correctly i read some place that you wrote a plugin for recieving RF signals from modifyed UPM termometers. The reason i ask is that i now have a tellstick and some nexa equpment. I would like to recive the values from a door switch and also a motion detector. I have modifyed a UPM termometer with the mic input to the Pc, but i dont know where to go from her to get it in to eventghost. I tried serching for the plugin but i couldent find it? Could you point me in the right direction? Or am i remembering wrong that you have not writen sutch a plugin?
Best regards Jostein
I like the new version where you can chose 1, 0 or both and the fact that you can chose for each switch. The smal testing i have done with it it is very satesfying and i havent found any bugs or mishaps.
Adding the OCX software is probarly a good idea if anybody beside me and you deside to by a card, i had forgoten how mutch i strugled getting that application out of the OSX just to get the serial.
If i remember correctly i read some place that you wrote a plugin for recieving RF signals from modifyed UPM termometers. The reason i ask is that i now have a tellstick and some nexa equpment. I would like to recive the values from a door switch and also a motion detector. I have modifyed a UPM termometer with the mic input to the Pc, but i dont know where to go from her to get it in to eventghost. I tried serching for the plugin but i couldent find it? Could you point me in the right direction? Or am i remembering wrong that you have not writen sutch a plugin?
Best regards Jostein
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: [solved] KMK USB 5 Input 8 Output Channels Controller
Hi Jostein, great, thanks
Also my tests with two boards connected is still working fine without problems. Then I will make a zip with a version 1.0 and publish it here or in the "Coding Corner" soon
And you are correct, I do have a (still unpublished) plug-in that captures RF signals from a receiver like the modified UPM
As for the Tellstick, I also have a (unpublished as well) modified plug-in that works fine with their new Telldus Center 2.0
If you do not mind, I can continue on this in the "Coding Corner" section where I think it belongs and fits better
Best regards,
Walter
Also my tests with two boards connected is still working fine without problems. Then I will make a zip with a version 1.0 and publish it here or in the "Coding Corner" soon
And you are correct, I do have a (still unpublished) plug-in that captures RF signals from a receiver like the modified UPM
As for the Tellstick, I also have a (unpublished as well) modified plug-in that works fine with their new Telldus Center 2.0
If you do not mind, I can continue on this in the "Coding Corner" section where I think it belongs and fits better
Best regards,
Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: [solved] KMK USB 5 Input 8 Output Channels Controller
Hi krambriw.
Cant wait for you to release yor beta version of the reciever plugin. I will wait for you post in the coding corner.
I am new to tellsick and dont now about previous versions and theire capabileties. but the telldus center i have is 2.0.1 and that is working with the plugin for tellstick that came with eventghost.
looking forward to geting the plugin, thanks.
Best regars Jostein
Cant wait for you to release yor beta version of the reciever plugin. I will wait for you post in the coding corner.
I am new to tellsick and dont now about previous versions and theire capabileties. but the telldus center i have is 2.0.1 and that is working with the plugin for tellstick that came with eventghost.
looking forward to geting the plugin, thanks.
Best regars Jostein