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
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
Code: Select all
dietpi
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
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
Code: Select all
8424
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
Code: Select all
dietpi
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
Code: Select all
usermod -aG sudo domoticz
Code: Select all
usermod -a -G dialout domoticz
Code: Select all
su - domoticz
Code: Select all
sudo ls -la /root
Code: Select all
sudo reboot now
Now login with the user "domoticz" and enter the following command:
Code: Select all
pwd
Now we install Domoticz with the simple command:
Code: Select all
sudo bash -c "$(curl -sSfL https://install.domoticz.com)"
Code: Select all
/home/domoticz/domoticz
To check if everything went well point your browser to
Code: Select all
http://<Your.Odroid.IP>:<http-portnumber>
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!