Closed inobrevi closed 6 months ago
You can create a hibernation button with a Terminal entity. Just select Button, and add this command:
%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState Hibernate
Hi!
Thank you for the info.
I moved to Home Assistant OS to avoid integration issues. Everything works, but now I have to figure it out, how to make it work in background, without running it in command window.
If you use HAOS, you can install the Mosquitto broker addon: https://github.com/home-assistant/addons/blob/master/mosquitto/DOCS.md
For running in the background on windows, I recommend to run IoTuring as a service with NSSM: https://nssm.cc
I figured out first part.
I will let you know if I manage to make it a service :)
Hello!
I figured it out, but better and easier.
Basically, after configuring IoTuring, you can create a IoTuring.bat
file:
@echo off
python -m IoTuring
And then run it from IoTuring_hidden.vbs
script, which would run it without showing console window:
CreateObject("Wscript.Shell").Run "IoTuring.bat",0,True
Save both files in the same folder, run IoTuring_hidden.vbs
and it just works.
You can also add this .vbs script to autorun, but I didn't test that.
How can I set this up with Home Assistant? (I have it as a docker container or RPI)
Goal: Control Shutdown/Hibernation of Windows 10 PC.