🔧 Control Your World with Confidence!
The HALJIA USB Smart Control Switch is an intelligent relay module designed for seamless device management. It features a high-performance micro-controller and a CH340 USB control chip, ensuring reliable connectivity and powerful performance. With a robust relay capable of handling 10A at both 250VAC and 30VDC, this module is built to last with a lifespan of up to 100,000 cycles. Safety is prioritized with integrated over-current and relay diode current protection, making it an essential tool for any tech-savvy professional.
Manufacturer | HALJIA |
Part number | 1 |
Item Weight | 20 g |
Package Dimensions | 7 x 2.4 x 2.3 cm; 20 g |
Item model number | 1 |
Batteries included? | No |
Batteries Required? | No |
K**E
Works well, used to control a lamp from PC.
Works a treat, I use it to control a lamp from a PC. Just extend the live or neutral wire from the lamp (or any other 230V low amp device) and splice it into the relay. I then wrote a bit of software to send the On/Off byte sequence to the correct COM port (that you can find via Windows device manager ) and bingo, job is a good one.
A**R
Worked for a month
Edit: it stopped working after a month :(The other reviews here have plenty of information on implementing this (since there are no instructions for the product in the box). But I thought it would be nice to add my implementation here as well.I used the single USB switch to control the fan of my RaspberryPi 3b+, which is not usually necessary but helps when running updates on HomeAssistant.I created a Helper Device of type toggle named Fan Relay and used AppDaemon AddOn on HomeAssistant with the following Python script:import hassapi as hassimport serialclass FanRelay(hass.Hass): def initialize(self): self.listen_state(self.state_change, "input_boolean.fan_relay") def state_change(self, entity, attribute, old, new, kwargs): try: ser = serial.Serial('/dev/ttyUSB0', 9600, timeout=4) ser.write(self.get_code(new)) ser.close() except Exception as e: print(f"Failed to change state: {e}") def get_code(self, state): match state: case "on": return [0xA0, 0x01, 0x01, 0xA2] case _: return [0xA0, 0x01, 0x00, 0xA1]
U**K
No instructions - read this review.
Edit: As reported elsewhere, this product has a short working life - failed after 5 months of use. I bought one of these. It has taken me about one full day to research and devise a method of controlling it from Python3 in Ubuntu 22.04. I'm aiming to use this to reset my fineoffset weather station when the dreaded "may need resetting" message appears. My plan is to check the smtp log for the "may need resetting" message and if it has occurred, run a Python script to interrupt the power to the base station for 10 seconds to reset it.The device is a QinHeng Electronics CH340 serial converterIts attributes are ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523"There is a standard system driver for this device however, it clashes with an accessibility package called brltty which provides braille access to Ubuntu. Remove that with $ sudo apt remove brltty . Once that is removed, the driver clash will be resolved. Secondly, you'll need to have permissions to read and write to /dev/ttyusb0 . This proved hard to get a good answer for but the easy way to do it turns out to be to add yourself to a standard system group called dialout. this is intended for serial device (modem) users and already has the correct permissions. If you add yourself to it, Bobs your uncle, permanent permission!In Python, I had to install the serial tools:$ pip install pyserialOnce you've done that, the Python code is as follows:#BEGINimport timeimport serialimport serial.tools.list_ports as port_list#QinHeng Electronics CH340 serial converter variablesidVendor = '1A86'idProduct = '7523'turnon = [0xA0, 0x01, 0x01, 0xA2]turnoff = [0xA0, 0x01, 0x00, 0xA1]devicePresent = Falseports = list(port_list.comports())#Scan the ports for the relay devicefor p in ports: if str(idVendor + ":" + idProduct) in p.hwid: #print("found it!") port = p.device devicePresent = True#If we found it, interrupt the powerif devicePresent: print('Our device is connected') ser = serial.Serial(port, 9600, timeout=1) ser.write(turnon) time.sleep(10) ser.write(turnoff)else: print("Our device is not connected")print ("Device present: " + str(devicePresent))#ENDI hope that helps someone.
E**N
Nice bit of kit
I need to a be able to switch a light on and off via button on my window pc software and this does the trick nicely.It took me a couple of hours to hunt down the bits and pieces to get it to work so I thought I would share with everyone the simple code you can use to throw the switch. Don't forget you may need to change the com port.class commPortWrite { static void Main( string[] args ) { var relayBytesPowerON = new byte[] { 0xA0, 0x01, 0x01, 0xA2 }; var relayBytesPowerOff = new byte[] { 0xA0, 0x01, 0x00, 0xA1 }; using (SerialPort port = new SerialPort( "COM5" )) { // set the properties port.BaudRate = 9600; port.Parity = Parity.None; port.ReadTimeout = 10; port.StopBits = StopBits.One; // Write a message to the port port.Open(); port.Write( relayBytesPowerON, 0, relayBytesPowerON.Count() ); Console.WriteLine( "Power: On" ); Console.ReadLine(); port.Write( relayBytesPowerOff, 0, relayBytesPowerOff.Count() ); Console.WriteLine( "Power: Off " ); port.Close(); } // Wait to continue. Console.WriteLine( Environment.NewLine ); Console.WriteLine( "Main method complete. Press Enter." ); Console.ReadLine(); } }
P**T
works perfectly
as mentioned there are no instructions - for linux at least you plug it in and:to open relay use; echo -e '\xA0\x01\x01\xA2' > /dev/ttyUSB0and to close it use; echo -e '\xA0\x01\x00\xA1' > /dev/ttyUSB0if you get permission denied errors you need to give yourself the right to access the device - many ways but the easiest is; sudo chmod o+rw /dev/ttyUSB0it maybe that the device isn't on /ttyUSB0 - if not try /dev/ttyUSB1 or /dev/ttyUSB2 etc
O**K
Exactly right for the job
Relay did exactly what I wanted it to do which was to provide a simple way of adding a relay output to a Raspberry Pi in an easily replaceable fashion.
J**K
No instructions!
Delivered with no instructions for use and no delivery note. Using terminal on my ubuntu pc the device is recognised as "QinHeng Electronics HL-340 USB-Serial adapter". After finding reviews elsewhere I've used python and pyusb to successfully send commands to it (A0 01 01 A2 for open and A0 01 00 A1 for close).I'm waiting for delivery of a female to female usb connector to see if I can get it to work with my android tablet.
A**E
prima, is een zeer handige device
Ik gebruik dit om de rode draad van de "Usb3 to sata" converter te onderbreken. Op die manier kan ik, als ik mijn pc overneem met een 'remote control'-programma, een ssd aansluiten of afsluiten van mijn server. Op die manier kan ik snel een backup maken en de ssd terug ontkoppelen en ben ik beter beschermd tegen ongeoorloofd bezoek.Ik stuur deze relais via een Usb2poort met Windows PowerShell:aansluiten (ssd_on.ps1) :[Byte[]] $powerOn = 0xA0, 0x01, 0x01, 0xA2[Byte[]] $powerOff = 0xA0, 0x01, 0x00, 0xA1$ssd = new-Object System.IO.Ports.SerialPort COM3,9600,None,8,one$ssd.Open()$ssd.Write($powerOn, 0, $powerOn.Count)$ssd.Close()afsluiten (ssd_off.ps1):[Byte[]] $powerOn = 0xA0, 0x01, 0x01, 0xA2[Byte[]] $powerOff = 0xA0, 0x01, 0x00, 0xA1$ssd = new-Object System.IO.Ports.SerialPort COM3,9600,None,8,one$ssd.Open()$ssd.Write($powerOff, 0, $powerOff.Count)$ssd.Close()via dos batchfile :rem in powershell als administrator moet voordien uitgevoerd worden : Set-ExecutionPolicy RemoteSignedPowerShell -Command "C:\relaissturing\ssd_on.ps1"Opgepast voor het afsluiten van de ssd moet U deze eerst als Usb3-device uitwerpen : dit kan handmatig, maar kon ook via software (bv: EjectUSB), anders kan U data verliezen..U kan alles, samen met het verrichten van de backup in 1 batch-file laten lopen..Het kan zijn dat windows geen driver heeft voor deze relais en dan moet U de ch340_driver installeren (google naar CH341S64 om deze te vinden)Ik hoop dat U helpt..
C**N
Relè usb
Usato su raspberry pi3, funziona benissimoComando on.sh (permessi 0755)stty -F /dev/ttyUSB0 9600echo -e "\xA0\x01\x00\xA1" >/dev/ttyUSB0Comando off.sh (permessi 0755)stty -F /dev/ttyUSB0 9600echo -e "\xA0\x01\x01\xA2" > /dev/ttyUSB0
J**
Keine automatische Treiberinstallation unter Win10
Keine Doku oder Treiber wird mitgeliefert, muss von chinesischer Seite geladen werden.
C**N
Semplicissimo da usare
Piccolo e utile, lo userò per controllare l'interruttore della caldaia via software! Se - come nel mio caso - lo dovete usare con OpenWrt - il driver da installare è "kmod-usb-serial-ch341". Consigliatissimo!
Y**A
Geht schnell kaputt
Wir kauften schon das dritte Relais.Für unsere Zwecke schalten wir das Relais jeden Abend 2h ein. Das scheint dem Relais nicht gut zu tun :(
Trustpilot
5 days ago
2 weeks ago