Install NetDaemon

There are two ways of running NetDaemon, as an add-on running under Home Assistant (previously known as hass.io) or as a docker container.

Install as a Home Assistant add-on

  1. Add the https://github.com/net-daemon/homeassistant-addon in Add new repository URL to the add-on store.

  2. Add the NetDaemon add-on.

If you want to use the autogenerated entities on startup set that setting to true in add-on configuration. It is off default.

  1. After you install it, do not start it just yet. We need to configure some stuff manually (will be improved as we come closer to release). See App Development for details.

Install as a docker container

Evironment variables you can set

The docker container needs 3 enviroment variables to run properly.

ENVDescription
HOMEASSISTANT__HOSTThe host that is running Home Assistant (defaults to localhost)
HOMEASSISTANT__PORTThe port Home Assistant is running on (default to 8123)
HOMEASSISTANT__TOKENA Long Lived Acces Token(LLAT) that NetDaemon can use for the comminication with Home Assistant.
NETDAEMON__GENERATEENTITIESDefaults to False, set True if you want the autogenerated entities
LOGGING__MINIMUMLEVELefaults to info, values are (trace, debug, info, warning, error)
TZYou will need to set container time zone to make the scheduler work properly
NETDAEMON__PROJECTFOLDERNETDAEMON__PROJECTFOLDER=/data use the csproject file you provides in the netdaemon folder instead of the built-in. This is for advanced scenarios where you want to run custom NUGET packages and compile with your own csproj file. Normally you would not use this.
NETDAEMON__ADMINSet this to false to disabled the Admin UI.

Volumes

VolDescription
/dataThe volume of the netdaemon folder should be mapped to /data See how to setup the correct folder here

Example docker run configuration

docker run -dt \
--name netdaemon \
--restart=always \
-e HOMEASSISTANT__HOST=192.168.1.1 \
-e HOMEASSISTANT__TOKEN=XXXXX \
-e NETDAEMON__GENERATEENTITIES=False \
-e LOGGING__MINIMUMLEVEL=info \
-e TZ=Europe/Stockholm \
-p 1337:1337 \
-v ~/netdaemon_config:/data \
netdaemon/netdaemon

-p 1337:1337 is only needed if you want the admin panel

Folder structure and where to map the docker volume

The ~/netdaemon_config need to point to the netdaemon folder. See image below. The red arrow in the example configuration below points to the folder that should be mapped to the /data!