[HOW TO] Install Domoticz on Odroid C4 (testcase)

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

Moderator: leecollings

User avatar
Didi
Posts: 15
Joined: Thursday 02 May 2019 21:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

[HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by Didi »

Odroid C4 Domoticz Setup Guide
Dear enthousiasts of Domoticz, since the rpi is getting almost impossible to get unless you have a fat wallet or can wait at least 1 year from now for the new batch will be available again lots of people are moving to different platforms. Since there is (in Netherlands) good stock available of the Odroid boards i started investigating in how to get things working. Google could not provide a manual on how to do it on a Odroid C4 and therefore it took me longer than i first wanted to get it working. Due to the fact, this manual for this specific purpose was nowhere to be found, till now, since i made it by my own and hope to help others here by sharing it with the community.

Here below i made 2 different ways to approach the setup with DietPi as the OS on the Odroid C4 SBC. The so called "Easy Way" is more to give you a quick possibility to test if you can get it running, with the least amount of work needed. There are a few downsides doing it this way, as noted below. I therefore recommend you to follow the custom way, because you will not have the known issues with Domoticz as used in "the easy way".
************ The Easy Way (TestCase) ************

NOTE: Not everything works the same with this way (Logs etc are used on a different way by DietPi) There is a workaround for it, but it needs a different approach and some more commands to set it up. Don't worry, that method could be found below.

Known Isseus / Undesired behavior
  • Log is not working as normally
  • Restart by the Domoticz menu results in: "Error: Error executing reboot command. returned: 256"
  • Reboot by the Domoticz menu is not possible
Installation OS and Configuration - The Easy Way
Assuming you already unpacked your Odroid and have and empty SD ready to flash with Linux OS.

Go to https://dietpi.com/#download, click on "Odroid" and select "Odroid C4/H4". Download the image (DietPi_OdroidC4-ARMv8-Bullseye.img) to your local PC and unpack the image. Open your own favorite Flash program (i use Balena Etcher) and flash the unpacked image to the empty SD card. Wait till it's finished, than insert the SD in the Odroid and connect the network cable to it. If you have a wireless network adapter for the odroid, now it's time to also plug it in. Also other devices like an Zigbee stick or a P1 meter can be connected now as well.

Power it up, search in your local network for the "DietPi" and it's local ip address. Use that ip adres to connect with your local PC trough PUTTY.
Login with user

Code: Select all

root
and password

Code: Select all

dietpi
Wait till it's booted (DietPi will ask you a few setup questions, like changing the software and users passwords, i recommend you do this). After this step, the DietPi starts up the "DietPi-Software" section. To configure the Odroid select DietPi-Config in the menu.

The minimal parts you need to setup are:
5: Regional Options > Timezone (pick your own Timezone)
6: Security Options > Hostname (Optional: Give the Odroid it's own name)
7: Network Options: Adapters > Wifi (Select your wifi adapter here, if you have one, else skip this step)

When the configurations are made, exit the config tool and reboot the Odroid.

Install Domoticz - The Easy Way
Login with root, enter your own password and start the software tool with the command:

Code: Select all

dietpi-software
Select "Browse Software" and mark "Python 3:Runtime system..." go down the list to the category Home Automation. Select "Domoticz" here and than select Confirm.

Continue to select Install. You will see an overview of the steps that are going to be progressed. Click "Ok" to continue. The DietPi OS is installing all the stuff needed to start-up Domoticz. When it's finished you can check it by pointing your browser to the ip of the Odroid followed by the port (http)

Code: Select all

8124 
or (https)

Code: Select all

8424
If everything worked, you should see the new installed Domoticz online.

Please test it for your your own needs and to see it working by yourself. As soon as i found out how to do this i made this tutorial to point others into the right direction.
************ The Custom way (Preferred Option)************

Installation OS and Configuration - The Custom Way
Format the SD in NTFS and go to https://dietpi.com/#download, click on "Odroid" and select "Odroid C4/H4". Download the image (DietPi_OdroidC4-ARMv8-Bullseye.img) to your local PC and unpack the image. Open your own favorite Flash program (i use Balena Etcher) and flash the unpacked image to the empty SD card. Wait till it's finished, than insert the SD in the Odroid and connect the network cable to it. If you have a wireless network adapter for the odroid, now it's time to also plug it in. Also other devices like an Zigbee stick or a P1 meter can be connected now as well.

Power it up, search in your local network for the "DietPi" and it's local ip address. Use that ip adres to connect with your local PC trough PUTTY.
Login with user

Code: Select all

root
and password

Code: Select all

dietpi
Wait till it's booted (DietPi will ask you a few setup questions, like changing the software and users passwords, i recommend you do this). After this step, the DietPi starts up the "DietPi-Software" section. To configure the Odroid select DietPi-Config in the menu.

The minimal parts you need to setup are:
5: Regional Options > Timezone (pick your own Timezone)
6: Security Options > Hostname (Optional: Give the Odroid it's own name)
7: Network Options: Adapters > Wifi (Select your wifi adapter here, if you have one, else skip this step)

When this is setup, as wanted, exit the config tool. This will bring you back to the DietPi-Software menu. Recommanded changes to make here are:
- Change SSH from "Dropbear" to "OpenSSH Server" (OpenSSH has support for SCP that makes transfer of files more easy)
- Change "DietPi-RAMlog" to "Full" (could increase wear on the SD, when using an eMMc module this could be resolved)

Go to "Browse Software" and select:
92 "Certbot: Obtain and re..."
130 "Python 3: Runtime system, pip...."

than confirm your selections and select Install, choose "Ok" and it's time for coffee. Wait till it's done and choose if you want to share anonymous statics to support the DietPi project. After that reboot the Odroid.

Add user for Domoticz - The Custom Way
Login with "root" and your own password to create a user for domoticz with the following command:

Code: Select all

adduser domoticz
Add this new user to the sudo group with the following command:

Code: Select all

usermod -aG sudo domoticz
Add the user to the permissions to use usb with the following command:

Code: Select all

usermod -a -G dialout domoticz
To test if it all works use the following command to login as the user domoticz:

Code: Select all

su - domoticz
Use the following command to test your sudo powers:

Code: Select all

sudo ls -la /root
When you see the files listed inside the root directory you can continue with the next steps but first reboot the Odroid with the command:

Code: Select all

sudo reboot now
Install and configure Domoticz - The Custom Way
Now login with the user "domoticz" and enter the following command:

Code: Select all

pwd
Be sure that the path you're on is /home/domoticz, we need to be in this location as the user domoticz to continue the next step.

Now we install Domoticz with the simple command:

Code: Select all

sudo bash -c "$(curl -sSfL https://install.domoticz.com)"
Configure the basics with http and https marked, choose your http portnumber followed by the https portnumber. The Installation Folder should be

Code: Select all

/home/domoticz/domoticz
If so continue with "Ok". Domoticz will now be installed inside the home folder of the domoticz user on the Odroid. We do this because that's how the system of DietPi works and it get's Domoticz working as it should, or as we're used to.

To check if everything went well point your browser to

Code: Select all

http://<Your.Odroid.IP>:<http-portnumber>
You now should see Domoticz running on the Odroid! To check if really everything worked go to the "About" section to check if it runs with the latest Python version (3.9 at the moment i write this document) and also check the "Log" to see if it works as it should.

Congratulations if you made it till here! You now have a Domoticz installation running on your Odroid C4 without the issues from the "Easy Way".

I really hope that my contributions help everybody who struggled with this and to give you all 2 methods of doing this. With the custom method (The preferred way) you get Domoticz working as we're used to with for instance the Raspberry Pi.

If this tutorial helped you i would really appreciate it when you leave a reply here below, it's Free you know ;) just like this tutorial!
If you found helpful tips, things that don't work with this method please share them also with an reply here below! I will try to reply with a solution if i have one.

Thanks and much love!
Main: RPI-5 / Zigbee / Sonoff / RFLink433 / Camera's / Wifi / Custom Interface / Alarm / GPS / MQTT / MiLight
User avatar
Didi
Posts: 15
Joined: Thursday 02 May 2019 21:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by Didi »

I now updated the complete tutorial to fit both methods. Have fun! :D
Main: RPI-5 / Zigbee / Sonoff / RFLink433 / Camera's / Wifi / Custom Interface / Alarm / GPS / MQTT / MiLight
User avatar
Sjonnie2017
Posts: 361
Joined: Wednesday 02 August 2017 19:43
Target OS: Linux
Domoticz version: Latest ß
Location: The Netherlands
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by Sjonnie2017 »

Great write up! Tx!

Method 3 (even easier :) ):

Install Ubuntu 22.04 Minimal from the Hardkernel site/wiki
Install docker
Install official Domoticz docker container.

Run and enjoy

(This is how I am going to use Domoticz when my Odroid M1 arrives ;) )
ConBee II - TRÅDFRI lights + switches, loads of ChingLing dimmers and switches, Heiman and Xiaomi sensors
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
User avatar
Didi
Posts: 15
Joined: Thursday 02 May 2019 21:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by Didi »

Sjonnie2017 wrote: Wednesday 11 January 2023 17:56 (This is how I am going to use Domoticz when my Odroid M1 arrives ;) )
Thnx for your reply, much appreciated! I hope it will go as easy as you say, thats what i thought also to do myself. But the C4 wouldn't accept the install, reason unknown.

Is the M1 coming soon?
Main: RPI-5 / Zigbee / Sonoff / RFLink433 / Camera's / Wifi / Custom Interface / Alarm / GPS / MQTT / MiLight
User avatar
Sjonnie2017
Posts: 361
Joined: Wednesday 02 August 2017 19:43
Target OS: Linux
Domoticz version: Latest ß
Location: The Netherlands
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by Sjonnie2017 »

The M1 is due to arrive this week. I had an issue with the one I got last week and had to do an RMA. I already have an NVME installed with Bullseye, docker and docker-compose installed ready to be placed. Once the new one has arrived I will install the Domoticz and Dashticz container with all necessary plug-ins. I will post the results back here in this thread.

EDIT: What install would the C4 not accept?
ConBee II - TRÅDFRI lights + switches, loads of ChingLing dimmers and switches, Heiman and Xiaomi sensors
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
User avatar
Didi
Posts: 15
Joined: Thursday 02 May 2019 21:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by Didi »

Sjonnie2017 wrote: Wednesday 11 January 2023 18:31 EDIT: What install would the C4 not accept?
In my, and other users, case it booted the images provided by hardkernel (Ubuntu Mate, Minimal and even the Android i tested) updating worked etc. But when tried to install domoticz it refused to run and after 2 days of almost non stop debugging i gave up with the method they suggested.

