Installing domoticz on Freenas

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
iguaan
Posts: 15
Joined: Thursday 21 May 2020 7:40
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Installing domoticz on Freenas

Post by iguaan »

Have anyone successfully installed/built latest domoticz 2020 to Freenas or Freebsd 11.3?
Maybe some tips what's different from previous domoticz installs.
User avatar
FireWizard
Posts: 1871
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Installing domoticz on Freenas

Post by FireWizard »

iguaan
Posts: 15
Joined: Thursday 21 May 2020 7:40
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Installing domoticz on Freenas

Post by iguaan »

FireWizard wrote:Hi,

See the WIKI: https://www.domoticz.com/wiki/FreeNAS

And also at iXsystems: https://www.truenas.com/community/threa ... ail.61030/

Regards
These are outdated guides.
They won't work for domoticz v2020.
They are missing dependencies, even if i install them, the build will fail at the end. It was at about 98, 99%

Sent from my MI 9 using Tapatalk

User avatar
FireWizard
Posts: 1871
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Installing domoticz on Freenas

Post by FireWizard »

Hi, @iguaan.

You wrote:
These are outdated guides.
They won't work for domoticz v2020.
They are missing dependencies, even if i install them, the build will fail at the end. It was at about 98, 99%
Sorry, for that. I do not run Domoticz in a TrueNAS (FreeNAS) jail, so it has not been tested.

I assume, you have also seen this Wiki.
https://www.domoticz.com/wiki/FreeBSD

I didn't test it either. But you can try, I think you need a FreeBSD package, so that you can simple install it with:

Code: Select all

pkg install Domoticz
[Edit] Seems to be there: https://bugs.freebsd.org/bugzilla/show_ ... ?id=245007

I tried it, but it did not run.

Regards
iguaan
Posts: 15
Joined: Thursday 21 May 2020 7:40
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Installing domoticz on Freenas

Post by iguaan »

Well gave it another try today and it worked like a charm:

* iocage create -n "domoticz" -r 11.3-RELEASE ip4_addr="your_interface_name|your_ip_address/24" defaultrouter="your_gateway" vnet="off" allow_raw_sockets="1" boot="on"
* iocage exec domoticz
* pkg update && pkg upgrade //although pkg was for freebsd 11.4 (running kernel: 1103000)
* pkg install domoticz
* cd /usr/local/etc/rc.d
* ee domoticz
edit-> : ${domoticz_enable:=YES}
test-> * ./domoticz
open url-> your_ip_address:8080
:) :)
v2020.2
Guess the pi3 is going back to drawer as a backup device.
User avatar
FireWizard
Posts: 1871
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Installing domoticz on Freenas

Post by FireWizard »

Hi @iguaan

I will give it another try tomorrow, but I do not think it will replace my Raspberry Pi, as the Pi is at a complete different place in my house as my TrueNAS (formely FreeNAS) server and it also controls theP1 smart meter and RFXCom.

I keep you informed.

Regards
User avatar
FireWizard
Posts: 1871
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Installing domoticz on Freenas

Post by FireWizard »

Hi @iguaan

I can confirm that I have Domoticz running in TrueNAS (formerly FreeNAS) 12 jail.
Actually I had it already successfully installed yesterday, however I did not start it correctly.

Like you said it was easy, but I did it in a somewhat different way.

Step 1.
Create the jail in the TrueNAS Gui. I called it Domoticz

Screenshot_TrueNAS-Domoticz_Setup.png
Screenshot_TrueNAS-Domoticz_Setup.png (30.56 KiB) Viewed 1469 times

Step 2.
Go to the Shell. You will be greeted by:
FreeBSD 12.2-RC3 7c4ec6ff02c(HEAD) TRUENAS

Welcome to FreeBSD!

Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories: https://www.FreeBSD.org/security/
FreeBSD Handbook: https://www.FreeBSD.org/handbook/
FreeBSD FAQ: https://www.FreeBSD.org/faq/
Questions List: https://lists.FreeBSD.org/mailman/listi ... questions/
FreeBSD Forums: https://forums.FreeBSD.org/

Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with: pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.

Show the version of FreeBSD installed: freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages: man man
FreeBSD directory layout: man hier

Edit /etc/motd to change this login announcement.
Step 3
In the shell run the following commands.

Code: Select all

pkg update
You will see:
root@domoticz:~ # pkg update
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]:
Answer: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:11:amd64/quarterly, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
[domoticz] Installing pkg-1.15.10...
[domoticz] Extracting pkg-1.15.10: 100%
Updating FreeBSD repository catalogue...
[domoticz] Fetching meta.conf: 100% 163 B 0.2kB/s 00:01
[domoticz] Fetching packagesite.txz: 100% 6 MiB 6.3MB/s 00:01
Processing entries: 100%
FreeBSD repository update completed. 30622 packages processed.
All repositories are up to date.

Code: Select all

pkg upgrade
This will probably end with "Your packages are up to date".

Code: Select all

pkg install domoticz
You will see that several new packages will be installed:

The following 19 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
boost-libs: 1.72.0_2
c-ares: 1.16.1
ca_root_nss: 3.58
curl: 7.72.0
domoticz: 2020.2_1
e2fsprogs-libuuid: 1.45.6
gettext-runtime: 0.21
icu: 67.1,1
indexinfo: 0.3.1
jsoncpp: 1.9.4
libedit: 3.1.20191231,1
libffi: 3.3_1
libnghttp2: 1.41.0
lua53: 5.3.5_3
minizip: 1.2.11
mosquitto: 1.6.7
python37: 3.7.9
readline: 8.0.4
sqlite3: 3.33.0,1
readline: 8.0.4
sqlite3: 3.33.0,1

Number of packages to be installed: 19
Install the packages

Step 4

Go to:

Code: Select all

cd /etc
and edit rc.conf

Code: Select all

ee rc.conf

And add the line:

Code: Select all

domoticz_enable="YES"
Step 5

Issue the command:

Code: Select all

cd /usr/local/etc/rc.d/domoticz start
(If you issue the command without start, you will get all other options.)

and go to your browser: http://<Your IP address>:8080

Screenshot_TrueNAS Domoticz.png
Screenshot_TrueNAS Domoticz.png (29.53 KiB) Viewed 1469 times
The first item, I configured were the "Motherboard Sensors".

Only one is available and that is Memory Usage with a negative value of -1%.
It gives also an error on the https port. But that is not so difficult to solve.

Screenshot_TrueNAS error.png
Screenshot_TrueNAS error.png (75.85 KiB) Viewed 1469 times

Also it does not give you the version number (except 2020.2), but I assume it is the most recent.
See: https://freebsd.pkgs.org/13/freebsd-arm ... 1.txz.html and
https://www.freshports.org/www/domoticz

Regards
User avatar
FireWizard
Posts: 1871
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Installing domoticz on Freenas

Post by FireWizard »

Hi,

To solve the problem Error: Webserver (SSL) follow the procedure as described in the Wiki.
See: https://www.domoticz.com/wiki/FreeBSD

Add to the file /etc/rc.conf beside the line
domoticz_enable="YES"
also the lines
domoticz_user="root"
domoticz_group="wheel"
Command:

Code: Select all

cd /etc
ee rc.conf
Screenshot_TrueNAS.png
Screenshot_TrueNAS.png (80.27 KiB) Viewed 1461 times

Regards
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest