Skip to content

Requirements

Thomas T. Jarløv edited this page Aug 7, 2018 · 4 revisions

The following requirements needs to be installed before you install NimHA.

Nim requirements

  • nim >= 0.18.1
  • (nim) bcrypt >= 0.2.1
  • (nim) jester >= 0.4.0
  • (nim) multicast >= 0.1.1
  • (nim) recaptcha >= 1.0.2
  • (nim) websocket >= 0.3.1

Third party requirements

The requirements below are used within NimHA until they can be replaced with pure Nim. Make sure they are installed on your system.

  • curl (Pushbullet)
  • mosquitto (nearly all modules)
  • openssl (ssl)
  • python3 (encrypting token for Xiaomi)
  • pycrypto (encrypting token for Xiaomi)

Install Nim

The official instructions can be found here https://nim-lang.org/install.html

Choosenim

Installing with choosenim is very easy. Just run:

curl https://nim-lang.org/choosenim/init.sh -sSf | sh
choosenim devel

Raspberry Pi

Choosenim does currently (2018 August) not support amd. You need to follow the instructions on https://github.com/nim-lang/Nim#compiling. After compiling Nim symlink your executable:

ln -sf /the/path/to/nim/git/Nim/bin/nim /usr/bin/nim
ln -sf /the/path/to/nim/git/Nim/bin/nimble /usr/bin/nimble

Install Nim packages

The Nim packages can all be installed with Nimble.

Run the following commands:

nimble install bcrypt
nimble install jester
nimble install multicast
nimble install recaptcha
nimble install websocket

Install Third party packages

Adjust the commands to your package manager.

Please see the wiki page about NimHA Wiki - Mosquitto

sudo pacman -S curl
sudo pacman -S mosquitto
sudo pacman -S openssl
sudo pacman -S python3

The last package can be installed via pip or by yourself:

git clone https://github.com/dlitz/pycrypto.git
python3 setup.py build
python3 setup.py install