-
Notifications
You must be signed in to change notification settings - Fork 8
Install NimHA
NimHA can be installed in 2 ways - through Nimble or you can compile it.
Available compile options are shown below
Run:
cd
git clone https://github.com/ThomasTJdev/nim_homeassistant.git
cd nim_homeassistant
nim c -r nimha.nim
When you are compiling NimHA, you have access to the following compile options. Append the parameters to nim c nimha.nim
.
-
-d:dev
= Run development/debug mode -
-d:devmailon
= Allow sending mails in dev mode -
-d:logoutput
= Enhanced logging -
-d:rpi
= Enable RPi -
-d:rc
= Recompile all modules. NimHA will not recompile modules without this if the modules exists. To recompile a single module use the options below. -
-d:rcwss
= Recompile Websocket -
-d:rccron
= Recompile Cron -
-d:rcwebinterface
= Recompile Webinterface -
-d:rcgatewaywss
= Recompile Websocket gateway -
-d:rcgateway
= Recompile Main gateway -
-d:rcxlistener
= Recompile Xiaomi listener -
-d:systemInstall
= This will install NimHA on your system using e.g. /etc/nimha. Please see the section below for details.
Run:
nimble install nimha
Your config file (secret.cfg
) are located in the config
-folder.
Copy the template before editing:
cp config/secret_default.cfg config/secret.cfg
It is required that the following details are updated:
- [MQTT]
- [Websocket] - only needs update if you are using Nginx/SSL
To get access to NimHA, you need to add an admin user. Only 1 admin user is allowed.
Run NimHA with following arguments:
./nimha newuser -u:username -p:password -e:my@email.com
Make sure that your MQTT broker is up and running, e.g. sudo systemctl start mosquitto
.
Run NimHA from file:
./nimha
Run NimHA after compile:
nim c -r nimha.nim
This will install NimHA on your system. This feature is still experimental. Either use the debian files or manually create and move the files to the specified folders:
/var/lib/nimha/mainmodules => Modules folder
/etc/nimha/nimha.cfg => Secret.cfg file
/var/lib/nimha/db => Database folder
/var/run/nimha/tmp => Tmp folder
/var/run/nimha/nimblecache => Nimble cache folder
/var/lib/nimha/public/js/script.js => JS file
- Home
- Requirements
- Install NimHA
- Optional
- Modules
- Tutorials (helpers, etc.)
- Development