USB Trigger
Posted: 19 Dec 2013 17:57
Would it be possible to add a USB trigger? I would like to be able trigger actions when I connect to my PC or connect a USB device.
To connect to a USB device, an OTG (on the go) cable is required. Is it possible to detect when this is plugged in?
Edit: Martin, Sorry I did not see your post stating that there is no way of directly detecting a USB connection. However, I am more interested in detecting when the OTG cable is plugged in. I believe this works in a similar way to how docking is detected. When the device is docked it detects a resistance between pins 4 and 5 on the USB connector. With the OTG cable, pins 4 and 5 are shorted together. I am hoping there is a way to detect this so that I can trigger a number of actions when my USB DAC is plugged in. Thank you.
Edit: Hi again, I've been looking at other automation apps and have found that it is possible to detect certain USB devices, but there are limitations. I still think this would be a good addition to the list of triggers, even if it wasn't guaranteed to work.
I have also experimented with my own OTG cable, and have found that when it is inserted, it briefly notifies you of a USB connection even with nothing connected to it. I am hopeful that this means it is possible to detect the OTG cable and create a trigger for it.
To connect to a USB device, an OTG (on the go) cable is required. Is it possible to detect when this is plugged in?
Edit: Martin, Sorry I did not see your post stating that there is no way of directly detecting a USB connection. However, I am more interested in detecting when the OTG cable is plugged in. I believe this works in a similar way to how docking is detected. When the device is docked it detects a resistance between pins 4 and 5 on the USB connector. With the OTG cable, pins 4 and 5 are shorted together. I am hoping there is a way to detect this so that I can trigger a number of actions when my USB DAC is plugged in. Thank you.
Edit: Hi again, I've been looking at other automation apps and have found that it is possible to detect certain USB devices, but there are limitations. I still think this would be a good addition to the list of triggers, even if it wasn't guaranteed to work.
I have also experimented with my own OTG cable, and have found that when it is inserted, it briefly notifies you of a USB connection even with nothing connected to it. I am hopeful that this means it is possible to detect the OTG cable and create a trigger for it.