Running HA in background - Windows

I have been having a great time using HA so far - definitely has exceeded my expectations at this point! Right now, I run HA on my Windows computer, which I treat as the main server for most of my tasks around the house. Is there a way to run the system in the background, instead of using a cmd prompt window? I haven’t tried this with other pip installations yet - just Python scripts in general.

I thought a start pythonw hass would be the fix, but that didn’t take care of it. Any help would be appreciated. Thanks!

I haven’t run Home-Assistant on Windows, but I imagine you could use the Windows Task Scheduler to accomplish this.

I just went through same thing, and this fixed it for me:

Create a bat file with the following:

hass

then create a .vbs with the following:

Set WshShell = CreateObject("WScript.Shell") WshShell.Run chr(34) & "path\to\bat" & Chr(34), 0 Set WshShell = Nothing

I then set the vb script to run on startup, and now I have Hass running in the background/start when the computer is rebooted.

Hope this help, and let me know if it did/didn’t.

1 Like

That did the trick! Thank you for your help on setting this up!

question: (pardon my ignorance)
-when creating the actual task, the program you ran is the XXX.vbs? or the *.bat? sorry… (I guess I need to install VB? :frowning:)
-Also, on the “path\to\bat” do i include the actual bath… ie: & c:\windows\hass.bat $ Chr (34)…??

last question: if I open localhost:8123… HA its served… if I try the example.com:8123 it wont!? however, when I run from the command line: py -m homeassistant and HA boots, example.com:8123 becomes available!? ideas?