My Community Dashboard

  • Fredrik Fornstad
    Fredrik Fornstad started a new discussion, Domoticz 2022.1

    Domoticz 2022.1

    Domoticz 2022.1 is now possible to install in ClearOS 7.

    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:


    your ssh connection will now be lost. After that the virtual machine is up and running again connect again with your ssh terminal


    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:

    Prepare a build directory, if you already have it since before, make sure it is empty:

    copy the files into place:

    download some other needed source files:

    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.

    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.

    Done!