Assistance configuration commandes sonde ultrason

Bonjour,

J’essaye d configurer une sonde ultrason sur Jeedom, je sèche …

RS485-500cm-Ultrasonic-Level-Sensor.pdf (763,2 Ko)

En utilisant Modbus Doctor je parviens à récupérer les valeurs, voir copie d’écran.
Sur Jeedom en debug je n’arrive pas à obtenir la trame d’interrogation correcte (Voir ci joint début et copie des commandes.)



[2025-08-14 18:22:19][INFO] : Starting daemon (lib version 1.2.9) with log level: debug
[2025-08-14 18:22:19][DEBUG] : Writing PID 888708 to /tmp/jeedom/mymodbus/daemon.pid
[2025-08-14 18:22:19][INFO] : Listening on 127.0.0.1:55502
[2025-08-14 18:22:19][INFO] : Send async started with a cycle of 0.5s
[2025-08-14 18:22:19][DEBUG] : Received new message on socket
[2025-08-14 18:22:19][DEBUG] : Close connection
[2025-08-14 18:22:19][DEBUG] : MyModbusd: 'on_message' '''{'CMD': 'newDaemonConfig', 'config': [{'id': '10', 'name': 'test3', 'eqProtocol': 'serial', 'eqRefreshMode': 'polling', 'eqPolling': '5', 'eqTimeout': '5', 'eqWriteCmdCheckTimeout': '0.1', 'eqRetries': '3', 'eqFirstDelay': '0', 'eqErrorDelay': '1', 'eqPort': '/dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0', 'eqSerialMethod': 'rtu', 'eqSerialBaudrate': '9600', 'eqSerialBytesize': '8', 'eqSerialParity': 'N', 'eqSerialStopbits': '1', 'eqRegTest': '0', 'cmds': [{'id': '78', 'name': 'Niveau', 'type': 'info', 'cmdSlave': '1', 'cmdFctModbus': '3', 'cmdFormat': 'H', 'cmdAddress': '100', 'cmdFrequency': '1', 'cmdInvertBytes': '0', 'cmdInvertWords': '0', 'cmdInvertDWords': '0', 'repeat': '0'}]}], 'apikey': 'Et1Xaae9Q7iObEdp5FlSHEQe9yrhR4KcsRZ2M98etI4MVT603igVLh7ryEO3jzX2', 'dt': '2025-08-14T18:22:19+02:00'}'''
[2025-08-14 18:22:19][INFO] : MyModbusd: Command 'newDaemonConfig' received from jeedom: sending the new config to all MyModbusClients
[2025-08-14 18:22:19][INFO] : MyModbusd: 'manage_new_config' Starting equipment test3 (id 10)
[2025-08-14 18:22:19][DEBUG] : test3: 'read_eqConfig' client params for test3: {'name': 'test3', 'timeout': 5.0, 'retries': 3.0, 'trace_connect': <bound method MyModbusBase.trace_connect_callback of <mymodbusclient.MyModbusClient object at 0x7f2d28a27a50>>, 'port': '/dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0', 'baudrate': 9600, 'stopbits': 1, 'bytesize': 8, 'parity': 'N', 'framer': <FramerType.RTU: 'rtu'>}
[2025-08-14 18:22:19][DEBUG] : test3: 'read_eqConfig' Modbus request for cmd id 78: ReadHoldingRegistersRequest(dev_id=1, transaction_id=0, address=100, count=1, bits=[], registers=[], status=1)
[2025-08-14 18:22:19][DEBUG] : test3: 'connect' ModbusClient of test3 = AsyncModbusSerialClient /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0:0
[2025-08-14 18:22:19][INFO] : MyModbusd: Starting the task for the equipement test3
[2025-08-14 18:22:19][DEBUG] : test3: 'read_downstream' launched
[2025-08-14 18:22:19][DEBUG] : MyModbusd: 'read_upstream' run for test3 (id = 10)
[2025-08-14 18:22:19][DEBUG] : Connecting to /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0:0.
[2025-08-14 18:22:19][DEBUG] : Connecting test3
[2025-08-14 18:22:19][DEBUG] : Connected to test3
[2025-08-14 18:22:19][DEBUG] : test3: 'trace_connect_callback' called with connected = True
[2025-08-14 18:22:19][DEBUG] : test3: connection opened
[2025-08-14 18:22:19][INFO] : test3: 'async_connect' first call
[2025-08-14 18:22:19][DEBUG] : test3: 'run_loop' launched in mode 'polling'
[2025-08-14 18:22:19][DEBUG] : test3: 'one_cycle_read' launched
[2025-08-14 18:22:19][DEBUG] : test3: 'one_cycle_read' treatment cmd_id = 78
[2025-08-14 18:22:19][DEBUG] : test3: 'one_cycle_read'/Niveau: requesting read
[2025-08-14 18:22:19][DEBUG] : send: 0x1 0x3 0x0 0x64 0x0 0x1 0xc5 0xd5
[2025-08-14 18:22:19][DEBUG] : test3: 'add_change' launched with payload = {'values::polling': {'value': 5.0, 'eqId': '10'}}
[2025-08-14 18:22:19][DEBUG] : MyModbusd: Message received from MyModbusClient test3: {'add_change': {'values::polling': {'value': 5.0, 'eqId': '10'}}}
[2025-08-14 18:22:19][DEBUG] : Try sending to jeedom: {'values': {'polling': {'value': 5.0, 'eqId': '10'}}}
[2025-08-14 18:22:24][DEBUG] : send: 0x1 0x3 0x0 0x64 0x0 0x1 0xc5 0xd5
[2025-08-14 18:22:29][DEBUG] : send: 0x1 0x3 0x0 0x64 0x0 0x1 0xc5 0xd5
[2025-08-14 18:22:34][DEBUG] : send: 0x1 0x3 0x0 0x64 0x0 0x1 0xc5 0xd5
[2025-08-14 18:22:39][ERROR] : No response received after 3.0 retries, continue with next request
[2025-08-14 18:22:39][ERROR] : test3/Niveau: exception during read request on device id 1, address 100 -> Modbus Error: [Input/Output] No response received after 3.0 retries, continue with next request
[2025-08-14 18:22:39][DEBUG] : test3: 'add_change' launched with payload = {'values::cycle_ok': {'value': 0, 'eqId': '10'}}
[2025-08-14 18:22:39][DEBUG] : MyModbusd: Message received from MyModbusClient test3: {'add_change': {'values::cycle_ok': {'value': 0, 'eqId': '10'}}}
[2025-08-14 18:22:39][DEBUG] : Try sending to jeedom: {'values': {'cycle_ok': {'value': 0, 'eqId': '10'}}}
[2025-08-14 18:22:40][DEBUG] : test3: 'one_cycle_read' exit with error_or_exception = True
[2025-08-14 18:22:40][DEBUG] : test3: 'one_cycle_read' launched
[2025-08-14 18:22:40][DEBUG] : test3: 'one_cycle_read' treatment cmd_id = 78
[2025-08-14 18:22:40][DEBUG] : test3: 'one_cycle_read'/Niveau: requesting read
[2025-08-14 18:22:40][DEBUG] : send: 0x1 0x3 0x0 0x64 0x0 0x1 0xc5 0xd5

Pourriez vous m’éclairer concernant ce problème ?

Merci

Bonjour,

Adresse du registre Modbus :
0x0100 = 256

Il faut renseigner les adresses en décimal, pas en hexadécimal.
Peut-être qu’en mettant 0x100 dans le champ adresse Modbus, ça fonctionnera, je ne suis pas sûr…

A+
Michel

Bonjour,

Merci Michel ! cela fonctionne en decimal, par contre 0x100 n’est pas accepté dans le champs adresse.
Lors d’une prochaine version de la doc je suggère de préciser que toute les valeurs d’adressage doivent être en décimal et peut être joindre l’exemple ci joint.

Merci pour ton support rapide !!

Dans ce cas, pour me remercier et pour rassurer les prochains utilisateurs sur le fait que je veuille et puisse les aider, ce serait plus logique de marquer ma réponse comme étant la solution.

Bien sur, inattention ! voilà qui est fait
:smiling_face:

1 « J'aime »

Ce sujet a été automatiquement fermé après 24 heures suivant le dernier commentaire. Aucune réponse n’est permise dorénavant.