Это видео недоступно.
Сожалеем об этом.
Control AC bulb with USB Relay module using windows PowerShell Command line
- Добавить в
- Мой плейлист
- Посмотреть позже
- Поделиться
Поделиться
HTML-код
Размер видео:
- Опубликовано: 4 сен 2024
Комментарии • 160
Следующие
Автовоспроизведение
Virtual Pinball: How to install a sainsmart usb 8 channel relay board for mechanical toysWay of the Wrench
Просмотров 9 тыс.
Control relay and AC bulb from Windows Shell Command line via USB and ArduinoRobojax
Просмотров 6 тыс.
Управляем USB реле через роутерHomePC
Просмотров 1,6 тыс.
AI is here. What now?Eddy Burback
Просмотров 1,9 млн
Dream House Upgrades FINALLY.STRAD
Просмотров 415 тыс.
Power Book II: Ghost | 'Devil’s Playground’ Ep. 6 Preview | Season 4STARZ
Просмотров 128 тыс.
Pat McAfee Responds To Viral Video Dancing Next To Straight Faced Nick Saban on College GameDayThe Pat McAfee Show
Просмотров 450 тыс.
FTDI FT232RL USB to Serial Module (AZ-Delivery) Detailed ReviewRobert's Smorgasbord
Просмотров 33 тыс.
Review Remote Control 4 Channel input 220VEdo Galung
Просмотров 39 тыс.
#18 Add a Relay Module to your Arduino project - Hints, Tips & TrapsRalph S Bacon
Просмотров 113 тыс.
How to control USB 8 relay board through windows operating systemResearchDesignLab
Просмотров 60 тыс.
Connecting a Relay Module to a MicrocontrollerBrad Henson
Просмотров 231 тыс.
Total control: Turn ON and OFF remotely ESP8266 WIFI RELAY MODULE @bellonetsBELLONETS
Просмотров 2 тыс.
Very interesting Recover 24K Gold From Electronics Scrapcreative workz
Просмотров 5 млн
Prolific USB Windows 8.1 and Windows 10 driver issue resolved - RobojaxRobojax
Просмотров 209 тыс.
Master Your PC: Take Control of a USB Relay in WindowsKepa Alonso
Просмотров 8 тыс.
ЭТИ ИГРОВЫЕ ПЛОЩАДКИ УЖАСНЫ! #Shorts #ГлентГЛЕНТ
Просмотров 2,1 млн
Я ЗАМУЖЕМ ЖЕ 😃 #женскийфорум #парфенюк #матвиенко #юмор #смех #mediumqualityeasycom
Просмотров 535 тыс.
ЛЕДЯНОЙ ГОРОХ! САБЗИРО НЕРВНО СТОИТ В СТОРОНКЕ... / PVZ 2IGRARIUM - Игровые обзоры
Просмотров 392 тыс.
💦Экстренный слив воды😱#натяжныепотолки #ремонтквартир #сливоды #потопПотолки Випсилинг (VISP)
Просмотров 263 тыс.
НУБ ЗАТРОЛЛИЛ ГРИФЕРА ТОЛПОЙ ЗОМБИ В МАЙНКРАФТ ! НУБИК В ГОРОДЕ И ТРОЛЛИНГ ЛОВУШКА В MINECRAFTDakPlay
Просмотров 204 тыс.
Дом «Солнечного» Сергея ожил🤩Коллектив Фортуна
Просмотров 31 тыс.
Аруси Точики ❤️❤️❤️Qurbon Negmatov
Просмотров 112 тыс.
😱ЖИВОЙ Чехол на Айфон🤪Demin's Lounge
Просмотров 252 тыс.
You should make sure that you only switch the HOT conductor. The HOT conductor is the tiny blade at the plug side conductor. If you switch the neutral, yes it will work, but when the light is OFF it will be HOT and may cause electrocution. There are some electricians that do not understand the concept of HOT and NEUTRAL, but I can tell you for sure it matters.
Your assumption is valid when working with OLD tagston bulbs. New LED lights will now allow the the other wire when OFF to be LIVE (or hot).
@@robojax When dealing with 120vac as in your footage. One side is HOT. If you switch the neutral, the light will still be hot regardless if you have an LED, halogen, fan toaster or any other device. So HOT as in "holy crap I got bit by electrical shock" not HOT as in "oh crap that light is too hot to touch"
You need to make sure you have 'cut' the positive AC wire and not the neutral return wire - otherwise when it's wired up the relay assembly is 'always' live & you could get a nasty shock from it - maybe even die. Maybe place the whole thing inside a large tube of heatsink to avoid that.
Hi, I'd like to know how to make this work with Linux Distributions. As a first step I should confirm which Serial PORT is the one that is assigned to the USB Card, isn't iit.
If it's as I said then I just have to send those hexadecimal data to the port to open or close, isn't it?
Thanks for your help
Greets from Chile, South America (Currently in Spring, October 2023)
Hello 👋.
I want to make it work on Linux too.
I think I understand the video. It seems what I want, a way to (in effect, with a bit of added relay circuitry) ring a doorbell by having the computer send a momentary closure through the USB port. But I want Windows (Outlook, actually) to run it, automatically, with no manual intervention. Can the commands be sent by a Windows program, or can the command line be run automatically by Windows 10?
Yes. Find running system commands from VBA in outlook.
The unit still seems available on Amazon as of Nov 2023, also in 2-, 4-, and 8-channel versions.
please share the links.
I tried this video I even bought the relay and im sure I typed everything correct but I am not getting the relay light to turn on
if we assume you did everything correctly, then the code (register address) you need is different. contact the seller or store and get the code which is address for register in device.
is there a unique identifier like InstanceId or DeviceId for the board that can be used to retrieve the COM port in code? like a powershell command to use the same board identifier to query what COM port it is connected to, through code? then you wouldnt have to re-program the COM port number if the computer turns off etc
you try to read the com port and print all specs. See and compare it with other devices and find what is unique about it. I am sure there is specs that makes this unique so yo can identify it. On Microsoft website search for COM port properties.
@@robojax ok thank you
I had to change the ExecutionPolicy with this command as well:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
I have problem with not digitally signed. This work for me. Thanks.
You shouldn't "tin" (add solder) to wires that go to screw terminals. Solder is soft and gradually squashes leaving the connexion a bit loose.
may be you are right but every device that I look shows to have added solder on the path where higher current passes through. But I understand your concern and you may be right.
my usb relay is being detected as human interface device , it's port is not showing in communication port even after installing the drivers.I Can only switch off or on the light by the software provided by company so how can i make it work from powershell script if it is not showing in Comm ports ?
I ordered the usb single channel relay from Robu.in
i also would like to know this
I'm in the same case.. if you did find a solution please let me know. Google doesn't help.
where did you find the driver ?
Hi I have Tried your code with the same relay. But the bulb wont light relay test Bulb wont light up.
(the 2nd red bulb). I used the code A0 01 01 A2 in SSCOM3.2. Can you help me please?
Everyday new tutorial. It's amazing. thanks
You are welcome.
This was very helpful for a project i am working on, so thank you very much! The only issue i have encountered is that the relay sometimes ignores on or off commands and only responds after repeated attempts. I’m thinking this is a hardware issue, but then it happened on two brand new switches. I’m frankly at a loss
I've had two of these relays go flaky like you describe, and then in a couple of weeks ignore all on or off commands no matter how often you repeat them. I gave up on those boards and am now trying the USB HID type boards that have a USB B connector on the board.
@@hockeyguy820 how's it going with the HID trial?
@@mishatagavor : Solid so far. I recommend HID based boards.
@@hockeyguy820 got a link to the ones you buy? so hard to sift through the cheap chinese stuff
@@mishatagavor : Look for ones with a USB B port. On eBay I bought "SODIAL (R) 5V USB Relay Module 1 Channel Programmable Computer Controller for O3".
Excellent demo...very helpful!
Glad it was helpful!
@@robojax
Very helpful. This opens a new world of opportunities for me.
I have the simillar product, but with 2 channels. Do you know the code to switch each channel on and off? Or can you show us how you got the hexadecimal value to switch the relay in this video on and off?
I got the values from the seller store page. search AliExpress or eBay or Banggood , you may find the details.
I am bad with tech. Can this relay control any types of switches? For example, I have a box that has a tactile switch. I would like to solder 2 leads from the switch to this Relay, so that I could control that switch from my computer. Is this possible?
Relay is just a switch and yes it will work . But you have to understand what a switch is.
Thank You for this informative tutorial. It was just what I was looking for! Thanks!
You are welcome.
Hi, thx for very usefull tutorial.
I'm wondering about on and off commands strings. Where are they defined to be A0 01 00 A1 and A0 01 01 A2. Is it somehow standard commands for relays and product specific?
I saw another tutorial for a similar product, where the commands were on= AFFF0101DF and off=AFFF0202DF. Are these commands maybe defined by the USB chip?
You are welcome. The command has been set in hardware by the manufacturer.
When I connect the USB relay to my computer it recognizes it as HID and not COM. How do I solve it?
find out what chip it has and install the driver. contact the seller.
@@robojax ¿Do you have the driver? I have the same as you
same issue. no COM. What was the issue?
Hi, where can I find a USB driver for this unit that is compatible with Windows Server 2008?
I just want to turn on and off monitor whenever depending my pc is turn on/off. PC is schedule to turn on and off based on time of the day. no need to press or control anything. how it be done?
that is very easy. search for task scheduling using powershell and you will get the command
I am wanting something much simpler. Can it be made to close the relay with power to the usb port and open the relay with no power to the usb port? Thanks!
Here is video showing how to use relay module ruclips.net/video/58XWVDnB7Ss/видео.html and it just needs 5V at input. so you can use it without Arduino. So you can turn the relay from USB. See this page to learn how to get voltage from USB www.electroschematics.com/usb-how-things-work/
Fallowed line for line, under Windows 10 Enterprise. FAILS the program downloaded CAN control the relay (all 4 of them) since mine is a USB to 4 Port Relay which A0 = 1 A1= 2 and so on. But the script and setup in powershell does absolutely nothing
if I want to Control the USB Relay in matlab is it feasible?
Hi, will this work with a batch file (.BAT) rather than a .PS1 file
if you know how to write the code, sure it will.
Hello, great video. You mention you would include a driver but I cannot find it? My 4 port relay usb appears as a HID and not com port so I cannot interact with it. Can you help at all?
Hello, I just added the link to the CH341 USB driver.
@@robojax thanks for adding the link. Sadly it still doesn’t create a usb serial port. Still sees it as a HID device.
Then it is has different chip like prolific or cp2104
Autocorrect has changed the chip to children 👶😂
@@robojax haha its ok, still no further forward :( nothing seems to work
Do you know where I can find a list of commands for the Ch340? I specifically want a toggle command, or a way to read the state of the relay.
You haven't subscribed to my channel. I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe.😊
@@robojax I did subscribe five days ago. Do you know more commands for this this device or are you trolling?
How operate in python by face recognition software if match to database then relay on and time delay off automatically for dc motors
Wow this is very interesting. Face recognition, Database, Motor Control. Raspberry Pi would be the best starting point.
Is their a way to send HEX command via windows Command line to wifi Relay with out USB
You may look at this video ruclips.net/video/1zXlV7vmMMg/видео.html and perhaps instead of touching/clicking on the browser, use command line.
How is this relay at switching microphone signals - two in, one output?
I did not understand two in one out. to durn ON/OFF you just need to find the power wire or main wire. Cut it and you will have two tips, connect those tips to the relay. Make sure to find a wire if you disconnect it, it should disable the microphone.
@@robojax Thanks for the reply!
Some relays have two contacts that the third is switched between. SPDT.
I found out that the relay good for switching higher current loads are not good for switching low power signals like mic inputs. I want to switch between two mics coming in to one output to the sound board using VBA code.
Great video. Good demonstration.
Is it possible turn on the rely in a timer ?, like turn it on after 5 minutes.
Possible. Do an online search for "powerShell time difference" or something like that.
Where did you purchase that USB Relay?
You can get it from Amazon, eBay or AliExpress just search for "usb relay" and you will find it.
very helpful tutorial, thank you
You are welcome.
Sir,
i'm beginner
i want to sent AT command to GSM module which are connected with my PC by USB port by USB to serial converter, it is easy but i want to sent Command by ESP32 via PC.
Can you give provide some code or solution?
Is it possible that ESP32 send Command to PC & PC will fwd that command to GSM module?
I have not worked this with wifi. I am not sure.
@@robojax Thanks sir for your reply
Hello, thank you for this tutorial. I have the same USB Relay and works like your video. I have a question. The default status when you connecte the USB Reley to USB, is "closed". When you put the command 0xA0,0x01,0x00,0xA1 , then the USB-Relay is open. My question is, Its possible to do for the USB-Relay will open when the USB- Relay is connected to PC?. the same question with other words, Its possible to put the default staus to "open" instead of "closed" ?
You are welcome. Not possible. it is made like that. Unless you modify the module physically change the components.
@@robojax thank you for you answer. I have putted a "bridge" in the relay and works correctly.
@@danielherrerosfraile4827 can you tell me what you bridged to make this happen? I have ordered one and need it to do what you described but I haven't received it yet, so I haven't been able to study the board design.
@@LMVRCRacing It was very easy, please see the imagen that I capture for you now. In my case for example use the USB TV connection, becasue wehn the TV is power on, the USB has energy and when the TV is power OF, the USB TV is desactivated: postimg.cc/JGYhcRf9
The bridge is the white wire
Where did you get that 32-bits code to ON/OFF?
For the product page. Just search AliExpress for the product and you will find my store selling it. Check each and scroll down , I am sure you will find a few shown the code. Another way would be to use Bing or google image search
Is there anyway to detect the state whether the device is ON or OFF?
No. Unless you create another variable, when sending command, store the state. then you can read it.
thank you alot, that helped me alot!
Glad to hear that!
Very helpful ... thank you very much!
You are welcome. For me turning appliances via computer have always been something interesting. When I wrote this code and got it ready I thought many people will like it. But it seems few people appreciate this. I am glad you found it useful.
@@robojax It was a lot more helpful than some other similar videos. In fact I've now developed it as far as being able to turn the relay on & off by clicking on buttons on an Excel spreadsheet and getting a VBA macro to run the ps1 files.
That is great. Macros are very powerful tools to use.
@@robojax Hi, Is it possible to detect the state of a relay (ie On or Off) ?
how do you identify (in code) the relevant com port?
Just google or Bing: powerShell usb porty
Here's what I did:
$usbComInfo = (Get-WmiObject -Class CIM_LogicalDevice | Where-object {$_.Description -match "USB-Serial CH340"}).Caption
If ($NULL -NE $usbComInfo) {
$port = (($usbComInfo -Split "COM")[1]).split(')')[0]
$comPort = -join("COM",$port)
##...and now that we have the COMx port, we can just plug that last variable in to the USB com object:
$robojax = new-Object System.IO.Ports.SerialPort $comPort,9600,None,8,one
## Place the rest of the code to turn it on or off here.
}
can you do exactly the same thing using Excel VBA? thanks
I am not sure if Excel can execute shell scripting. If it can execute the script, then yes.
@@robojax Yes, Excel VBA can run Shell commands
Sir how I give command to 16 channle usb relay module pls help. Sir
you have to find the value for all 16 channel. wherever you bought it, they should provide it and use the method I've shown here.
Where can I buy the module?
Just search for “usb relay module” on AliExpress . You will find so many then make sure buy one which shows the turn on/off codes
Can you say that the light turns on when you start the pc?
no. only when i receives the code from terminal, it will turn ON.
if anyone knows how to Link iSpy to a USB to Relay controller and have it trigger relays please post back
thanks a lot.very useful ^^
You are welcome. Please subscribe. I appreciate it and helps my channel grow. Thank you
I got Exception calling "Open" with "0" argument(s)"Access to the port 'COM9" is denied
please use the provided example from file. Then customize it. it will work. follow carefully the instruction.
@@robojax I will try again thanks for the reply
Tq sir
How do you install drivers for Windows 10? Where do you find them?
I believe my test is done on windows 10. You don't need driver. Try to update the driver using "internet search" or "via windows update" and it should work.
I needed a driver for Win 10 64 bit. This driver worked OK for me: sparks.gogo.co.nz/ch340.html
script of powershelle to ead any device connected to the pc with usb port
See sea you this video
Hi, could you please tell us how this can be done on an Android. Thanks.
I have a video to control AC bulb with Android ruclips.net/video/-E9J9ExdZ20/видео.html
Thank you very much. By the way, how can I send power on command to the USB relay using a C++ program? I appreciate your time.
IC Station Product
that page is for sale in USA or China ?
In China but they ship
Very Useful tutorial! Thank you. Can you show how your method can be used on a four channel ICSE012A ?
the method is the same. Each channel will have a pre-set code and manufacturer will provide the code. I will make video if I got a 4 channel module.
@@robojax is it any different for 8 channel relay module?
+1 Thank you very much!
You are welcome.
good night bros I have seen in your videos that I have used several models of relay I have a project and I need to know if I can find it in amazon and I found this model **
DZS Elec 5V-30V 1 channel Wilde Voltage 0-24s Adjustable delay Relay card internal / external trip with timer Delay delay driving Circuit switch with USB to micro USB power line
I am from the Dominican Republic if I buy it in amazon, they will give me the delivery in 5 days
I want your suggestion about this relay if it serves me connecting it directly to my pc to open a door with an electric lock from my pc using the code that you left in the description of the video with this model DZS Elec 5V-30V 1 channel Wilde is for sale in amazon.
thanks, I hope your answer
The door lock needs a switch to open, then you can use it. Send command from your PC and the relay will connect the switch. Here is my latest video showing your to control relay via USB with any Arduino. ruclips.net/video/HzLCkzX5q3w/видео.html
If the lock has its switch to open, it will only have to connect the relay to the wires Send the command from your PC and the relay will connect the switch. Of that marera I will not have to buy any Arduino only the relay ??
That's right. you don't need Arduino. This device has the decoder.
Thank you for your contributions that you gave me when the relay arrives, if I am going to need your help if I do not manage to put it to work
good night bros I got the relay
DZS Elec 5V-30V 1 channel Wilde voltage 0-24s Adjustable delay Relay card Internal / external trip with timer Driving delay delay Circuit breaker with USB to micro USB power line
I was aciendo what you are with the
administrator of dispositiboy the same ice with SScom and it does not work like in the video and I do not work the reley
aver if you can help me put it to work please by TeamViewe
Hi, your relay module doesn't need or use command line> it seems it might have USB to power it up. I have got another video on relay with timer: ruclips.net/video/RjWW4nbUyio/видео.html
please send me the link for the product you have purchased.
Hi i wnat this module
you can get it from eBay or AliExpress and perhaps Amazon. Just search for "usb relay"
Product not found...
I checked all links and non of them is dead. Which link you faced problem with?
Robojax The icstation.com-link doesn't work for me. But in the meanwhile I managed to find the product on Gearbest and ordered it there. Your video convinced me. I want to programme a school bell and your video convinced me that this solution is going to do the trick :)
Thanks for your awesome video project about our product.
www.icstation.com/lcus-relay-module-ch340-intelligent-control-switch-relay-module-p-12488.html
Do you know where I can find a list of commands for the Ch340? I specifically want a toggle command, or a way to read the state of the relay.
The commands are not in the CH340. it has been embedded in the controller. Each manufacturer will have different command.
@@robojax Thank you. OK, so do you know a toggle command for this specific usb relay? Or a way to detect the state?
Do you know where I can find a list of commands for the Ch340? I specifically want a toggle command, or a way to read the state of the relay.
I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe.😊.
@@robojax Just subscribed! thanks for your help!