Migration from jeedom to home-assistant – Part 1 – Installation and configuration

In this first article, I will details the installation and configuration of my home-assistant

Try new material

My new MiniPC come with Windows pre-installed. So I launch it on the VERY VERY long process to configure windows 11… Thirtheen pop-up later, I can used my new material. But I will not keep Windows, nope 🙂

So … my first thing was to installed passmark to compare with others materials

PriceRatingCPU2D Graph3D GraphMem.DiskInfo
RockPi Radxa X4178$14355801
MLLSE G2 PRO120$13665978459103918582989500 Gio M2 SSD
RPi 5125$22551244

https://www.passmark.com/baselines/V11/display.php?id=312299225025

RockPi Radxa X4 test : https://nashraj.com/radxa-x4-review-an-n100-raspberry-pi-alternative/

Zigbee USB key

Long time ago, I buyed a ConBee II – zigbee key. It’s still supported by the ZHA integration but is not recommanded. Well, at least, it’s supported 🙂

I know I need to prepare to have the latest Zigbee firmware. Not difficult but as the process is more easy on windows, I decide to do it before delete everything on the miniPC.

By the way, I connect the zigbee key with a usb cable. As I know, it will reduce noise on antenna reception.

Install Home-Assistant

As the CPU is a Intel n150, it’s a X86-64 processor. Home-assistant have a good tutorial that you must follow:

https://www.home-assistant.io/installation/generic-x86-64

Nothing more to say. Run H-A installation process. Search after that for the IP (fixed it if possible)

Create first admin user etc. Success, it’s working 🙂

Hardware advanced configuration

Before installed the miniPC on my “server” area, I do some modification on its BIOS ; I set

  • wake-up-lan support (can be important)
  • Change power return from S5 to S0 – when electricity goes off on my house and then return, I don’t want to press a button to start home-assistant.

The BIOS was not the most friendly I have used. Old blue bios fashion.. But at least, there is one!

URL redirection

As I have a lot of docker, server etc. I used a Caddy to keep my website on https and have all redirection on one side – and my SSO.

So, as I don’t like to remember the home-assistant IP, I created a new subdomain and configure it from my caddy Docker, and add URL redirection in parameter.

Seems simple …

Then I update my Caddy params, try to launch with the URL and …

YEP : that’s my first failed (of a long series :D)

After a long search I launch ChatGPT that say

It’s a normal behaviour : you need to modify the default configuration.yaml and add a section to indicate that your server is a trust proxy to authorize this redirection. As example, if your Caddy server is set on ip 192.168.0.1

http:
  use_x_forwarded_for: true
  trusted_proxies: 192.168.0.1

NO. Sorry, ChatGPT, but NO. It’s not a normal behaviour that something as simple as a redirection that I declare in settings would implies to modify a file that I don’t ever know exists. I have used a lot of docker, install a lot of services and that’s barely the less friendly configure method for it.

Anyway : to modify this configuration.yaml… You need to access it.

And, no, you cannot access it directly from interface, there is no SMB protocol nor SFTP preconfigured on H-A and you cannot connect to SSH by default. I know because I try and failed… So what’s the good method ? Install an add-on for a protocol or install Studio Code Server to directly access it from your browser.

Install add-on Studio Code Server

Go to settings, add-ons, search for Studio Code Server, install it, run it if necessary, wait a minute and then click the open button. It’s barely Visual Studio Code Server that is configured to directly open all yaml files. It has autocompletion activated to be fully compliant with Home-Assistant.

So… I modify configuration.yaml with the code AND my IP. Then reload all integrations

And success!

First integrations installation

I try to add “simple integrations” : moon, sun and see what it’s look’s like.

Well by default, Home-Assistant create a home-page and add all elements to it. It’s not the best view possible, but it’s working. I will have to modify it later

Configure home-assistant on smartphone

I installed the official apps on iOS (iPhone) and android (Samsung S23).

Configuration was easy for the two and work pretty well.

And the good news is a I have a working redirection, it worked at home and away, it have direct notification mechanism and the default home-page with widget is working without needs to configure it.

Conclusion

In conclusion, I can now compare the home-assistant to my old jeedom installation process (remember that I bought a jeedom Luna)

Jeedom installation process is easily more user friendly ; I added my redirection without the needs to modify some “configuration file” ; One point for Jeedom.

Home-assistant can manage a “default” page that add your sensor / integrations automatically. Even if this is not the best view of the world, it’s pretty clear. One point for H-A.

Home-assistant on smartphone is wayyyyy better than the offical jeedom app. On jeedom you must configure individually each sensor / entries before viewing it… you’ll need a lot to to configure. Two points for H-A.

Migration from jeedom to home-assistant – Introduction

I know, I know… It has been a LONG time you don’t see me on this blog 🙂

But I think it’s time to keep some documentations on my big 2025 attempt.

I have been a long long time users for jeedom. But, time after time, release after release, some of my older plugins needs a lot of care, some manual corrections as the principal developer disapeared (MelCloud, …), some of my user scripts needs some reworks due to API change (Todoist …). And, last but not least, my old jeedom luna where not running well (errors in log).

Time to change.

First thing first : I need to choose a new material.

I have a personal NAS, a dedicated seedbox and a freebox that all can runs Docker (I have a lot in each one). But, in my opinion, as this is the main assistant, it should run on a specific hardware to coordinate all my materials, tasks.

I choose to run my new on a new miniPC : it cost barely the same as a RPI5, but with A LOT of more power. 12GB of DDR, TWO ethernet that can be run on linux (really important), WiFi 5.0 (… it should have been better, I know). 512G of SSD that can be changed if necessary. It runs well, it’s REALLY tiny. So far so good.

Second point : what to run on it

Now that I have the power, I need to choose what to run on it.

I still have two possibilities : run jeedom and migrate on it. OR, and it’s a big change, migrate to jeedom.

Migration is always a risk :

  • I have A LOT of scenarios ( >= 100) and a lot of usage…
    • Like : automatic wake-up routine based on personal calendar of each person, automate swimming pool, automate task creation for washing machine, dishwasher, automate alert message and notification in case of error.
  • I have a LOG of plugins, (20).
  • I have a lot of sensors (> 100); 80 zigbee elements (power, LED, thermosensor, etc.), 5 netatmo sensors, 15 Wi-Fi appliances
  • Some personal scripts to used TodoIst, Google Calendar, Tapo cameras
  • Over the time, I have done a lot of optimisation to run all those things on my Jeedom luna (scenarios and mode to enabled/disabled scenarios only when they can run it,..)
  • I try to have a lot of proactive scenarios ; Proactive in the fact that it sends useful informations to users when they need it. But as a lot of them used my scripts, then, keeping them to run correctly was A LOT of work.
  • Example : I have a scenario that can analyse my calendar, see where I have to go and verify if my cars as enough power and if it’s barely not enough, inform me that I need to plug the car. Ford rewrote their API. Google Calendar change it…

But as I wrote in introduction : with time, it needs me a lot of work. And I think it was time to (re)try & learn Home-Assistant : so here we are.

Time to migrate

So in the next weeks I will wrote some articles about what I’ve try, what I’ve learn, my mistake and my successes.

See you later folks!

Contrôleur bandeau LED WiFi Magic Home Pro et Jeedom

Suite à un achat pour ajouter une lumière décorative à un bureau, j’en ai profité pour commander un contrôleur WiFi de bandeau LED. Celui-ci (chinois…) fonctionne avec l’application MagicHomePro.

Ce type de contrôleur est géré dans Home-Assistant via une librairie python “flux_led”. A priori, cela serait également géré par un plugin jeedom WiFilightV2 (payant). Mais impossible de savoir avant s’il est bien géré car le plugin ne gère que les contrôleurs RGBW/RGBWW. Evidemment, le mien n’est que RGB…

Installation préalable et configuration hors jeedom

  1. Installer le bandeau LED physiquement, faire le collage, les pliages éventuels
  2. Configurer le contrôleur de bandeau LED avec l’application Magic Home PRO. Le mode local est suffisant.
  3. Fixer l’adresse IP du contrôleur de bandeau LED dans votre routeur.

J’ai l’avantage d’avoir un routeur sous openwrt. J’ai donc décider de donner un nommage fixe à mon bandeau led, cela me sera utile plus tard. Mon bandeau led est nommé “bandeau-led-1.lan“. Si ce n’est pas le cas, pensez bien à noter l’adresse IP de votre (vos) bandeaux leds.

Configuration jeedom

Se connecter sur jeedom via ssh (puTTy, mobaxterm) pour installer les modules python3 flux_led et webcolors.

sudo pip3 install flux_led
sudo pip3 install webcolors

On en profite pour tester l’allumage (-1) et l’extinction du bandeau led (-0) via la ligne de commande. C’est une étape indispensable, si cela ne fonctionne pas, impossible de contrôler votre bandeau avec jeedom…

flux_led bandeau-led-1.lan -1
flux_led bandeau-led-1.lan -0

Voir l’aide de flux_led pour les autres paramètres éventuels

Par exemple, on peut une fonction de changement de couleur (en rouge)

flux_led bandeau-led-1.lan -c "#FF0000"

En l’état actuel on peut déjà utiliser le plugin script pour exécuter les commandes On / Off, et changement de couleur.

Pour cela, depuis le plugin script on crée un nouvel équipement, et dans l’onglet commandes on crée 3 commandes distinctes de type script

  • Une commande action “On” avec la requête flux_led bandeau-led-1.lan -1
  • Une commande action “Off avec la requête flux_led bandeau-led-1.lan -0
  • Une commande action “Color” de type action/couleur avec la commande flux_led bandeau-led-1.lan -c “#color#”

C’est pas mal… Mais il nous manque un retour d’état. Et mauvais point de flux_led, il n’y a pas de commande dans flux_led pour renvoyer l’état…

Mais après tout, comme on a commencé à faire un script, il est temps de passer au niveau 2 : on va créer notre propre script python en faisant appel aux classes de flux_led.

Script de retour d’état

Pour créer un script depuis jeedom, rien de plus simple. On crée une nouvelle commande (Etat) depuis l’équipement de type script info / numérique. Oui, numérique, impossible d’utiliser le retour binaire dans Jeedom… Dans la partie requête on clique sur l’icône verte “nouveau”. J’ai nommé mon script valueBandeau.py mais vous pouvez l’appeler comme bon vous semble.

Voilà un exemple de script. Il n’est pas super propre, il faudrait encadrer l’appel à WifiLedBulb avec un try catch et une gestion des erreurs pour renvoyer autre chose… bref… Le script est assez simple, et prend un seul paramètre : l’adresse IP ou nom

!/usr/bin/env python3
 from flux_led import *
 from argparse import ArgumentParser
 def main():
         parser = ArgumentParser(description='Return status of a WiFi LED controler.')
         parser.add_argument('ip',help='IP of WiFi LED controler')
         args = parser.parse_args()
         bulb1 = WifiLedBulb(args.ip)
         bulb1Status = bulb1.isOn()
         if bulb1.isOn():
                 print("1")
         else:
                 print("0")
 if name == 'main':
         main()

Une fois le script sauvegardé, il faut ajouter l’adresse IP ou nom DSLAN en paramètre.

Dans mon cas, cet appel est :

/var/www/html/plugins/script/data/valueBandeau.py bandeau-led-1.lan

Reste ensuite à mettre en place la partie widget. Mais je vous laisse faire ce que vous voulez. Exemple chez moi :

Et voilà, un bandeau LED intégré pour quelques heures de travail.

Xiaomi thermomètre Mija bluetooth LYWSD03 dans jeedom

Suite à une promotion récente dans dealabs je me suis commandé plusieurs petits thermomètres LYWSD03. (Lot de 4 Thermomètres connectés Xiaomi Mijia Bluetooth 2 hygromètre – Dealabs.com)

