Got it working! Nice tip is to use a template switch with some kind of device tracker (I used my router) to also monitor the PC status. That way the PC is also in the correct state in home assistant when you toggle it manually.
What a Great Tutorial !!! I've been using one of many WOL utilities for some time to power On/Off several of my devices on my LAN as needed, but this is so so so Much better inside of Home Assistant. And your tutorials as always are easy to follow and precise without any wasted time. Much Thanks !!
Just another thing to add with this, turn printer and file sharing on, if that's off it won't work. You may not need to do the extra work with the firewalls etc if you just enable this.
Thanks. I had this working before with wmi but since a new install of win11 it wouldn't work. Also tested and yes doing this will mean you don't have to change firewall settings.
@@KrispKiwi I followed this tutorial, did all the steps, couldn't get RPC Shutdown to work. Once I did this printer and file sharing tip, everything worked. Couple mnonths passed, windows died as it does, reinstalled windows, followed this tutorial and again and same issue until printer and file sharing lol. This needs an upvote. Seems like HA cannot detect the state without this setting in windows which invalidates the switch.
Hello and first of all thank you very much for your fabulous explanations in advance. I don't know if you're still dealing with the topic at all?! I've now managed to get it so far that I can switch on the PC... It just can't be turned off... I'm using Win 11 64 bit version and my PC has been turning on at 12:00 a.m. for whatever reason since I tried it... I would be happy if you could help me with this... Thank you very much in advance..
Thanks for the tutorial. Everything was clear & concise. The regedit download file worked precisely. Just one question, any ideas how to hibernate instead of shutdown using RPC. My pc is a bit old and will not wake from full shut down. A work around is to set power settings to hibernate after "period of time" inactivity but it would be nice to use Home Assistant for both. BTW I pressed the 👍 button & subscribed. I'm hooked on HA. LOL
@KPeyanski you were right at saying that some computers won't turn on if they were shutdown instead of being put into Sleep mode. In fact mine doesn't turn on after using RPC Shutdown so it's completely useless. 😕
thanks for the video i used this to setup up wake on lan for both by pcs and it works fine however for one of my pcs rpc shutdown wont work any ideas ???
This is a great guide... but for some reason, the turn off are not working for me, when I click the button again, it just resends the wake_on_lan command, like it has no clue that my computer is on... is there a sensor I need to add?
Hi! Great and usefull video. WoL works perfectly. But i've troubles with RPC. What about if I didn't install HA OS but HomeAssistant Core via docker instead? I can't find the RPC Shutdown application anywhere.
I thought about this many times, but I should probably create a video about basic Node-RED automations first, and then to continue with advanced. Also they should be around certain theme as the topic is too broad. Do you have an idea about specific topic or theme about such video?
@@KPeyanski There are several basic NodeRed videos on YT. The advanced videos are lacking... But maybe the best approach is to define some projects and then implement them using basic and advanced features on NodeRed and HomeAssistant. You can start with some more basic examples like notify user when an update is available or send a notification when some movement is detected, Disable all notifications when a switch is off in HA. But I'm interested in some more complex examples like: An alarm system using NodeRed, Notifications with Actions using Android APP and NodeRed, Integrate Alexa in HA with Nodered to respond to custom commands, others... If you need more examples, please ask!
hi great video but I have a problem I get an error message when I press the button Failed to call the switch/turn_off service. Not a valid add-on slug for dictionary value @ data['addon'] and all the rest of the code is good with the modifications made but rpc shotdown is not ordered to be activated
Good job, thanks a lot! I do have one little problem, maybe someone else reported it too After my PC shut down, it restarts itself after a few seconds. Ever heard that before?
Thanks for the video. However I have HA on docker and the procedure doesn't seem to work. Do you know if I need a different configuration to make it work?
Friend, you need to Switch Off fast start - then wol will Work after shutdown every time and Not only at sleep. ;-) Fast start is to found in Energy setings, in left Menü click on what should Happen when Press Power Button, there is fast start which make Vera offen Problems Witz wol. Sorry for my english ;-)
@@KPeyanski I did that with an automation simulating a temporary switch. Plattform=state and call a service as action switching it OFF after a configurable time, in my case 5 seconds, which is enough time to send a magic package.
I found your comment and it made me look into things. You might want to consider going the exact opposite way on that... By selecting hybrid sleep and fast boot you're effectively making your computer shut down and save a copy of the kernel state on its hard drive and then when you're waking it you're basically powering it on and it remembers that state. It doesn't matter if your computer doesn't work with power off to wake on lan because essentially it does. It's just not called that way, but it uses 0w total power in hibernation state.
Great tutorial, but sorry, in my case the WOL function not working, the switch does not have any effect on my computer and shutdown too, I write correct informations like IP and MAC, same name for the switch and addon, nothings work :/
Thx for the Tutorial. But I have big concern in terms of security. For RPC Shutdown you put in plain text configuration your pc user and password. Guess what happend, if your homeassistant is hacked. Do you have a security workaround for that? WOuld be nice! Thx
@KPeyanski Thanks for the tutorial, it was very helpful. I have a question; the switch doesn't show the on state of the pc. Is is always shown as "off". I use Google Assistant to control the PC boot and shutdown but the switch should be able to show the state correctly, right? Thanks
By selecting hybrid sleep and fast boot you're effectively making your computer shut down and save a copy of the kernel state on its hard drive and then when you're waking it you're basically powering it on and it remembers that state. It doesn't matter if your computer doesn't work with power off to wake on lan because essentially it does. It's just not called that way, but it uses 0w total power in hibernation state.
hello great guide! I integrated it and everything works correctly, I ask you another information if I can: when you click on the action of turning off the pc, a text also appeared that says: home assistant is shutting down this pc ... "how did you put this message? where can I insert it? it just says" -null "to me Thank you
Perfect on my widows 10 pcs but shutdown not working on any of my windows 11 pcs. Anyone had this problem? It’s definitely some setting that needs changing in win11 pcs
RPC Shutdown isn’t very great for security purposes. I’m not a fan with settings my Windows login credentials into Home Assistant. I will develop myself a solution, I think’s to a windows service listening for a webhook sended from HA. I just need to know how to make a switch on HomeAssistant to make an HTTP GET Request and set the switch state depending on HTTP Response. I would like to make automation with this switch too. Is a switch a good option or would I rather need to make an entity ? (I’m new to Home Assistant)
@@darkhummy HAAS Agent allows the shutdown, standby, hibernate the system and also shutdown screens and waking up NATIVELY yes. Concerning the waking up of the computer, HAAS Agent, a simple Windows service or application cannot do that. The WoL is designed for that, it is a feature supported in your motherboard, which must be activated in the UEFI/Bios, then also in Windows (Network card properties, power saving panel). Then you just need a small utility to send a magic packet, for my part I can do it natively from HomeAssistant with a switch.
Чувак, ты показываешь yml файл, как ты его открыл? Я открыл редактор, и у меня белый лист. Как ты открываешь /config/configuration.yaml ??????????????????????????????
I'm still having an issue where WOL works if my computer is sleeping but not when it's shut down. I can shut it down with RPC but can't turn it back on with the button again. I have ErP enabled in bios as well as Allow PCIe devices to wake up computer. I have an Msi B450 gaming pro carbon AC (dumb name) and am at a loss of what I'm doing wrong here.
I have no much experience with Google Assistant so I cannot say exactly. Maybe some else will jump in and answer your question. It will be interesting to understand.
Hi, very good video. I have configured WOL, but shutdown requires windows user/password. How do i configure rpc shutdown if i havent password for current user? Thanks in advance
4:50 You kind of glazed over a serious explanation here....... am i supposed to use my microsoft account email? or the name it assigns as your username based off the email?? do i use the password for the windows account or the password for the user account or the pin?????? . What happens if my username has an apostrophe in it or a space??
I did everything what you did/said in this video.. step by step. Buy It’s still giving me the error: The username or password was not correct. Connection failed: NT_STATUS_LOGON_FAILURE. Ip address is good and static. I did ever step and did everything what u said... I looked all over google but can’t find anythingg.. Please help me Edit: It doesn't turn on or off. I tried every user and password. From my computer and microsoft account. Current config is using my C:/user and password is my password for my pc
Came here to get it to work, an when you mention configuration.yaml im like WTF IS THAT So.... This is not really a how to because you dont explain what it is
I am in Ghana, West Africa ……………like your channel so much and GOD bless you
Thank you for the good words. Greetings to Ghana.
Got it working! Nice tip is to use a template switch with some kind of device tracker (I used my router) to also monitor the PC status. That way the PC is also in the correct state in home assistant when you toggle it manually.
Excellent!
What a Great Tutorial !!!
I've been using one of many WOL utilities for some time to power On/Off several of my devices on my LAN as needed, but this is so so so Much better inside of Home Assistant. And your tutorials as always are easy to follow and precise without any wasted time.
Much Thanks !!
Great to hear! Check my other tutorials as well and enjoy ;)
hi, I'm from Germany and say hello
Thanks again for this great video.
You have already helped me a lot.
Please keep it up, thumbs up.
Awesome, thank you for your positive comment :) This is motivating and I will do my best to continue. Greetings to Germany!
Just another thing to add with this, turn printer and file sharing on, if that's off it won't work. You may not need to do the extra work with the firewalls etc if you just enable this.
my wheels were spinning for a hour until I read this. thank you!
Thanks. I had this working before with wmi but since a new install of win11 it wouldn't work. Also tested and yes doing this will mean you don't have to change firewall settings.
you're a legend mate. I've been trying to figure out why shutdown wasn't working for the past week. No one mentions printer and file sharing!!!
Glad to hear ya got it working@@invertedgames7993
@@KrispKiwi I followed this tutorial, did all the steps, couldn't get RPC Shutdown to work. Once I did this printer and file sharing tip, everything worked. Couple mnonths passed, windows died as it does, reinstalled windows, followed this tutorial and again and same issue until printer and file sharing lol. This needs an upvote. Seems like HA cannot detect the state without this setting in windows which invalidates the switch.
Thank you friend! I really helped with the setup. I had an account error. With love from Russia!
Hello and first of all thank you very much for your fabulous explanations in advance.
I don't know if you're still dealing with the topic at all?!
I've now managed to get it so far that I can switch on the PC...
It just can't be turned off... I'm using Win 11 64 bit version and my PC has been turning on at 12:00 a.m. for whatever reason since I tried it...
I would be happy if you could help me with this...
Thank you very much in advance..
Great video, wake on lan works great, and it was a very elegant way to implement it!
Great to hear! Are you going to try RPC Shutdown as well or you are not on Windows?
btw I love the end song :D and thank you for the content, you always have my likes
Really, thanks for letting me know :) I will put it back as I removed it during my last several videos. Also, many thanks for the likes :)
Thanks for the tutorial. Everything was clear & concise. The regedit download file worked precisely. Just one question, any ideas how to hibernate instead of shutdown using RPC. My pc is a bit old and will not wake from full shut down. A work around is to set power settings to hibernate after "period of time" inactivity but it would be nice to use Home Assistant for both. BTW I pressed the 👍 button & subscribed. I'm hooked on HA. LOL
If you don't have ethernet for WOL you can use a smart plug to turn on the pc. In the bios you just enable power on on AC under power management.
Thanks for tip - very true! I'm using this approach for my NAS for a long time and it is very useful.
That's a great way to develop file system corruption.
@@-vermin- who cares? Obviously you have a backup anyway.
Sure but I prefer not to make work for myself when it can be easily avoided by not doing stupid things.
@@-vermin- automatic backups
@KPeyanski you were right at saying that some computers won't turn on if they were shutdown instead of being put into Sleep mode.
In fact mine doesn't turn on after using RPC Shutdown so it's completely useless. 😕
Try with wake on lan ;)
Its right. wake on lan does not work if computer was shutdowned with rpc shutdown!
thanks for the video i used this to setup up wake on lan for both by pcs and it works fine however for one of my pcs rpc shutdown wont work any ideas ???
Thanks for the guide. Works like a charm.
Great to hear! Enjoy!
This is a great guide... but for some reason, the turn off are not working for me, when I click the button again, it just resends the wake_on_lan command, like it has no clue that my computer is on... is there a sensor I need to add?
Hi! Great and usefull video. WoL works perfectly. But i've troubles with RPC. What about if I didn't install HA OS but HomeAssistant Core via docker instead? I can't find the RPC Shutdown application anywhere.
As always, another great video. Keep up the good work!!
Thanks, will do! Actually my new video is scheduled for later today - 17:30 UTC :)
Thank you so much for this very helpful and precise tutorial! You made my day!
You are so welcome!
did everything as per this tutorial, but can't get it working, log says: Shutdown of remote machine failed
result was: WERR_CALL_NOT_IMPLEMENTED
Can you do some videos about advanced automations in NodeRed? I think many of us will appreciate...
I thought about this many times, but I should probably create a video about basic Node-RED automations first, and then to continue with advanced. Also they should be around certain theme as the topic is too broad. Do you have an idea about specific topic or theme about such video?
@@KPeyanski There are several basic NodeRed videos on YT. The advanced videos are lacking... But maybe the best approach is to define some projects and then implement them using basic and advanced features on NodeRed and HomeAssistant. You can start with some more basic examples like notify user when an update is available or send a notification when some movement is detected, Disable all notifications when a switch is off in HA. But I'm interested in some more complex examples like: An alarm system using NodeRed, Notifications with Actions using Android APP and NodeRed, Integrate Alexa in HA with Nodered to respond to custom commands, others... If you need more examples, please ask!
hi great video but I have a problem I get an error message when I press the button Failed to call the switch/turn_off service. Not a valid add-on slug for dictionary value @ data['addon'] and all the rest of the code is good with the modifications made but rpc shotdown is not ordered to be activated
Good job, thanks a lot!
I do have one little problem, maybe someone else reported it too
After my PC shut down, it restarts itself after a few seconds.
Ever heard that before?
Your video really helped me allot. I'm able to power ON/OFF my desktop PC's via HA.
Is there a script to just put them to sleep rather than power off?
Thanks for the video. However I have HA on docker and the procedure doesn't seem to work. Do you know if I need a different configuration to make it work?
Friend, you need to Switch Off fast start - then wol will Work after shutdown every time and Not only at sleep. ;-) Fast start is to found in Energy setings, in left Menü click on what should Happen when Press Power Button, there is fast start which make Vera offen Problems Witz wol. Sorry for my english ;-)
Thanks for the tips! I will try this and I will update my article if it is working fine. Thanks once again!
@@KPeyanski I did that with an automation simulating a temporary switch. Plattform=state and call a service as action switching it OFF after a configurable time, in my case 5 seconds, which is enough time to send a magic package.
I found your comment and it made me look into things. You might want to consider going the exact opposite way on that...
By selecting hybrid sleep and fast boot you're effectively making your computer shut down and save a copy of the kernel state on its hard drive and then when you're waking it you're basically powering it on and it remembers that state. It doesn't matter if your computer doesn't work with power off to wake on lan because essentially it does. It's just not called that way, but it uses 0w total power in hibernation state.
Great tutorial, but sorry, in my case the WOL function not working, the switch does not have any effect on my computer and shutdown too, I write correct informations like IP and MAC, same name for the switch and addon, nothings work :/
Thx for the Tutorial. But I have big concern in terms of security. For RPC Shutdown you put in plain text configuration your pc user and password. Guess what happend, if your homeassistant is hacked. Do you have a security workaround for that? WOuld be nice! Thx
@KPeyanski Thanks for the tutorial, it was very helpful. I have a question; the switch doesn't show the on state of the pc. Is is always shown as "off". I use Google Assistant to control the PC boot and shutdown but the switch should be able to show the state correctly, right? Thanks
I found the solution. If anyone has the same problem: Solution is to activate the network discovery on windows.
Thanks, for commenting and that you share your tips/solution to the problem :)
What do i need to type in the credentials if i dont have set password for my pc?
wake on lan enabled on bios, wake on magic packet also enabled on windows but nothing happening, even in sleep mode :(
If this works you shall have my Like :D
edit
Here you go, you have earned that like :D
Very glad to hear that it worked and thanks for the like 👍
WOL works well but I cannot get RPC shutdown as I don't have the add on store - is there a manual way of installing it?
How can I trigger this shutdown switch in a script? I choose Action type: Device, Device: RPC Shutdown, but the Action section is greyed out.
top thanks for your help 👍
You're welcome 😊
By selecting hybrid sleep and fast boot you're effectively making your computer shut down and save a copy of the kernel state on its hard drive and then when you're waking it you're basically powering it on and it remembers that state. It doesn't matter if your computer doesn't work with power off to wake on lan because essentially it does. It's just not called that way, but it uses 0w total power in hibernation state.
Thanks for the info and tips. Appreciate that!
Hi! What can I put for the password, if my desktop doesn't have a password?
great video! thanks!
Glad you liked it! Check my other videos as well!
somehow Entity for button card did not appear after adding a switch to yaml file and restarting the configuration. What could be wrong?
Hi, another great video. Will WOL work on laptop on Wi-Fi?
I guess, you have to try...
hello great guide! I integrated it and everything works correctly, I ask you another information if I can:
when you click on the action of turning off the pc, a text also appeared that says: home assistant is shutting down this pc ... "how did you put this message? where can I insert it? it just says" -null "to me
Thank you
If you check from 4:27, you can see this message is entered in the add-on configuration
What should I enter if I do not have a password set on my PC ?
create a separate user (with admin rights) just for the rpc shutdown
wow, dirty keyboard, good tutorial
Thanks for noticing :)
Perfect on my widows 10 pcs but shutdown not working on any of my windows 11 pcs. Anyone had this problem? It’s definitely some setting that needs changing in win11 pcs
i cant turn it off on windows 11, i can only turn on my pc. tips?
RPC Shutdown isn’t very great for security purposes. I’m not a fan with settings my Windows login credentials into Home Assistant. I will develop myself a solution, I think’s to a windows service listening for a webhook sended from HA. I just need to know how to make a switch on HomeAssistant to make an HTTP GET Request and set the switch state depending on HTTP Response.
I would like to make automation with this switch too. Is a switch a good option or would I rather need to make an entity ? (I’m new to Home Assistant)
Just create a local windows account on the machine and give those credentials to rpc shutdown.
@@darkhummy I don’t tried your solution but I use HAAS Agent now. This open source is very complete. Don’t need the recreate the wheel…
@@franois33 I looked at HAAS Agent but It didn't list shutting down/turning on via PoE as a feature, is it included without extra work?
@@darkhummy HAAS Agent allows the shutdown, standby, hibernate the system and also shutdown screens and waking up NATIVELY yes.
Concerning the waking up of the computer, HAAS Agent, a simple Windows service or application cannot do that. The WoL is designed for that, it is a feature supported in your motherboard, which must be activated in the UEFI/Bios, then also in Windows (Network card properties, power saving panel).
Then you just need a small utility to send a magic packet, for my part I can do it natively from HomeAssistant with a switch.
Чувак, ты показываешь yml файл, как ты его открыл? Я открыл редактор, и у меня белый лист. Как ты открываешь /config/configuration.yaml ??????????????????????????????
I'm still having an issue where WOL works if my computer is sleeping but not when it's shut down. I can shut it down with RPC but can't turn it back on with the button again. I have ErP enabled in bios as well as Allow PCIe devices to wake up computer. I have an Msi B450 gaming pro carbon AC (dumb name) and am at a loss of what I'm doing wrong here.
Sorry, but I can't help much here.
lifesaver! amazing! +1 like, +1 sub
Wow, thanks for the sub & like. Glad I could help!
hello, possible to integrate Google assistant to run the homeassistant WOL thing?
I have no much experience with Google Assistant so I cannot say exactly. Maybe some else will jump in and answer your question. It will be interesting to understand.
hello my windows pc do not need user name and password what do i inser in this case?
Create a new admin user and add a password to that user and use it
Followed your tutorial HA says the addon is working but go to the logs and there is nothing, any ideas?
Strange, try to restart HA and check the logs both on the add-on and the HA
@@KPeyanski
Thanks got it working last night, it was the state, it was saying it was off when I changed it to on, it then worked and shut down.
Hi, very good video. I have configured WOL, but shutdown requires windows user/password. How do i configure rpc shutdown if i havent password for current user? Thanks in advance
I guess you have to create another local user with admin rights.
@@KPeyanski thanks, i'll try asap
@@LuisPeris did you get this to work cause I'm having the same issue.
@@BluelightGaming1 no, i didnt
How do i add multiple computers in the RPC Shutdown Configuration? I have tried with an added - alias, but i get "Invalid YAML"
it's probably spacing, yaml is a fickle mistress
watch out for correct indentation and missing/too many dashes (-)
Yes it was something like that, but im not sure exactly what i did.. But it works now! Thanks alot for great video and good explanation
Cool
Glad you like it :)
4:50 You kind of glazed over a serious explanation here....... am i supposed to use my microsoft account email? or the name it assigns as your username based off the email?? do i use the password for the windows account or the password for the user account or the pin?????? . What happens if my username has an apostrophe in it or a space??
local admin account is needed. And you can create one only for this purpose without any special characters inside.
is it working for Mac?
Home Assistant Wake on LAN will work at 99%, but you have to try it. The Shutdown will not work
🤣3:34 priceless
I did everything what you did/said in this video.. step by step. Buy It’s still giving me the error: The username or password was not correct.
Connection failed: NT_STATUS_LOGON_FAILURE. Ip address is good and static. I did ever step and did everything what u said... I looked all over google but can’t find anythingg.. Please help me
Edit: It doesn't turn on or off. I tried every user and password. From my computer and microsoft account. Current config is using my C:/user and password is my password for my pc
Are you using local user with administrator rights? Also what version is your operating system exactly?
@@KPeyanski windows 10 home with one user with admin
@@iwandevries4734 is it an online user or local?
@@KPeyanski Online (Microsoft) Thank you for helping me :)
@@iwandevries4734 make a local user with admin rights and use it instead of the online user. It should work that way.
Came here to get it to work, an when you mention configuration.yaml im like WTF IS THAT
So.... This is not really a how to because you dont explain what it is
if u don't know what configuration.yaml is u should watch some basic setup videos..