Trying a HA (Home Assistant) image for the Odroid C4, it booted up right away after i flashed that without any problems.

That made it my mission to find a way that works in my, and others cases.
Main: RPI-5 / Zigbee / Sonoff / RFLink433 / Camera's / Wifi / Custom Interface / Alarm / GPS / MQTT / MiLight
User avatar
Sjonnie2017
Posts: 361
Joined: Wednesday 02 August 2017 19:43
Target OS: Linux
Domoticz version: Latest ß
Location: The Netherlands
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by Sjonnie2017 »

So the install of Domoticz itself (not a container) failed. Have you tried the "Docker approach"?
ConBee II - TRÅDFRI lights + switches, loads of ChingLing dimmers and switches, Heiman and Xiaomi sensors
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
User avatar
Didi
Posts: 15
Joined: Thursday 02 May 2019 21:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by Didi »

Sjonnie2017 wrote: Wednesday 11 January 2023 18:58 So the install of Domoticz itself (not a container) failed. Have you tried the "Docker approach"?
The install did go through but it refused to run after that. This happend not only in my case but others also got this issue.

The docker way i didn't test cause i like to program it myself :D
Main: RPI-5 / Zigbee / Sonoff / RFLink433 / Camera's / Wifi / Custom Interface / Alarm / GPS / MQTT / MiLight
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by waltervl »

What is wrong with the method
  • install ubuntu
  • install Domoticz
Short and simple....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
Sjonnie2017
Posts: 361
Joined: Wednesday 02 August 2017 19:43
Target OS: Linux
Domoticz version: Latest ß
Location: The Netherlands
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by Sjonnie2017 »

waltervl wrote: Wednesday 11 January 2023 19:30 What is wrong with the method
  • install ubuntu
  • install Domoticz
Short and simple....
Because it's an Odroid based on a Rockchip maybe? ;)
ConBee II - TRÅDFRI lights + switches, loads of ChingLing dimmers and switches, Heiman and Xiaomi sensors
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by waltervl »

Sjonnie2017 wrote: Wednesday 11 January 2023 20:04
waltervl wrote: Wednesday 11 January 2023 19:30 What is wrong with the method
  • install ubuntu
  • install Domoticz
Short and simple....
Because it's an Odroid based on a Rockchip maybe? ;)
It is arm64, compatible with rpi4. Ubuntu available so what is the problem?
https://wiki.odroid.com/odroid-c4/getti ... roid-c4hc4

Edit: it is even on the Domoticz download page
Screenshot_20230111-205309-783~2.png
Screenshot_20230111-205309-783~2.png (174.87 KiB) Viewed 2496 times
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by Derik »

Try Armbian..
https://www.armbian.com/
Same pi user, evrythings works perfect... [ only i am the problem sometimes :-) ] no Linux noob here
Running for years om my xu4 and n2:
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
User avatar
Didi
Posts: 15
Joined: Thursday 02 May 2019 21:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by Didi »

waltervl wrote: Wednesday 11 January 2023 19:30 It is arm64, compatible with rpi4. Ubuntu available so what is the problem?
Can i ask you if you firmly tested this yourself on a Odroid C4? :?:
waltervl wrote: Wednesday 11 January 2023 19:30 Edit: it is even on the Domoticz download page
That does not mean it works on the Odroid C4 ;)
Main: RPI-5 / Zigbee / Sonoff / RFLink433 / Camera's / Wifi / Custom Interface / Alarm / GPS / MQTT / MiLight
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by waltervl »

