{"id":73,"date":"2026-10-26T15:52:42","date_gmt":"2026-10-26T14:52:42","guid":{"rendered":"https:\/\/fankepa.com\/?p=73"},"modified":"2026-10-26T17:05:54","modified_gmt":"2026-10-26T16:05:54","slug":"passerelle-modbus-tcp-%e2%86%92-opc-ua-sur-raspberry-pi-4","status":"publish","type":"post","link":"https:\/\/fankepa.com\/?p=73","title":{"rendered":"Passerelle Modbus TCP \u2192 OPC-UA sur Raspberry Pi 4"},"content":{"rendered":"<p><!-- Introduction --><\/p>\n<div style=\"background: linear-gradient(135deg, #1a1a2e 0%, #1e1b4b 100%); padding: 40px; border-radius: 20px; margin-bottom: 40px; border: 1px solid rgba(99,102,241,0.2);\">\n<p style=\"font-size: 19px; color: #a5b4fc; line-height: 1.8; margin: 0; font-style: italic;\">\n    \ud83d\udd17 Une passerelle Python qui traduit en temps r\u00e9el entre Modbus TCP ; le protocole encore massivement utilis\u00e9 dans l&rsquo;industrie depuis plus de 40 ans et OPC-UA, le standard moderne de supervision. Pas de simulation : de vrais capteurs et actionneurs, pilot\u00e9s en direct sur un Raspberry Pi 4.\n  <\/p>\n<\/div>\n<p><!-- Vid\u00e9o YouTube --><\/p>\n<div style=\"margin: 40px 0;\">\n<h2 style=\"font-size: 26px; color: #a5b4fc; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid rgba(99,102,241,0.4);\">\n    \ud83c\udfa5 D\u00e9monstration vid\u00e9o<br \/>\n  <\/h2>\n<div style=\"display: flex; justify-content: center;\">\n<div style=\"position: relative; width: 100%; max-width: 800px; padding-bottom: 45%; height: 0; overflow: hidden; border-radius: 15px; border: 1px solid rgba(99,102,241,0.2); box-shadow: 0 4px 30px rgba(99,102,241,0.3);\">\n      <iframe style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%;\"\n        src=\"https:\/\/www.youtube.com\/embed\/Nthe_PypeFU\"\n        frameborder=\"0\"\n        allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"\n        allowfullscreen><br \/>\n      <\/iframe>\n    <\/div>\n<\/p><\/div>\n<div style=\"text-align: center; margin-top: 15px;\">\n    <a href=\"https:\/\/youtu.be\/Nthe_PypeFU\" target=\"_blank\" style=\"color: #a5b4fc; text-decoration: none; font-size: 14px;\"><br \/>\n      \ud83d\udd17 Voir sur YouTube<br \/>\n    <\/a>\n  <\/div>\n<\/div>\n<p><!-- Pourquoi ce projet --><\/p>\n<div style=\"background: linear-gradient(135deg, #1e1b4b 0%, #1a1a2e 100%); padding: 35px; border-radius: 15px; margin: 40px 0; border: 1px solid rgba(99,102,241,0.2);\">\n<h2 style=\"font-size: 26px; color: #a5b4fc; margin: 0 0 20px 0; padding-bottom: 15px; border-bottom: 2px solid rgba(99,102,241,0.4);\">\n    \ud83d\udca1 Pourquoi ce projet ?<br \/>\n  <\/h2>\n<p style=\"font-size: 16px; color: #cbd5e1; line-height: 1.8; margin-bottom: 15px;\">\n    Je suis dipl\u00f4m\u00e9 en informatique industrielle, et ce qui m&rsquo;int\u00e9resse particuli\u00e8rement, c&rsquo;est l&rsquo;interop\u00e9rabilit\u00e9 entre les protocoles industriels historiques et les standards modernes de supervision. Le <strong style=\"color: #a5b4fc;\">Modbus TCP<\/strong> reste partout dans l&rsquo;industrie; simple, fiable, mais limit\u00e9 (pas de s\u00e9curit\u00e9, pas de structure de donn\u00e9es riche). <strong style=\"color: #a5b4fc;\">L&rsquo;OPC-UA<\/strong>, lui, est le standard actuel de l&rsquo;IIoT.\n  <\/p>\n<p style=\"font-size: 16px; color: #cbd5e1; line-height: 1.8; margin-bottom: 15px;\">\n    Beaucoup d&rsquo;usines tournent encore avec du mat\u00e9riel qui ne parle que Modbus et qu&rsquo;on ne peut pas simplement remplacer. Plut\u00f4t que de choisir entre les deux mondes, j&rsquo;ai voulu construire le pont qui les relie en Python, avec de vrais capteurs et actionneurs c\u00e2bl\u00e9s sur un Raspberry Pi 4, pas une simulation.\n  <\/p>\n<div style=\"background: rgba(99,102,241,0.1); padding: 20px; border-radius: 10px; border-left: 3px solid #6366f1; margin-top: 20px;\">\n<p style=\"font-size: 15px; color: #cbd5e1; line-height: 1.8; margin: 0;\">\n      \ud83d\udca1 Ce projet m&rsquo;a permis de manipuler les deux c\u00f4t\u00e9s d&rsquo;une vraie passerelle industrielle : <strong style=\"color: #a5b4fc;\">serveur Modbus, client Modbus, serveur OPC-UA<\/strong>; les m\u00eames r\u00f4les qu&rsquo;on retrouve dans une installation de supervision r\u00e9elle.\n    <\/p>\n<\/p><\/div>\n<\/div>\n<p><!-- Mat\u00e9riel --><\/p>\n<div style=\"margin: 40px 0;\">\n<h2 style=\"font-size: 26px; color: #a5b4fc; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 2px solid rgba(99,102,241,0.4);\">\n    \ud83d\udd27 Mat\u00e9riel utilis\u00e9<br \/>\n  <\/h2>\n<div style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px;\">\n<div style=\"background: linear-gradient(135deg, #1e1b4b, #1a1a2e); padding: 25px; border-radius: 12px; border: 1px solid rgba(99,102,241,0.2);\">\n<div style=\"font-size: 36px; margin-bottom: 12px;\">\ud83d\udda5\ufe0f<\/div>\n<h3 style=\"color: #a5b4fc; font-size: 18px; margin: 0 0 8px 0;\">Raspberry Pi 4<\/h3>\n<p style=\"color: #94a3b8; font-size: 14px; line-height: 1.6; margin: 0;\">H\u00e9berge l&rsquo;esclave Modbus TCP et la passerelle OPC-UA<br \/>Pilotage GPIO\/I2C r\u00e9el<\/p>\n<\/p><\/div>\n<div style=\"background: linear-gradient(135deg, #1e1b4b, #1a1a2e); padding: 25px; border-radius: 12px; border: 1px solid rgba(99,102,241,0.2);\">\n<div style=\"font-size: 36px; margin-bottom: 12px;\">\ud83d\udce1<\/div>\n<h3 style=\"color: #a5b4fc; font-size: 18px; margin: 0 0 8px 0;\">Capteurs<\/h3>\n<p style=\"color: #94a3b8; font-size: 14px; line-height: 1.6; margin: 0;\">DHT11 (temp\u00e9rature\/humidit\u00e9)<br \/>HC-SR04 (distance)<br \/>PIR (d\u00e9tection de pr\u00e9sence)<\/p>\n<\/p><\/div>\n<div style=\"background: linear-gradient(135deg, #1e1b4b, #1a1a2e); padding: 25px; border-radius: 12px; border: 1px solid rgba(99,102,241,0.2);\">\n<div style=\"font-size: 36px; margin-bottom: 12px;\">\u2699\ufe0f<\/div>\n<h3 style=\"color: #a5b4fc; font-size: 18px; margin: 0 0 8px 0;\">Actionneurs<\/h3>\n<p style=\"color: #94a3b8; font-size: 14px; line-height: 1.6; margin: 0;\">Module 4 relais<br \/>Servomoteur 9g<br \/>Moteur pas-\u00e0-pas 28BYJ-48 + ULN2003<\/p>\n<\/p><\/div>\n<div style=\"background: linear-gradient(135deg, #1e1b4b, #1a1a2e); padding: 25px; border-radius: 12px; border: 1px solid rgba(99,102,241,0.2);\">\n<div style=\"font-size: 36px; margin-bottom: 12px;\">\ud83d\udcbb<\/div>\n<h3 style=\"color: #a5b4fc; font-size: 18px; margin: 0 0 8px 0;\">Python<\/h3>\n<p style=\"color: #94a3b8; font-size: 14px; line-height: 1.6; margin: 0;\">pymodbus (serveur\/client Modbus)<br \/>python-opcua (serveur OPC-UA)<br \/>gpiozero + pigpio<\/p>\n<\/p><\/div>\n<\/p><\/div>\n<\/div>\n<p><!-- Carte des registres --><\/p>\n<div style=\"background: #14151f; padding: 35px; border-radius: 15px; margin: 40px 0; border: 1px solid rgba(99,102,241,0.2);\">\n<h2 style=\"font-size: 26px; color: #a5b4fc; margin: 0 0 25px 0; padding-bottom: 15px; border-bottom: 2px solid rgba(99,102,241,0.4);\">\n    \ud83d\uddc2\ufe0f Carte des registres Modbus<br \/>\n  <\/h2>\n<p style=\"font-size: 16px; color: #cbd5e1; line-height: 1.8; margin-bottom: 20px;\">\n    Chaque capteur et chaque actionneur correspond \u00e0 une zone pr\u00e9cise de la table Modbus en lecture seule pour les capteurs, en lecture\/\u00e9criture pour les actionneurs :\n  <\/p>\n<div style=\"overflow-x: auto;\">\n<table style=\"width: 100%; border-collapse: collapse;\">\n<thead>\n<tr style=\"background: linear-gradient(135deg, #6366f1, #8b5cf6);\">\n<th style=\"padding: 15px; text-align: left; color: white;\">Composant<\/th>\n<th style=\"padding: 15px; text-align: left; color: white;\">Zone Modbus<\/th>\n<th style=\"padding: 15px; text-align: left; color: white;\">Type<\/th>\n<th style=\"padding: 15px; text-align: left; color: white;\">Acc\u00e8s<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background: rgba(99,102,241,0.08);\">\n<td style=\"padding: 12px 15px; color: #a5b4fc; font-weight: 600; border-bottom: 1px solid rgba(99,102,241,0.1);\">PIR<\/td>\n<td style=\"padding: 12px 15px; color: #cbd5e1; border-bottom: 1px solid rgba(99,102,241,0.1);\">Discrete Input<\/td>\n<td style=\"padding: 12px 15px; color: #94a3b8; border-bottom: 1px solid rgba(99,102,241,0.1);\">1 bit<\/td>\n<td style=\"padding: 12px 15px; color: #94a3b8; font-size: 13px; border-bottom: 1px solid rgba(99,102,241,0.1);\">Lecture seule<\/td>\n<\/tr>\n<tr style=\"background: rgba(99,102,241,0.05);\">\n<td style=\"padding: 12px 15px; color: #a5b4fc; font-weight: 600; border-bottom: 1px solid rgba(99,102,241,0.1);\">Temp\u00e9rature \/ Humidit\u00e9 \/ Distance<\/td>\n<td style=\"padding: 12px 15px; color: #cbd5e1; border-bottom: 1px solid rgba(99,102,241,0.1);\">Input Register<\/td>\n<td style=\"padding: 12px 15px; color: #94a3b8; border-bottom: 1px solid rgba(99,102,241,0.1);\">16 bits<\/td>\n<td style=\"padding: 12px 15px; color: #94a3b8; font-size: 13px; border-bottom: 1px solid rgba(99,102,241,0.1);\">Lecture seule<\/td>\n<\/tr>\n<tr style=\"background: rgba(99,102,241,0.08);\">\n<td style=\"padding: 12px 15px; color: #a5b4fc; font-weight: 600; border-bottom: 1px solid rgba(99,102,241,0.1);\">Relais (\u00d74)<\/td>\n<td style=\"padding: 12px 15px; color: #cbd5e1; border-bottom: 1px solid rgba(99,102,241,0.1);\">Coil<\/td>\n<td style=\"padding: 12px 15px; color: #94a3b8; border-bottom: 1px solid rgba(99,102,241,0.1);\">1 bit<\/td>\n<td style=\"padding: 12px 15px; color: #94a3b8; font-size: 13px; border-bottom: 1px solid rgba(99,102,241,0.1);\">Lecture \/ \u00c9criture<\/td>\n<\/tr>\n<tr style=\"background: rgba(99,102,241,0.05);\">\n<td style=\"padding: 12px 15px; color: #a5b4fc; font-weight: 600; border-bottom: 1px solid rgba(99,102,241,0.1);\">Servo \/ Pas-\u00e0-pas<\/td>\n<td style=\"padding: 12px 15px; color: #cbd5e1; border-bottom: 1px solid rgba(99,102,241,0.1);\">Holding Register<\/td>\n<td style=\"padding: 12px 15px; color: #94a3b8; border-bottom: 1px solid rgba(99,102,241,0.1);\">16 bits<\/td>\n<td style=\"padding: 12px 15px; color: #94a3b8; font-size: 13px; border-bottom: 1px solid rgba(99,102,241,0.1);\">Lecture \/ \u00c9criture<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<\/div>\n<p><!-- Logique du sc\u00e9nario --><\/p>\n<div style=\"background: #14151f; padding: 35px; border-radius: 15px; margin: 40px 0; border: 1px solid rgba(99,102,241,0.2);\">\n<h2 style=\"font-size: 26px; color: #a5b4fc; margin: 0 0 20px 0; padding-bottom: 15px; border-bottom: 2px solid rgba(99,102,241,0.4);\">\n    \ud83d\udcdd La logique du sc\u00e9nario, en clair<br \/>\n  <\/h2>\n<p style=\"font-size: 16px; color: #cbd5e1; line-height: 1.8; margin-bottom: 20px;\">\n    Au-dessus de la passerelle Modbus\/OPC-UA, un sc\u00e9nario autonome r\u00e9agit directement aux capteurs sans rien changer \u00e0 la lecture de base. Voici l&rsquo;id\u00e9e, en pseudo-code, avant de voir le d\u00e9tail :\n  <\/p>\n<div style=\"background: #0a0b12; padding: 25px; border-radius: 12px; border: 1px solid rgba(99,102,241,0.25); overflow-x: auto;\">\n<pre style=\"color: #a5b4fc; font-size: 13px; line-height: 1.8; margin: 0; white-space: pre-wrap;\">tant que le programme tourne :\r\n\r\n  si pr\u00e9sence d\u00e9tect\u00e9e (PIR) et pas d\u00e9j\u00e0 signal\u00e9e :\r\n      activer relais \"LED pr\u00e9sence\"\r\n      afficher \"PRESENCE !\" sur l'\u00e9cran\r\n\r\n  sinon si plus de pr\u00e9sence :\r\n      d\u00e9sactiver le relais\r\n      effacer le message\r\n\r\n  si objet proche d\u00e9tect\u00e9 (HC-SR04 < 4cm) :\r\n      servo -> 180\u00b0\r\n\r\n  sinon si objet vient de dispara\u00eetre :\r\n      servo -> 0\u00b0 (repos)\r\n      attendre 5 secondes\r\n      faire tourner le pas-\u00e0-pas 10s\r\n      pause 3s\r\n      faire tourner le pas-\u00e0-pas en sens inverse 10s<\/pre>\n<\/p><\/div>\n<div style=\"background: rgba(99,102,241,0.1); padding: 20px; border-radius: 10px; border-left: 3px solid #6366f1; margin-top: 20px;\">\n<p style=\"font-size: 15px; color: #cbd5e1; line-height: 1.8; margin: 0;\">\n      \ud83d\udca1 Ce sc\u00e9nario \u00e9crit directement dans les m\u00eames registres Modbus qu&rsquo;un client externe utiliserait; c&rsquo;est ce qui lui permet de rester visible et synchronis\u00e9 avec la passerelle OPC-UA, sans rien casser du fonctionnement de base.\n    <\/p>\n<\/p><\/div>\n<\/div>\n<p><!-- Architecture \u00e9tape par \u00e9tape --><\/p>\n<div style=\"margin: 40px 0;\">\n<h2 style=\"font-size: 26px; color: #a5b4fc; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 2px solid rgba(99,102,241,0.4);\">\n    \ud83d\udcca L&rsquo;architecture, \u00e9tape par \u00e9tape<br \/>\n  <\/h2>\n<div style=\"background: #14151f; padding: 20px 25px; border-radius: 12px; border: 1px solid rgba(99,102,241,0.2); margin-bottom: 20px;\">\n<p style=\"font-size: 16px; color: #cbd5e1; line-height: 1.8; margin: 0;\">\n      Deux programmes Python tournent ensemble sur le Raspberry Pi. Voici comment une donn\u00e9e circule, dans les deux sens :\n    <\/p>\n<\/p><\/div>\n<div style=\"background: linear-gradient(135deg, #1e1b4b, #1a1a2e); padding: 25px; border-radius: 12px; border: 1px solid rgba(99,102,241,0.2); margin-bottom: 20px;\">\n<div style=\"display: flex; align-items: center; gap: 15px; margin-bottom: 15px;\">\n      <span style=\"background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 700;\">1<\/span><\/p>\n<h3 style=\"color: #a5b4fc; font-size: 20px; margin: 0;\">L&rsquo;esclave Modbus lit le mat\u00e9riel<\/h3>\n<\/p><\/div>\n<p style=\"font-size: 15px; color: #94a3b8; line-height: 1.7; margin: 0;\">\n      <code style=\"color: #86efac;\">modbus_hardware_slave.py<\/code> lit en continu les capteurs physiques via GPIO\/I2C, et \u00e9crit les valeurs dans ses registres Modbus (serveur TCP sur le port 5020).\n    <\/p>\n<\/p><\/div>\n<div style=\"background: linear-gradient(135deg, #1e1b4b, #1a1a2e); padding: 25px; border-radius: 12px; border: 1px solid rgba(99,102,241,0.2); margin-bottom: 20px;\">\n<div style=\"display: flex; align-items: center; gap: 15px; margin-bottom: 15px;\">\n      <span style=\"background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 700;\">2<\/span><\/p>\n<h3 style=\"color: #a5b4fc; font-size: 20px; margin: 0;\">La passerelle interroge l&rsquo;esclave<\/h3>\n<\/p><\/div>\n<p style=\"font-size: 15px; color: #94a3b8; line-height: 1.7; margin: 0;\">\n      <code style=\"color: #86efac;\">gateway.py<\/code>, en tant que client Modbus, relit ces registres toutes les secondes et republie les m\u00eames valeurs comme variables OPC-UA.\n    <\/p>\n<\/p><\/div>\n<div style=\"background: linear-gradient(135deg, #1e1b4b, #1a1a2e); padding: 25px; border-radius: 12px; border: 1px solid rgba(99,102,241,0.2); margin-bottom: 20px;\">\n<div style=\"display: flex; align-items: center; gap: 15px; margin-bottom: 15px;\">\n      <span style=\"background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 700;\">3<\/span><\/p>\n<h3 style=\"color: #a5b4fc; font-size: 20px; margin: 0;\">Une commande redescend vers le mat\u00e9riel<\/h3>\n<\/p><\/div>\n<p style=\"font-size: 15px; color: #94a3b8; line-height: 1.7; margin: 0;\">\n      \u00c0 l&rsquo;inverse, une commande \u00e9crite c\u00f4t\u00e9 OPC-UA (par exemple l&rsquo;angle du servo) redescend vers le Modbus, qui pilote r\u00e9ellement le GPIO ; le mat\u00e9riel r\u00e9agit pour de vrai.\n    <\/p>\n<\/p><\/div>\n<div style=\"background: linear-gradient(135deg, #1e1b4b, #1a1a2e); padding: 25px; border-radius: 12px; border: 1px solid rgba(99,102,241,0.2);\">\n<div style=\"display: flex; align-items: center; gap: 15px; margin-bottom: 15px;\">\n      <span style=\"background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 700;\">4<\/span><\/p>\n<h3 style=\"color: #a5b4fc; font-size: 20px; margin: 0;\">Le sc\u00e9nario automatique vient se greffer dessus<\/h3>\n<\/p><\/div>\n<p style=\"font-size: 15px; color: #94a3b8; line-height: 1.7; margin: 0;\">\n      Un troisi\u00e8me thread r\u00e9agit directement aux capteurs (PIR, HC-SR04) et \u00e9crit lui aussi dans les registres exactement comme le ferait un client externe, sans rien remplacer de la lecture de base.\n    <\/p>\n<\/p><\/div>\n<\/div>\n<p><!-- R\u00e9sultat --><\/p>\n<div style=\"background: linear-gradient(135deg, #1e1b4b 0%, #1a1a2e 100%); padding: 35px; border-radius: 15px; margin: 40px 0; border: 1px solid rgba(76,175,80,0.2);\">\n<h2 style=\"font-size: 26px; color: #86efac; margin: 0 0 20px 0; padding-bottom: 15px; border-bottom: 2px solid rgba(76,175,80,0.3);\">\n    \ud83c\udfaf Ce que \u00e7a donne en pratique<br \/>\n  <\/h2>\n<p style=\"font-size: 16px; color: #cbd5e1; line-height: 1.8; margin-bottom: 20px;\">\n    Quand le PIR d\u00e9tecte une pr\u00e9sence, un relais s&rsquo;active et un message appara\u00eet sur l&rsquo;\u00e9cran LCD visible en temps r\u00e9el c\u00f4t\u00e9 OPC-UA. Quand un objet s&rsquo;approche du capteur \u00e0 ultrasons, le servomoteur r\u00e9agit, puis quelques secondes plus tard, le moteur pas-\u00e0-pas se met en mouvement avant de revenir \u00e0 l&rsquo;\u00e9tat initial.\n  <\/p>\n<div style=\"background: rgba(76,175,80,0.08); padding: 20px; border-radius: 10px; border-left: 3px solid #4caf50;\">\n<p style=\"font-size: 15px; color: #cbd5e1; line-height: 1.8; margin: 0;\">\n      \ud83c\udfaf Rien n&rsquo;est simul\u00e9 : chaque r\u00e9action part des m\u00eames registres Modbus lus et \u00e9crits en continu, exactement comme le ferait une vraie installation de supervision industrielle.\n    <\/p>\n<\/p><\/div>\n<\/div>\n<p><!-- Stack technique --><\/p>\n<div style=\"background: #14151f; padding: 35px; border-radius: 15px; margin: 40px 0; border: 1px solid rgba(99,102,241,0.2);\">\n<h2 style=\"font-size: 26px; color: #a5b4fc; margin: 0 0 25px 0; padding-bottom: 15px; border-bottom: 2px solid rgba(99,102,241,0.4);\">\n    \ud83d\udcbb Stack technique<br \/>\n  <\/h2>\n<div style=\"display: flex; flex-wrap: wrap; gap: 12px;\">\n    <span style=\"background: rgba(99,102,241,0.2); color: #a5b4fc; padding: 10px 20px; border-radius: 25px; font-size: 14px; font-weight: 600; border: 1px solid rgba(99,102,241,0.3);\">\ud83d\udda5\ufe0f Raspberry Pi 4<\/span><br \/>\n    <span style=\"background: rgba(139,92,246,0.2); color: #c4b5fd; padding: 10px 20px; border-radius: 25px; font-size: 14px; font-weight: 600; border: 1px solid rgba(139,92,246,0.3);\">\ud83d\udc0d Python<\/span><br \/>\n    <span style=\"background: rgba(99,102,241,0.2); color: #a5b4fc; padding: 10px 20px; border-radius: 25px; font-size: 14px; font-weight: 600; border: 1px solid rgba(99,102,241,0.3);\">\ud83d\udd0c Modbus TCP<\/span><br \/>\n    <span style=\"background: rgba(139,92,246,0.2); color: #c4b5fd; padding: 10px 20px; border-radius: 25px; font-size: 14px; font-weight: 600; border: 1px solid rgba(139,92,246,0.3);\">\ud83c\udf10 OPC-UA<\/span><br \/>\n    <span style=\"background: rgba(99,102,241,0.2); color: #a5b4fc; padding: 10px 20px; border-radius: 25px; font-size: 14px; font-weight: 600; border: 1px solid rgba(99,102,241,0.3);\">\ud83d\udce6 pymodbus<\/span><br \/>\n    <span style=\"background: rgba(139,92,246,0.2); color: #c4b5fd; padding: 10px 20px; border-radius: 25px; font-size: 14px; font-weight: 600; border: 1px solid rgba(139,92,246,0.3);\">\ud83d\udce6 python-opcua<\/span><br \/>\n    <span style=\"background: rgba(99,102,241,0.2); color: #a5b4fc; padding: 10px 20px; border-radius: 25px; font-size: 14px; font-weight: 600; border: 1px solid rgba(99,102,241,0.3);\">\u26a1 gpiozero \/ pigpio<\/span><br \/>\n    <span style=\"background: rgba(139,92,246,0.2); color: #c4b5fd; padding: 10px 20px; border-radius: 25px; font-size: 14px; font-weight: 600; border: 1px solid rgba(139,92,246,0.3);\">\ud83d\udd27 GPIO \/ I2C<\/span>\n  <\/div>\n<\/div>\n<p><!-- Ce que j'ai appris --><\/p>\n<div style=\"background: linear-gradient(135deg, #1e1b4b 0%, #1a1a2e 100%); padding: 35px; border-radius: 15px; margin: 40px 0; border: 1px solid rgba(99,102,241,0.2);\">\n<h2 style=\"font-size: 26px; color: #a5b4fc; margin: 0 0 20px 0; padding-bottom: 15px; border-bottom: 2px solid rgba(99,102,241,0.4);\">\n    \ud83d\udcda Ce que j&rsquo;ai appris<br \/>\n  <\/h2>\n<div style=\"display: flex; flex-direction: column; gap: 12px;\">\n<div style=\"display: flex; align-items: center; gap: 12px; background: rgba(99,102,241,0.1); padding: 15px; border-radius: 10px; border-left: 3px solid #6366f1;\">\n      <span style=\"color: #86efac;\">\u2705<\/span><br \/>\n      <span style=\"color: #cbd5e1; font-size: 15px;\">Impl\u00e9mentation d&rsquo;un serveur ET d&rsquo;un client Modbus TCP en Python (pymodbus)<\/span>\n    <\/div>\n<div style=\"display: flex; align-items: center; gap: 12px; background: rgba(99,102,241,0.1); padding: 15px; border-radius: 10px; border-left: 3px solid #8b5cf6;\">\n      <span style=\"color: #86efac;\">\u2705<\/span><br \/>\n      <span style=\"color: #cbd5e1; font-size: 15px;\">Mise en place d&rsquo;un serveur OPC-UA (python-opcua) exposant des variables en temps r\u00e9el<\/span>\n    <\/div>\n<div style=\"display: flex; align-items: center; gap: 12px; background: rgba(99,102,241,0.1); padding: 15px; border-radius: 10px; border-left: 3px solid #6366f1;\">\n      <span style=\"color: #86efac;\">\u2705<\/span><br \/>\n      <span style=\"color: #cbd5e1; font-size: 15px;\">Synchronisation bidirectionnelle sans boucle d&rsquo;\u00e9crasement (logique \u00ab\u00a0push sur changement\u00a0\u00bb)<\/span>\n    <\/div>\n<div style=\"display: flex; align-items: center; gap: 12px; background: rgba(99,102,241,0.1); padding: 15px; border-radius: 10px; border-left: 3px solid #8b5cf6;\">\n      <span style=\"color: #86efac;\">\u2705<\/span><br \/>\n      <span style=\"color: #cbd5e1; font-size: 15px;\">C\u00e2blage et debug de capteurs\/actionneurs r\u00e9els (DHT11, HC-SR04, PIR, relais, servo, pas-\u00e0-pas)<\/span>\n    <\/div>\n<div style=\"display: flex; align-items: center; gap: 12px; background: rgba(99,102,241,0.1); padding: 15px; border-radius: 10px; border-left: 3px solid #6366f1;\">\n      <span style=\"color: #86efac;\">\u2705<\/span><br \/>\n      <span style=\"color: #cbd5e1; font-size: 15px;\">PWM mat\u00e9riel via pigpio pour un servomoteur parfaitement stable<\/span>\n    <\/div>\n<div style=\"display: flex; align-items: center; gap: 12px; background: rgba(99,102,241,0.1); padding: 15px; border-radius: 10px; border-left: 3px solid #8b5cf6;\">\n      <span style=\"color: #86efac;\">\u2705<\/span><br \/>\n      <span style=\"color: #cbd5e1; font-size: 15px;\">Architecture multi-thread Python (lecture capteurs, pilotage actionneurs, sc\u00e9nario autonome)<\/span>\n    <\/div>\n<\/p><\/div>\n<\/div>\n<p><!-- Prochaine \u00e9tape --><\/p>\n<div style=\"background: linear-gradient(135deg, #1e1b4b 0%, #1a1a2e 100%); padding: 35px; border-radius: 15px; margin: 40px 0; border: 1px solid rgba(245,158,11,0.2);\">\n<h2 style=\"font-size: 26px; color: #fcd34d; margin: 0 0 20px 0; padding-bottom: 15px; border-bottom: 2px solid rgba(245,158,11,0.3);\">\n    \ud83d\ude80 Prochaine \u00e9tape<br \/>\n  <\/h2>\n<div style=\"display: flex; flex-direction: column; gap: 12px;\">\n<div style=\"display: flex; align-items: center; gap: 12px; background: rgba(245,158,11,0.08); padding: 15px; border-radius: 10px; border-left: 3px solid #f59e0b;\">\n      <span style=\"color: #fcd34d;\">\ud83d\udd1c<\/span><br \/>\n      <span style=\"color: #cbd5e1; font-size: 15px;\">S\u00e9curiser le serveur OPC-UA (certificats, authentification)<\/span>\n    <\/div>\n<div style=\"display: flex; align-items: center; gap: 12px; background: rgba(245,158,11,0.08); padding: 15px; border-radius: 10px; border-left: 3px solid #f59e0b;\">\n      <span style=\"color: #fcd34d;\">\ud83d\udd1c<\/span><br \/>\n      <span style=\"color: #cbd5e1; font-size: 15px;\">Brancher un vrai logiciel de supervision SCADA sur le serveur OPC-UA<\/span>\n    <\/div>\n<div style=\"display: flex; align-items: center; gap: 12px; background: rgba(245,158,11,0.08); padding: 15px; border-radius: 10px; border-left: 3px solid #f59e0b;\">\n      <span style=\"color: #fcd34d;\">\ud83d\udd1c<\/span><br \/>\n      <span style=\"color: #cbd5e1; font-size: 15px;\">Historiser les donn\u00e9es (InfluxDB + Grafana) pour du monitoring dans le temps<\/span>\n    <\/div>\n<div style=\"display: flex; align-items: center; gap: 12px; background: rgba(245,158,11,0.08); padding: 15px; border-radius: 10px; border-left: 3px solid #f59e0b;\">\n      <span style=\"color: #fcd34d;\">\ud83d\udd1c<\/span><br \/>\n      <span style=\"color: #cbd5e1; font-size: 15px;\">\u00c9tendre la passerelle \u00e0 plusieurs esclaves Modbus simultan\u00e9s<\/span>\n    <\/div>\n<\/p><\/div>\n<\/div>\n<p><!-- CTA --><\/p>\n<div style=\"background: linear-gradient(135deg, #1e1b4b 0%, #0f3460 100%); padding: 50px 30px; border-radius: 20px; text-align: center; margin: 40px 0; border: 1px solid rgba(99,102,241,0.3); box-shadow: 0 4px 30px rgba(99,102,241,0.2);\">\n<h2 style=\"font-size: 32px; margin: 0 0 15px 0; color: #a5b4fc;\">\ud83d\udce6 Code source disponible !<\/h2>\n<p style=\"font-size: 17px; color: #94a3b8; margin: 0 0 30px 0; max-width: 600px; margin-left: auto; margin-right: auto; line-height: 1.7;\">\n    Le code complet de la passerelle Modbus\/OPC-UA est disponible gratuitement sur GitHub !\n  <\/p>\n<div style=\"display: flex; gap: 15px; justify-content: center; flex-wrap: wrap;\">\n    <a href=\"https:\/\/github.com\/FILSTOGNO\/modbus-opcua-gateway\" target=\"_blank\" style=\"background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; padding: 15px 35px; border-radius: 30px; text-decoration: none; font-weight: 700; font-size: 16px; box-shadow: 0 4px 20px rgba(99,102,241,0.4);\"><br \/>\n      \ud83d\udce6 Voir sur GitHub<br \/>\n    <\/a><br \/>\n    <a href=\"https:\/\/youtu.be\/Nthe_PypeFU\" target=\"_blank\" style=\"background: #ff0000; color: white; padding: 15px 35px; border-radius: 30px; text-decoration: none; font-weight: 700; font-size: 16px;\"><br \/>\n      \ud83c\udfa5 Voir la vid\u00e9o<br \/>\n    <\/a><br \/>\n    <a href=\"https:\/\/fankepa.com\/?page_id=16\" style=\"background: rgba(99,102,241,0.2); color: #a5b4fc; padding: 15px 35px; border-radius: 30px; text-decoration: none; font-weight: 700; font-size: 16px; border: 2px solid rgba(99,102,241,0.4);\"><br \/>\n      \u2709\ufe0f Me contacter<br \/>\n    <\/a>\n  <\/div>\n<p style=\"font-size: 13px; color: #64748b; margin-top: 20px;\">\n    Projet r\u00e9alis\u00e9 par <strong style=\"color: #a5b4fc;\">Angelbert Fankep<\/strong> \u00b7 Dipl\u00f4m\u00e9 en Informatique Industrielle<br \/>\n    Raspberry Pi 4 \u00b7 Python \u00b7 Modbus TCP \u00b7 OPC-UA\n  <\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udd17 Une passerelle Python qui traduit en temps r\u00e9el entre Modbus TCP ; le protocole encore massivement utilis\u00e9 dans l&rsquo;industrie [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":81,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[3],"tags":[],"class_list":["post-73","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projets"],"_links":{"self":[{"href":"https:\/\/fankepa.com\/index.php?rest_route=\/wp\/v2\/posts\/73","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fankepa.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fankepa.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fankepa.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fankepa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=73"}],"version-history":[{"count":1,"href":"https:\/\/fankepa.com\/index.php?rest_route=\/wp\/v2\/posts\/73\/revisions"}],"predecessor-version":[{"id":74,"href":"https:\/\/fankepa.com\/index.php?rest_route=\/wp\/v2\/posts\/73\/revisions\/74"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fankepa.com\/index.php?rest_route=\/wp\/v2\/media\/81"}],"wp:attachment":[{"href":"https:\/\/fankepa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=73"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fankepa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=73"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fankepa.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=73"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}