Since switching to version 3 of Jeedom, the image of the SD card of the home automation server is no longer available for download. Jeedom now installs on any Linux distribution based on Debian 8 using a script (like Domoticz for that matter). It will be possible to create a DIY home box by recycling an old PC windows, a Raspberry Pi 3 or an Orange Pi (follow this tutorial to install Jeedom on the SD card or the memory eMMC). It is also possible to update version 2 of Jeedom. For this tutorial, we will install Jeedom v3 on a Raspberry Pi 3 running under Raspbian Jessie with the Pixel desktop.
- 1 Basic configuration
- 2 Prepare the Raspbian SD card
- 3 Start the Raspberry Pi
- 4 Install Jeedom v3 from the script on Raspbian
- 5 Error SQLSTATE [HY000]  No such file or directory: problem with the MySQL database
If you go into the making of a Jeedom home box, here is a configuration based on Raspberry Pi 3 very well adapted.
|Raspberry Pi 3|
|Raspberry Pi 3 case|
|SD card8 Go SDHC Classe 10|
|5V – 2.5A power supply|
That is a budget of about €65.
Prepare the Raspbian SD card
If you are new to home automation and have just purchased a Raspberry Pi 3, the first thing to do is prepare the SD card for the operating system. Go to the official website of the foundation and download the image of the distribution Raspbian Jessie or Jessie Lite. The Lite version is lighter. It does not include a graphic desk (called Pixel) and no pre-installed software (web browser, messaging, office suite …).
For this tutorial, we will install Jeedom on a Raspberry Pi 3 running Raspbian Jessie with the Pixel desktop. Follow this tutorial to install Raspbian without a screen or keyboard.
After downloading the SD card image, use the Open Etcher software to install Raspbian on the SD card. Follow this guide that explains all the steps. Etcher is available on Windows, MacOS and Linux.
Start the Raspberry Pi
At the end of the operation, Etcher automatically ejects the SD card from the player. Insert it into the Raspberry Pi’s card reader and turn it on. At first boot, Raspbian takes care of extending the partition to occupy all available space on the SD card.
Configuring the keyboard
To set everything in French, open the Menu and then select Preferences -> Raspberry Pi Configuration and go to the Localization tab.
Click Set Local …
For example, choose fr (French) in front of Language and Fr (France) in front of Country
Your Pi must restart to take the changes into account.
Once restarted, open Menu -> Preferences -> Keyboard and Mouse
Go to the keyboard tab and click Keyboard Layout …
In the list that appears, choose below your country and look for the keyboard that is closest to yours in the Variant column.
Confirm. Your keyboard is now configured.
Configure WiFi and bluetooth
Bluetooth is enabled by default. There is nothing more to do.
To connect the Raspberry Pi to the WiFi network, click the network icon next to the time (in the upper-right corner of the screen). Select the network and enter the password in the window that appears.
Change password and enable SSH connection
Raspbian comes with a default password that could be used by hackers to access your home automation box. Read this article on the recently discovered Linux.MulDrop.14 Trojan. It is imperative to modify it. To do this, run the passwd command and follow the instructions.
To enable the SSH connection to install or update Jeedom and Raspbian from another computer (without the need for a keyboard and mouse for Raspberry Pi), simply go to the configuration. Follow this tutorial to learn how an SSH secure connection works.
Install Jeedom v3 from the script on Raspbian
Now that everything is ready, we can launch the installation of Jeedom. There is virtually nothing to do because it’s the script that will take care of everything. The procedure is detailed in the official documentation (point 5 – Other/DIY). Let’s take a few moments to analyze what the script will do. It is available on GitHub here.
The operation will take place in 11 steps:
- Step_1_upgrade: system update. This is the longest operation because Jeedom does an update and a dist-upgrade
- Step_2_mainpackage: installation of libraries
- Step_3_database: mysql installation and configuration. During this step, the password to the database will be displayed in the Terminal. It is a series of numbers and letters generated at random. Write it down. In case of a crash during the installation, it will allow you to easily resume it
- Step_4_apache: installing the apache web server
- Step_5_php: php installation
- Step_6_jeedom_download: downloads resources from Jeedom and decompresses the zip into /var/www/html
- Step_7_jeedom_customization: building the system
- Step_8_jeedom_configuration: Jeedom configuration. If the script has crashed before, the script will no longer be able to connect to the database because a new password will have been generated. The solution is given later in the article
- Step_9_jeedom_installation: run the php script install.php
- Step_10_jeedom_post: setting the cron table (scheduled executions)
- Step_11_jeedom_check: last check
Run these three commands to install Jeedom on your Orange Pi. The first command allows you to retrieve the installation script. We then render this script executable (chmod + x) before launching it.
chmod +x install.sh
The installation time will greatly depend on the speed of your internet connection and the state of your system. If it is already up to date, the first step (which is the longest) will be very fast.
Error SQLSTATE [HY000]  No such file or directory: problem with the MySQL database
Jeedom uses the MySQL Open Source database (also called MariaDB) to run. Even though in theory everything is installed and configured by the script, you may encounter this message after installation. The message SQLSTATE [HY000]  No such file or directory means that Jeedom can not connect to the database. You may also encounter this problem following an unexpected stop of Jeedom (a power cut, a Jeedom crash …). Can not describe all solutions. Check out the official forum here. For my part, I got the error message after installation. I do not know the exact cause but this is how I got away!
First, make sure the password generated by the script at the time of installation is secure. It is indicated by the script at the end of the installation in the ALL CECKS COMPLETE section. It is a unique identifier consisting of 15 alphanumeric characters generated automatically at the start of the script.
We start by uninstalling MySQL from the system
sudo apt-get purge mysql-server
Then all the contents of the directory
sudo rm -rf /var/lib/mysql
Finally, we install MySQL
sudo apt-get install mysql-server
During installation, a window will pop up to ask you for the root password. Paste the password generated by the script previously. Nothing prohibits you from using another password. This should be reported to the Jeedom installation script immediately afterwards.
Obviously, uninstalling and re-installing MySQL is not without consequences on Jeedom. If you refresh the web browser, you will get the following error message
SQLSTATE[HY000]  Access denied for user 'jeedom'@'localhost' (using password: YES)
It will be necessary to “replay” the installation script to put everything back in order. As you noted the password (and re-installed MySQL with the same), run this command
sudo ./install.sh -m MYSQL_PASSWORD
Since the system is already up-to-date and all resources have been downloaded, it takes only a few minutes.
And here you can start to configure your DIY Jeedom v3 100% DIY box! Open Jeedom by entering the IP address of the Raspberry PI from any computer or tablet in the local network.
- Weather station with ePaper display (Dashboard) for Jeedom on Raspberry Pi (via the JSON RPC API)
- Install Jeedom v3 from the installation script on Raspberry Pi 3 (or Linux Debian 8 PC)
- Driving the ESP8266 GPIO (Web Server) from Jeedom to TCP / IP Wireless – Part 2
- ESP8266 (Web Client): Sending Data to Jeedom in TCP / IP Wireless (JSON API) – Part 1
- Install Jeedom on an Orange Pi Lite (or Orange Pi+ 2e) running under Armbian Jessie
- Jeedom + MQTT: associate a connected object DIY with the Dashboard