Forums

Resolved
0 votes
Domoticz 2022.1 is now possible to install in ClearOS 7.

EDIT April 13th 2022:
Thanks to some work from Nick, Domoticz 2022.1-4 is now available in clearos-contribs-testing. If you are eager to update from earlier versions you can do this from command line with the following command:
yum update --enable-repo=clearos-contribs-testing domoticz
. Compared with the "manual build" described below there are no changes except for the minor version bump. I will test it myself for a week now, and if everything looks OK I will ask Nick to move it to clearos-contribs in about a week, and then all standard ClearOS installations that has Domoticz installed should be automatically updated.

/Fred

OLD ORIGINAL POST (now obsolete):

But, things are not as smooth as they should be unfortunately. The koji build system does not want to play along, and Nick has a bit of a backlog to handle which has higher priority. So for now, the only thing I can do is to offer those of you who like to use the latest stable version of Domoticz is an fairly detailed description on how you can build the package yourself.

Hopefully Nick will have some time next month to look into the koji issue and fix it. In such case the instruction below is no longer needed. The instructions should be easy to follow even for someone that is not used to compile linux programs.

------------------------------
My recommendation is that unless you already have a ClearOS developer environment setup that you will create a virtual machine on your normal PC or laptop, dedicated for just building this package (and any other ClearOS application it that is the case). If you are running Windows, Oracles VirtualBox is a good alternative and that is what I have used in the example below:

On your PC/Laptop download the ClearOS installation iso: ClearOS-DVD-x86_64.iso

In Oracle VM Virutual Box:
Create new virtual machine, use the following settings:
Type: Linux
Version: Other Linux 64-bit
Memory: 4096MB (or more)
Storage size: Dynamic or Fixed at 8GB (minimum)
Go to settings and adjust number of processors to maximum of the green indicator
Under storage: "Attach" your downloaded ClearOS iso file to the virtual optical drive
Under Network I prefer to use "Bridged Adapter" which will give your virtual machine an IP address on your normal DHCP LAN so you easily can ssh to it later on etc.
Choose OK. Double click the new virtual machine to start it up. Select "Install ClearOS"

