Skip to content

Automatically Start HomeSeer and Homebridge at Windows Startup

jvmahon edited this page Oct 13, 2019 · 1 revision

Auto-Start Homebridge and HomeSeer At Windows Startup Using Task Scheduler

A. Create The HomeSeer User Account

Begin by creating a local user account for in which HomeSeer and HomeBridge will execute. In these instructions, I assume that account is called "HomeSeer User."

To do so in Windows 10, from The Settings ("Gear") Panel:

  1. Type "Add User" in the "Find a setting" search box and select the result "Add, edit, or remove other users". This should bring you to the "Family & other users" page
  2. Select "Add someone else to this PC" and the "How will this person sign in?" box will appear. Select "I don't have this person's sign-in information". The "Create account" box will appear.
  3. Select "Add a user without a Microsoft account" and the "Create an account for this PC" box will appear
  4. Fill in the user Name "HomeSeer User"

These instructions have been tested with the a “HomeBridgeUser” account having Administrative rights – setting up the account as a “Standard” user is currently untested.

** This section to be expanded (maybe, eventually!).

B. Use NetplWiz to Auto-Login the user account "HomeSeer User"

  • Use the netplzwiz command line tool to set up Windows to automatically login to “HomeSeer User” at system startup.
  • Instructions for doing so are explained here: How to Auto-Login to Windows

C. Restart Windows

  • Restart / Reboot Windows and You should auto-login to "HomeSeer User"

D. Set Up Task Scheduler to Start HomeSeer at Startup

  • Click on the Windows Start Menu Icon and type "Task Scheduler" or select "Task Scheduler" from the Windows Administrative Tools folder.
  • In the "Actions" panel, select "Create A Basic Task" and name it "HomeSeer Startup" then click "Next"

  • For the Trigger, select "When I log on", click Next

  • Select "Start a program" and click Next

  • In the "Program/script" box, browse to find the HomeSeer executable. It is typically at: "C:\Program Files (x86)\HomeSeer HS3\HS3.exe". Enter it as shown below. Click Next.

  • On the "Finished" page, select "Open the Properties dialog for this task when I click Finish", and then Click Finish.

This will then display more advanced properties. Set these advanced properties as follows:

  • General tab: Run with highest privileges, Configure for Windows 10

  • Conditions tab: Uncheck "Stop if the computer switches to battery power"

  • Settings tab: Uncheck "Stop the task if it runs longer than". Check "If the task fails, restart every" and set a restart period and number of attempts.

Note that when a program is started with Task Scheduler, it is started with a below-normal priority. To reset the priority to “Normal”, follow the instructions here: https://bdbits.wordpress.com/2010/04/29/setting-a-scheduled-task-process-priority/

E. Auto-Start HomeBridge

Auto-Start for HomeBridge is similar to what was done for HomeSeer with the following exceptions:

  • In the Task Scheduler "Triggers" panel, Select the "At log on" trigger and then choose "Edit" to edit its advanced properties.
  • You will then select the "Delay task for:" setting and set that to 3 minutes. The reason for this is that you want to be sure that HomeSeer is fully started and has run all of its initialization routines before starting HomeBridge.

The "Action" to be run is simply a windows Command Line ("c:\windows\system32\cmd.exe"). You then provide an argument to the Command line to get it to run Homebridge. The argument looks like this:

  /C "C:\Users\[User Name]\AppData\Roaming\npm\homebridge -U [Directory where you placed your config.json]"

Which in my case, gives me the following argument

  /C "C:\Users\HomeSeer User\AppData\Roaming\npm\homebridge -U c:\users\HomeSeer User\homebridge"

F. Auto-Lock the HomeSeer User Account After Startup

You may want to include a second Task Scheduler task to immediately lock the HomeSeer User account after startup. This will allow HomeSeer / HOmebridge to run in its account, but returns to the login screen for "regular" use of the computer by others. To do this, set a second scheduled task that also Triggers "At log on" of the "HomeSeer User" user with a "Start a program" action set as follows:

Program/Script:  C:\Windows\System32\rundll32.exe

Add arguments (optional):   user32.dll,LockWorkStation

Start in (optional):   C:\Windows\System32

Home

Installation

I've deleted most of my "old" installation instructions that used to be here. Homebridge has updated their instructions and they are now more comprehensive than what I had. Just follow their instructions: https://www.npmjs.com/package/homebridge

And be sure to use config-ui-x. Its really great for setting up the plugin.

Configuring Devices

These instructions are now a bit out of date. You can follow them to set up the plugin, but there is now a settings interface in config-ui-x which makes it much easier.

FAQs

Why won't my device names change after I edit them in config.json

Miscellaneous

Clone this wiki locally