Hi
My System
TP-LINK TL-MR3020 FW 1.4
SW- 2.6 build 7252
USB hub 4 ports
Vp2 usb
I Have this KMtronic USB Relay Controller-One Channel-BOX (SS_USB1REL_BOX)connecter to the hub.
I want to call usb relay due to alarm event.
I create an event alarm and use the URL"http://templates.meteobridge.com/usbswitch.sh"
In "Parameter:" put the number 1
I fire alarm and clear it several times testing all free ports of the usb hub
In "Serial USB Switch" I try all 4 ports.
I have try to use the relay but without success.
in RPI I call "'\xff\x01\x01' > /dev/ttyUSB0" and it works.
What I'm doing wrong ?
KMtronic usb relay help **solved**
Moderator: Mattk
Re: KMtronic usb relay help
Could you please give me remote access as described here:
viewtopic.php?f=57&t=9885
Please send URL and password to "info(at)meteobridge.com".
viewtopic.php?f=57&t=9885
Please send URL and password to "info(at)meteobridge.com".
Re: KMtronic usb relay help
Beside a bug in the usbswitch script it turned out that testing a USB relay can be a bit cumbersome.
Therefore, you might find this definition helpful, which toggles the relay each minute.
This is how it works:
Yes, you can also omit the comparison and say {* [m] % 2 *} but I wanted to show the comparison as it might be helpful on other occasions.
Therefore, you might find this definition helpful, which toggles the relay each minute.
This is how it works:
- * the script is executed every minute
* script parameter is the result of a numerical computation, which is indicated by {* and *} brackets
* [m] reports the current minute, % 2 takes the minute modulus 2 which means that every even minute the result is 0, on odd minutes the result is 1
* the comparison = 0 returns 1 when true or 0 when false
* usbswitch script is called with parameters 0 and 1 changing each minute
Yes, you can also omit the comparison and say {* [m] % 2 *} but I wanted to show the comparison as it might be helpful on other occasions.