No I did not test it, I do not have a Odroid C4. That is why I asked why this is not working. Did you test it?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by Derik »

Didi wrote: Wednesday 11 January 2023 21:10
waltervl wrote: Wednesday 11 January 2023 19:30 It is arm64, compatible with rpi4. Ubuntu available so what is the problem?
Can i ask you if you firmly tested this yourself on a Odroid C4? :?:
waltervl wrote: Wednesday 11 January 2023 19:30 Edit: it is even on the Domoticz download page
That does not mean it works on the Odroid C4 ;)

https://www.armbian.com/odroid-c4/
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
User avatar
Didi
Posts: 15
Joined: Thursday 02 May 2019 21:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by Didi »

waltervl wrote: Wednesday 11 January 2023 21:15 No I did not test it, I do not have a Odroid C4. That is why I asked why this is not working. Did you test it?
Yes, therefore i could make this tutorial because i did tested it myself on more than just one board.
Main: RPI-5 / Zigbee / Sonoff / RFLink433 / Camera's / Wifi / Custom Interface / Alarm / GPS / MQTT / MiLight
User avatar
Didi
Posts: 15
Joined: Thursday 02 May 2019 21:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by Didi »

Derik wrote: Wednesday 11 January 2023 21:07 Try Armbian..
https://www.armbian.com/
Same pi user, evrythings works perfect... [ only i am the problem sometimes :-) ] no Linux noob here
Running for years om my xu4 and n2:
So you did not tested it on a Odroid C4, and that's why you should read the title maybe a bit slower. This is especially for the C4 ;)

I'm an IT-engineer, no Noob here. :mrgreen:
Main: RPI-5 / Zigbee / Sonoff / RFLink433 / Camera's / Wifi / Custom Interface / Alarm / GPS / MQTT / MiLight
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by waltervl »

And why did you choose for DietPi instead of Ubuntu or other mainstream Linux version? Are those not running/installing easy on a Odroid C4?

And what went wrong when running Domoticz on Ubuntu on Odroid C4?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by waltervl »

waltervl wrote: Wednesday 11 January 2023 21:39 And why did you choose for DietPi instead of Ubuntu or other mainstream Linux version? Are those not running/installing easy on a Odroid C4?

And what went wrong when running Domoticz on Ubuntu on Odroid C4?
I see now you have added the easy install way (same as for the RPi instruction) as the custom but preferred way.

In the easy way no need to change configuration if port 8080/443 is sufficient as those are the default ports. So you can refer to the getting started wiki after install https://www.domoticz.com/wiki/Getting_started
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
Didi
Posts: 15
Joined: Thursday 02 May 2019 21:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: [HOW TO] Install Domoticz on Odroid C4 (testcase)

Post by Didi »

waltervl wrote: Wednesday 11 January 2023 21:39 And why did you choose for DietPi instead of Ubuntu or other mainstream Linux version? Are those not running/installing easy on a Odroid C4?
This was kind a funny how that went. I try to explain it as best as possible.

I installed and tested the following OS variants over the past days:

Ubuntu Mate 20.04 (Versions (20201214), (20201020), (20210907), (20220228))
Ubuntu Mate 22.04 (Version 20220713)
Ubuntu Minimal 20.04 (Versions (20201212), (20200526), (20210906), (20220228))
Ubuntu Minimal 22.04 (Version 20220705)


Manjaro ARM

XFCE image (https://forum.odroid.com/viewtopic.php?f=203&t=38897) Got this one working, but i don't wanted the desktop image so i started reading all the forums i could find about Domoticz on Odroid C4. On one of the forums the name "DietPi" came along and that sticked in my head somewhere. After i first tried DietPi OS it was such an relief to find out it worked almost similar, in some parts even better, than Raspbian OS with the Raspberry Pi (Where most users are coming from at this moment).
waltervl wrote: Wednesday 11 January 2023 21:39 And what went wrong when running Domoticz on Ubuntu on Odroid C4?
Lots of things where not working at all or Domoticz did not responded to json calls, http(s) calls, Log rotate did not worked, plugin installations where not going as explained in the Domoticz Wiki and so on.

Because i had a few days of time over, i tried as much possibility's as possible to find a way, most users, would like. Also i tried to keep it documented as much as possible as you can see in my response. I did not noted all, due to the solution was more important. :D
Main: RPI-5 / Zigbee / Sonoff / RFLink433 / Camera's / Wifi / Custom Interface / Alarm / GPS / MQTT / MiLight
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest