http://qs1969.pair.com?node_id=11124682


in reply to Controlling USB on Raspberry Pi

"I've not used a Raspberry Pi before - any advice or suggestions?"

My advice is to use a micro controller instead. A Wemos D1, ESP8266 NodeMCU etc. Since this project is very specific, there's no need to have a full blown computer OS running on the device.

I spent numerous years writing software for the Raspberry Pi (RPi::WiringPi), and several years developing automation devices using Arduino and other such micro controllers. For projects that require back-end processing, the Pi is definitely the way to go, but for things such as the task you want to perform, a Pi is overkill, and there are a lot more software aspects that can break and fail.

With all that said, controlling a relay using my software is very simplistic. Have a look at the comprehensive documentation, and feel free to ask any questions that you might have. The FAQ/Tutorial page is a good place to start.

My entire vast indoor grow rooms used to be controlled using a Pi and my software, until it got too complex and I converted it over to using the Wemos D1 minis I mentioned above. They cost me $10 for five of them, and they have wifi and bluetooth built in.