en vrai ils sont minuscules 😉

Ces thermomètres bluetooth sont très bien gérés dans home assistant et je pensais naïvement que c’était également le cas dans jeedom, vu qu’ils étaient présents dans la Documentation Jeedom. Et même dans le documentation de compatibilité, aucune précision 🙁 Jeedom compatibility

Alors oui, cela fonctionne mais au bout de quelques heures… plus rien. Et la batterie fond comme neige au soleil. C’est de saison…

Heureusement, certains utilisateurs de jeedom ont résolus le problème 🙂

Ces thermomètres utilisent un système de chiffrement avec une clé définie lors de l’appairage à l’application Xiaomi Home.

La méthode pour rajouter (proprement) les LYWSD03 dans Jeedom et de récupérer la clé d’appairage (bind key) via ce flasher web… Si votre PC a une clé bluetooth évidemment.

Telink Flasher (atc1441.github.io)

Dans cette fenêtre, il faut cliquer sur le bouton connect, puis sélectionner l’équipement bluetooth à relier; Ensuite il faut cliquer sur le bouton “Do activation”. La clé qui nous intéresse sera dans le champ “Mi Bind Key”

Attention, cette clé change à chaque activation. Une fois la clé récupérée, il faut donc “déconnecter” le thermomètre de la page. Le plus simple, faire CTRL+”F5″ pour recharger la page. Si vous avez plusieurs thermomètres, il faut refaire la manipulation en sélectionnant le bon thermomètre.

Une fois ceci fait, il faut aller modifier dans la partie bluetooth de jeedom sur la machine principale. Il faut se connecter en SSH à la machine hébergeant jeedom (Depuis windows : puTTY, mobaxterm).

sudo pip3 install pycryptodomex
cd /var/www/html/plugins/blea/resources/blead/devices/
sudo mv lywsd03.py lywsd03.py.old
sudo cv lywsd03.py_with_bindkey lywsd03.py
sudo nano lywsd03.py

On modifie alors la variable keys en associant chacune des MACS bluetooth avec sa clé d’appairage. La casse de l’adresse MAC n’est pas importante.

MAIS MAIS ce n’est pas fini. Si on a plusieurs antennes bluetooth, il faut réaliser une opération sur chacune des antennes.

  • Si on a déjà configurer les antennes, il faut se connecter à chacune d’entre elles via SSH et installer MANUELLEMENT le fichier pycryptodomex
sudo pip3 install pycryptodomex
  • Depuis jeedom, il faut démarrer le démon des antennes et vérifier qu’elles récupèrent bien le bon fichier lywsd03.py en regardant le contenu du fichier présent dans le fichier
~/blead/resources/blead/devices/lywsd03.py

Si le fichier n’est pas identique, il faut réinstaller / relancer le démon sur chacune des antennes. On peut également relancer le démon en mode debug et vérifier la présence de logs contenant les infos “LYWSD03——Encrypted”

Personnaliser la taille des icones Jeedom dans les widgets

Alors ce tutorial n’est pas pour tout le monde. Dans jeedom V4, il est possible de créer des widgets personnalisés assez facilement, et de réutiliser les icônes standard de jeedom.

Oui, mais on se retrouve confronté à un problème (de taille ahahah) assez vite. En effet, les icônes standard ne sont pas redimensionnables “facilement”.

Donc avec, par exemple un widget d’alarme on se retrouve avec ça

Un développeur web a fourni une méthode en passant par les CSS avancées, mais cela reste compliqué.

https://community.jeedom.com/t/modifier-taille-icone-widget-en-v4/14135/11

Mais il existe une autre méthode un poil plus simple… on peut directement écrire le CSS dans le widget.

L’astuce est d’insérer dans la balise <i> le code suivant

style="font-size 60px"

Ce qui fait que dans mon cas l’image devient

<i class='icon jeedomapp-lock-home icon_red' style="font-size: 60px"></i>

Youpi!