Set language, keyboard, minimal install, select harddrive, start the network adapter (make sure it gets an IP address).
Begin installation
Set root password
After the installation finish, reboot
Connect to your machine on the IP address you can see with a web browser. Please note that you connect to port 81 (for instance https://192.168.0.10:81)
Config:
Private Server Mode
Community edition is fine for this build-machine
Register the machine with your account at Clear
If it suggest you should update any package, do it.
Do not install any apps (for now at least), select "Skip Wizard"

Now, open a ssh terminal on your host computer or any other computer on your LAN (Putty is a good program on Windows) and connect to your build machine.
Login with user "root" and your admin password you defined in the installation process.
type the following commands:
yum update
reboot

your ssh connection will now be lost. After that the virtual machine is up and running again connect again with your ssh terminal
yum-config-manager --enable clearos-developer
yum upgrade
yum install clearos-devel app-devel vim-enhanced
clearos setup

Enter your "normal" user-id that you want to use when you are working with the building machine
Now, let the root-ssh window be aside for a while and open another ssh login.

Login to your machine as the developer (non-root) user you configured in the clearos setup.
download the domoticz package from my github account:
git clone https://github.com/FredrikFornstad/domoticz-clearos.git

Prepare a build directory, if you already have it since before, make sure it is empty:
mkdir rpmbuild
cd rpmbuild
mkdir SOURCES
mkdir SPECS

copy the files into place:
cp ../domoticz-clearos/* SOURCES/
mv SOURCES/domoticz.spec SPECS/

download some other needed source files:
yum install python3-devel
cd SOURCES
grep -oh " http.*" sources.download | xargs -n1 wget

Now all needed files should be in place and you should be able to start building. Note the mock command can easily take more than one hour to execute depending on your CPU.
cd ../SPECS
rpmbuild -bs domoticz.spec
cd ../SRPMS
mock domoticz*

You now should have the domoticz rpm file available at: /var/lib/mock/clearos-7-x86_64/result/domoticz-2022.1-2.v7.x86_64.rpm

copy your domoticz installation file to the machine(s) where you want to install it. (Depending on transfer method you need to install ftp, samba etc on your build-machine)

For instance, from the web-interface you can access the Marketplace and install "Flexshares" and "Windows Networking(Samba)" and then use LDAP and "simple server". Then you need to add a user, my suggestion is to use the same name and password as you configured for the development user earlier. I tend to remember that the developer account should be setup before activating LDAP, so that is why I skiped to install these apps at the installation of the ClearOS operating system. However, I could be wrong.

When you have transfered to domoticz rpm file it is time to shut down the build-machine:
from the "root" ssh window to your build-machine, type "poweroff" to shut it down.

------------
On the machine where you want to install/update domoticz do the following:

login as root (command console, not the webinterface)
make sure you have your domoticz rpm file you have built in the same directory where you are.
yum localinstall domoticz-2022.1-2.v7.x86_64.rpm

Done!
Saturday, March 26 2022, 05:11 PM
Share this post:
Responses (10)
  • Accepted Answer

    Wednesday, April 13 2022, 06:26 PM - #Permalink
    Resolved
    0 votes
    Fred, Nick,

    On my VMware test setup i've made a clean install of v2021 and did a update to 2022.
    All went smooth and looks like it is working.
    SInce i've already made build of 2022 on my production server i'll not installed the package from the repos.

    This is the output of the update on my VMware testserver for reference

    ============================================================================================================================================================================================================
    Package Arch Versie Repository Grootte
    ============================================================================================================================================================================================================
    Bijwerken:
    domoticz x86_64 2022.1-4.v7 clearos-contribs-testing 11 M
    Installeren vanwege afhankelijkheden:
    python3-devel x86_64 3.6.8-18.el7 clearos-centos-verified 217 k
    python3-rpm-generators noarch 6-2.el7 clearos-centos-verified 20 k
    python3-rpm-macros noarch 3-34.el7 clearos-centos-verified 8.1 k

    Transactie Samenvatting
    ============================================================================================================================================================================================================
    Installeren ( 3 Afhankelijke pakketten)


    Thanks both of you for the effort !
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, April 12 2022, 04:16 PM - #Permalink
    Resolved
    0 votes
    Fredrik Fornstad wrote:

    Nick Howitt wrote:

    It was not with the correct options so I've manually tagged it into clearos-contribs-testing. Hopefully it will build correctly next time without the manual tagging. I can't test until there is a version bump.

    .
    Just to double check: Was it my spec file that you needed to tweak or was it Koji? If it was the Domoticz spec file (or any of the source files), then I rather do the change myself too, bump the revision and upload a new version...

    /Fred
    Koji only. It built from what you committed to the repo unaltered.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, April 12 2022, 03:53 PM - #Permalink
    Resolved
    0 votes
    Nick Howitt wrote:

    It was not with the correct options so I've manually tagged it into clearos-contribs-testing. Hopefully it will build correctly next time without the manual tagging. I can't test until there is a version bump.

    .
    Just to double check: Was it my spec file that you needed to tweak or was it Koji? If it was the Domoticz spec file (or any of the source files), then I rather do the change myself too, bump the revision and upload a new version...

    /Fred
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, April 12 2022, 02:56 PM - #Permalink
    Resolved
    0 votes
    I've played around a bit with koji and got domoticz to build. It was not with the correct options so I've manually tagged it into clearos-contribs-testing. Hopefully it will build correctly next time without the manual tagging. I can't test until there is a version bump.

    I will always have to be contacted to get the package to build in koji in the first place but otherwise I hope it will be OK.

    If you can, please test the build and I can then release it.
    Like
    1
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, April 02 2022, 01:13 PM - #Permalink
    Resolved
    0 votes
    Hi Fred,

    I've installed today the Domoticz build on my production server and everything is running well.
    Thanks for the clear instruction and support
    I hope that Koji will work again next time, but this is also working

    Thanks again !
    The reply is currently minimized Show
  • Accepted Answer

    Monday, March 28 2022, 07:44 PM - #Permalink
    Resolved
    0 votes
    That was a lot of python packages you pulled in... I think it was only the python3-devel that you actually needed.

    OK, I have now made a domoticz-2022.1-3 release. The only change is that at installation time it now will make sure python3 (incl python3-devel) is installed instead of python34. python3 defaults to 3.6, so it will mean that domoticz now should run python 3.6 even on a complete new system instead of 3.4.

    Since you have already installed python 3.6 (among other) in your system, there is no need to update.

    If you do want to update anyway, you either follow the original build instructions (for a new build-machine), or if you still have your build-machine around you can do this on it:

    cd domoticz-clearos
    git pull
    cd ../rpmbuild
    cp ../domoticz-clearos/* SOURCES/
    mv SOURCES/domoticz.spec SPECS/
    cd SPECS
    rm ../SRPMS/domoticz*
    rpmbuild -bs domoticz.spec
    cd ../SRPMS
    mock domoticz*

    After an hour or so the resulting file will be in /var/lib/mock/clearos-7-x86_64/

    copy the domoticz-2022.1-3.v7.x86_64.rpm file to the ClearOS machine where you want domoticz installed and on that machine (as root) type:
    yum localinstall domoticz-2022.1-3.v7.x86_64.rpm
    The reply is currently minimized Show
  • Accepted Answer

    Monday, March 28 2022, 05:39 PM - #Permalink
    Resolved
    0 votes
    Fredrik Fornstad wrote:

    Patrick,
    In ClearOS/Centos there is no package called libpython3 to my knowledge, instead I think you mean python3-libs...
    Anyway, I will likely update my instruction above to do
    yum install python3-devel
    in the build machine before doing the rpmbuild -bs domoticz.spec command. I am not sure if it is needed, but it will at least take care of an error message. Also, I will try to update the spec-file itself to make sure python 3.6 is installed together with domoticz.

    Expect a domoticz-2022.1-3 update in a day or so.

    /Fred


    I did :
    yum install libpython3.*

    And these package were then installed.


    Mar 27 18:15:53 Installed: rh-python38-runtime-2.0-4.el7.x86_64
    Mar 27 18:15:53 Installed: 1:tk-8.5.13-6.el7.x86_64
    Mar 27 18:15:54 Installed: rh-python35-runtime-2.0-2.el7.x86_64
    Mar 27 18:15:55 Installed: rh-python36-runtime-2.0-1.el7.x86_64
    Mar 27 18:15:58 Installed: rh-python35-python-libs-3.5.1-13.el7.x86_64
    Mar 27 18:15:58 Installed: rh-python35-python-3.5.1-13.el7.x86_64
    Mar 27 18:15:58 Installed: rh-python35-python-setuptools-18.0.1-2.el7.noarch
    Mar 27 18:15:58 Installed: rh-python35-python-pip-7.1.0-2.el7.noarch
    Mar 27 18:15:58 Installed: rh-python35-python-tkinter-3.5.1-13.el7.x86_64
    Mar 27 18:15:59 Installed: rh-python35-python-tools-3.5.1-13.el7.x86_64
    Mar 27 18:15:59 Installed: python34-tkinter-3.4.10-8.el7.x86_64
    Mar 27 18:15:59 Installed: python34-tools-3.4.10-8.el7.x86_64
    Mar 27 18:15:59 Installed: python3-tkinter-3.6.8-18.el7.x86_64
    Mar 27 18:15:59 Installed: python3-idle-3.6.8-18.el7.x86_64
    Mar 27 18:16:01 Installed: python34-test-3.4.10-8.el7.x86_64
    Mar 27 18:16:04 Installed: rh-python35-python-test-3.5.1-13.el7.x86_64
    Mar 27 18:16:05 Installed: rh-python36-python-pip-9.0.1-5.el7.noarch
    Mar 27 18:16:08 Installed: rh-python36-python-libs-3.6.12-1.el7.x86_64
    Mar 27 18:16:08 Installed: rh-python36-python-3.6.12-1.el7.x86_64
    Mar 27 18:16:08 Installed: rh-python36-python-setuptools-36.5.0-1.el7.noarch
    Mar 27 18:16:08 Installed: rh-python36-python-tkinter-3.6.12-1.el7.x86_64
    Mar 27 18:16:09 Installed: rh-python36-python-tools-3.6.12-1.el7.x86_64
    Mar 27 18:16:12 Installed: rh-python36-python-test-3.6.12-1.el7.x86_64
    Mar 27 18:16:12 Installed: rh-python38-python-setuptools-wheel-41.6.0-7.el7.noarch
    Mar 27 18:16:12 Installed: rh-python38-python-pip-wheel-19.3.1-2.el7.noarch
    Mar 27 18:16:12 Installed: rh-python38-python-setuptools-41.6.0-7.el7.noarch
    Mar 27 18:16:12 Installed: rh-python38-python-3.8.11-2.el7.x86_64
    Mar 27 18:16:15 Installed: rh-python38-python-libs-3.8.11-2.el7.x86_64
    Mar 27 18:16:15 Installed: rh-python38-python-tkinter-3.8.11-2.el7.x86_64
    Mar 27 18:16:16 Installed: rh-python38-python-idle-3.8.11-2.el7.x86_64
    Mar 27 18:16:20 Installed: rh-python38-python-test-3.8.11-2.el7.x86_64
    Mar 27 18:16:20 Installed: rh-python38-python-rpm-macros-3.8.11-2.el7.noarch
    Mar 27 18:16:20 Installed: python3-rpm-macros-3-34.el7.noarch
    Mar 27 18:16:20 Installed: xml-common-0.6.3-39.el7.noarch
    Mar 27 18:16:20 Installed: iso-codes-3.46-2.el7.noarch
    Mar 27 18:16:20 Installed: scl-utils-build-20130529-19.el7.x86_64
    Mar 27 18:16:21 Installed: rh-python38-python-devel-3.8.11-2.el7.x86_64
    Mar 27 18:16:21 Installed: rh-python35-python-devel-3.5.1-13.el7.x86_64
    Mar 27 18:16:21 Installed: rh-python36-python-devel-3.6.12-1.el7.x86_64
    Mar 27 18:16:24 Installed: python3-test-3.6.8-18.el7.x86_64
    Mar 27 18:16:24 Installed: python3-rpm-generators-6-2.el7.noarch
    Mar 27 18:16:24 Installed: python3-devel-3.6.8-18.el7.x86_64
    Mar 27 18:16:24 Installed: python3-debug-3.6.8-18.el7.x86_64
    Mar 27 18:16:25 Installed: rh-python36-python-debug-3.6.12-1.el7.x86_64
    Mar 27 18:16:25 Installed: rh-python35-python-debug-3.5.1-13.el7.x86_64
    Mar 27 18:16:26 Installed: rh-python38-python-debug-3.8.11-2.el7.x86_64
    Mar 27 18:16:26 Installed: python34-debug-3.4.10-8.el7.x86_64


    Fredrik Fornstad wrote:
    Expect a domoticz-2022.1-3 update in a day or so.


    Will there be a change in the build or is it just a cosmetic update ?
    The reply is currently minimized Show
  • Accepted Answer

    Monday, March 28 2022, 05:27 PM - #Permalink
    Resolved
    0 votes
    Patrick,
    In ClearOS/Centos there is no package called libpython3 to my knowledge, instead I think you mean python3-libs...
    Anyway, I will likely update my instruction above to do
    yum install python3-devel
    in the build machine before doing the rpmbuild -bs domoticz.spec command. I am not sure if it is needed, but it will at least take care of an error message. Also, I will try to update the spec-file itself to make sure python 3.6 is installed together with domoticz.

    Expect a domoticz-2022.1-3 update in a day or so.

    /Fred
    Like
    1
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, March 27 2022, 04:12 PM - #Permalink
    Resolved
    0 votes
    Hi Fred

    I managed to build an rpm version and get Domoticz running on a VMware
    Only Domoticz runs on Python 3.4 instead of 3.6.
    Both versions of Python are installed and when I do Python --version I get " version 3.6.8"

    Now do I aso have a spare server with a copy of an old ClearOS with Domoticz 2021.1 installed.
    If I do the update, I just get Domoticz running on Python 3.6.

    Now I don't remember if I ever updated anything on this, but do you know if I can get VMware (fresh install) to also run Domoticz with Python 3.6?

    ---------- UPDATE ----------

    Found it!

    You need to install libpython
    yum install libpython3.*
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, March 27 2022, 10:07 AM - #Permalink
    Resolved
    0 votes
    Hi Fred,

    Many thank you the explanation and works for this.
    I'm trying it out now.
    Below i've added a small markup in which i ran into following your instaction
    If i've more i'll post it


    Fredrik Fornstad wrote:

    Domoticz 2022.1 is now possible to install in ClearOS 7.


    Enter your "normal" user-id that you want to use when you are working with the building machine
    Now, let the root-ssh window be aside for a while and open another ssh login.

    Login to your machine as the developer (non-root) user you configured in the clearos setup.
    download the domoticz package from my github account:


    Small add-on.

    You need to have the app " Shell Extension" installed from marketplace
    https:/xxx.xxx.xxx.xxx/app/marketplace/view/shell_extension_core

    After installing the app go to user acocunt and set for the non-root user
    login shell to : /bin/bash
    The reply is currently minimized Show
Your Reply