Need Help/Suggestions to drive an USB IO device

mrtechman

n3wb
Joined
Feb 10, 2016
Messages
20
Reaction score
0
I have purchased and successfully tested the i/o device developed (suggested) by William Cruz to respond to triggers on a camera. See this link : https://www.youtube.com/watch?v=SMOrbXsTrWA

My hope is that someone can help me with a way to control the board via the BI iOS app remote control page. In sort, rather than relying on a trigger from the camera, I want to be able to manually trigger, and especially toggle, the relay on/off from this page on my phone. The intent is to be able to control some remote circuits at night while not having to trek into the cold weather. In this situation, neither PIR nor simple timers will suffice.

I have no coding experience, so I'm hoping for some very explicit instructions or an out of the box solution. All replies will be greatly appreciated. Thank you.
 

digger11

Getting comfortable
Joined
Mar 26, 2014
Messages
370
Reaction score
376
If you can talk the author of the Relay Control program to add just a little functionality to his program, I think you would be able to set things up to where you could use the PTZ controls for a camera to turn the 3 individual relays on and off.

To see what I'm talking about, look in the BI help and search for PTZ then read the section called "Camera Properties - PTZ"

According to the help file, you ought to be able to set the "External script" to call the "Relay Control" program. If I'm reading it right, once this is set, calling preset 1 for the camera from the IOS app should result in BI running Relay Control and passing it "PRESET,1". With access to the source code for Relay Control, I would think it would be pretty trivial to modify the program so that calling presets 1-3 would turn on the respective relay, and calling presets 4-6 would turn them off.

If the author can't/won't modify Relay Control, it ought to be possible to write a simple program to be the interface between BI and Relay Control, accepting the parameters passed by BI, and then turning around an calling Relay Control with the parameters it expects.
 

digger11

Getting comfortable
Joined
Mar 26, 2014
Messages
370
Reaction score
376
Additional info...
I wrote a little program that generates an Application Log entry that displays the contents of the command line parameter(s), and set it to be called as the external script under the PTZ properties for one of my cameras.
Calling preset 1 caused BI to run my program and send a single parameter, "PRESET,1,CALL". I then fired up my Android app and called preset 5 and got an application log entry showing that the parameter passed to my program was "PRESET,5,CALL".
So it looks totally doable to me.
 

mrtechman

n3wb
Joined
Feb 10, 2016
Messages
20
Reaction score
0
Additional info...
I wrote a little program that generates an Application Log entry that displays the contents of the command line parameter(s), and set it to be called as the external script under the PTZ properties for one of my cameras.
Calling preset 1 caused BI to run my program and send a single parameter, "PRESET,1,CALL". I then fired up my Android app and called preset 5 and got an application log entry showing that the parameter passed to my program was "PRESET,5,CALL".
So it looks totally doable to me.
Thanks for the input. Conceptually I understand what you are saying, Altough coding would be well beyond me. I'll check with the app developer and see why he thinks. Thanks.
 
Top