c’etait déjà fait, pas mieux…
J’ai un « 1 » dans la valeur affichée au lieu du 160 pris dans le log en DEBUG
c’etait déjà fait, pas mieux…
Si on a un état. Tu as bien enlevé tous tes calculs sur valeurs?
Fais cela plutôt sur la commande pour la tem température de la maison. Que donne le log?
Idéalement refaire les copies d’évran pour être sur de ta configuration.
Antoine
J’ai tout viré: la mise en forme, les calculs sur les deux valeurs recherchées
Le log est le même que dans mon message précédent
DEBUG:__main__:=== LECTURE DES AUTOMATES ===
DEBUG:__main__:{'298': {'typeDevice': 'rtu', 'portserial': '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_B001BMT1-if00-port0', 'baudrate': 9600, 'unitID': 10, 'parity': 'N', 'stopbits': 1, 'bytesize': 8, 'id': '298', 'eqlogicName': 'TEST De Dietrich', 'registerParams': [{'nameCmd': 'T° Bascule Eté Hiver', 'cmdId': '2865', 'format': 'longformat', 'functioncode': 'fc03', 'nbregister': '1', 'startregister': '8', 'wordorder': 'littleword', 'byteorder': 'littlebyte', 'offset': '0', 'decimal': 0, 'operation': 0, 'multiR': '0', 'byteSplit': '0', 'hexa': '1'}, {'nameCmd': 'T° Ambiance A', 'cmdId': '2859', 'format': 'longformat', 'functioncode': 'fc03', 'nbregister': '1', 'startregister': '18', 'wordorder': 'littleword', 'byteorder': 'littlebyte', 'offset': '0', 'decimal': '5', 'operation': 0, 'multiR': '0', 'byteSplit': '0', 'hexa': '1'}]}}
DEBUG:__main__:{'typeDevice': 'rtu', 'portserial': '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_B001BMT1-if00-port0', 'baudrate': 9600, 'unitID': 10, 'parity': 'N', 'stopbits': 1, 'bytesize': 8, 'id': '298', 'eqlogicName': 'TEST De Dietrich', 'registerParams': [{'nameCmd': 'T° Bascule Eté Hiver', 'cmdId': '2865', 'format': 'longformat', 'functioncode': 'fc03', 'nbregister': '1', 'startregister': '8', 'wordorder': 'littleword', 'byteorder': 'littlebyte', 'offset': '0', 'decimal': 0, 'operation': 0, 'multiR': '0', 'byteSplit': '0', 'hexa': '1'}, {'nameCmd': 'T° Ambiance A', 'cmdId': '2859', 'format': 'longformat', 'functioncode': 'fc03', 'nbregister': '1', 'startregister': '18', 'wordorder': 'littleword', 'byteorder': 'littlebyte', 'offset': '0', 'decimal': '5', 'operation': 0, 'multiR': '0', 'byteSplit': '0', 'hexa': '1'}]}
DEBUG:__main__:{'nameCmd': 'T° Bascule Eté Hiver', 'cmdId': '2865', 'format': 'longformat', 'functioncode': 'fc03', 'nbregister': '1', 'startregister': '8', 'wordorder': 'littleword', 'byteorder': 'littlebyte', 'offset': '0', 'decimal': 0, 'operation': 0, 'multiR': '0', 'byteSplit': '0', 'hexa': '1'}
DEBUG:pymodbus.transaction:Current transaction state - IDLE
DEBUG:pymodbus.transaction:Running transaction 1
DEBUG:pymodbus.transaction:SEND: 0xa 0x3 0x0 0x8 0x0 0x1 0x4 0xb3
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0xa 0x3 0x2 0x0 0xa0 0x1d 0xfd
DEBUG:pymodbus.framer.rtu_framer:Getting Frame - 0x3 0x2 0x0 0xa0
DEBUG:pymodbus.factory:Factory Response[ReadHoldingRegistersResponse: 3]
DEBUG:pymodbus.framer.rtu_framer:Frame advanced, resetting header!!
DEBUG:pymodbus.transaction:Adding transaction 10
DEBUG:pymodbus.transaction:Getting transaction 10
DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
DEBUG:__main__:READHOLDING
DEBUG:__main__:{'nameCmd': 'T° Ambiance A', 'cmdId': '2859', 'format': 'longformat', 'functioncode': 'fc03', 'nbregister': '1', 'startregister': '18', 'wordorder': 'littleword', 'byteorder': 'littlebyte', 'offset': '0', 'decimal': '5', 'operation': 0, 'multiR': '0', 'byteSplit': '0', 'hexa': '1'}
DEBUG:pymodbus.transaction:Current transaction state - TRANSACTION_COMPLETE
DEBUG:pymodbus.transaction:Running transaction 2
DEBUG:pymodbus.transaction:SEND: 0xa 0x3 0x0 0x12 0x0 0x1 0x25 0x74
DEBUG:pymodbus.framer.rtu_framer:Changing state to IDLE - Last Frame End - 1726561016.133011, Current Time stamp - 1726561016.136656
DEBUG:pymodbus.framer.rtu_framer:Waiting for 3.5 char before next send - 4.01 ms
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
WARNING:pymodbus.client.sync:Cleanup recv buffer before send: 0x0 0x0 0x0
DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0xa 0x3 0x2 0x0 0xd3 0x5c 0x18
DEBUG:pymodbus.framer.rtu_framer:Getting Frame - 0x3 0x2 0x0 0xd3
DEBUG:pymodbus.factory:Factory Response[ReadHoldingRegistersResponse: 3]
DEBUG:pymodbus.framer.rtu_framer:Frame advanced, resetting header!!
DEBUG:pymodbus.transaction:Adding transaction 10
DEBUG:pymodbus.transaction:Getting transaction 10
DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
DEBUG:__main__:READHOLDING
DEBUG:__main__:{'data': {'298': {'T° Bascule Eté Hiver': [{'StartRegister': 8, 'CmdId': '2865', 'byteSplit': '0', 'value': [160]}], 'T° Ambiance A': [{'StartRegister': 18, 'CmdId': '2859', 'byteSplit': '0', 'value': [211]}]}}, 'FUNC': 'readF'}
[2024-09-17 10:16:56] DEBUG : Result:{"data":{"298":{"T\u00b0 Bascule Et\u00e9 Hiver":[{"StartRegister":8,"CmdId":"2865","byteSplit":"0","value":[160]}],"T\u00b0 Ambiance A":[{"StartRegister":18,"CmdId":"2859","byteSplit":"0","value":[211]}]}},"FUNC":"readF"}
[2024-09-17 10:16:56] DEBUG : DATACORRESPOND : {"298":{"T\u00b0 Bascule Et\u00e9 Hiver":[{"StartRegister":8,"CmdId":"2865","byteSplit":"0","value":[160]}],"T\u00b0 Ambiance A":[{"StartRegister":18,"CmdId":"2859","byteSplit":"0","value":[211]}]}}
[2024-09-17 10:16:56] DEBUG : DECODER : {"data":{"298":{"T\u00b0 Bascule Et\u00e9 Hiver":[{"StartRegister":8,"CmdId":"2865","byteSplit":"0","value":[160]}],"T\u00b0 Ambiance A":[{"StartRegister":18,"CmdId":"2859","byteSplit":"0","value":[211]}]}},"FUNC":"readF"}
Pouvez vous décocher le Hexa2Dec et voir la nouvelle remontée de valeur
pas mieux …
DEBUG:__main__:=== LECTURE DES AUTOMATES ===
DEBUG:__main__:{'298': {'typeDevice': 'rtu', 'portserial': '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_B001BMT1-if00-port0', 'baudrate': 9600, 'unitID': 10, 'parity': 'N', 'stopbits': 1, 'bytesize': 8, 'id': '298', 'eqlogicName': 'TEST De Dietrich', 'registerParams': [{'nameCmd': 'T° Bascule Eté Hiver', 'cmdId': '2865', 'format': 'longformat', 'functioncode': 'fc03', 'nbregister': '1', 'startregister': '8', 'wordorder': 'littleword', 'byteorder': 'littlebyte', 'offset': '0', 'decimal': 0, 'operation': 0, 'multiR': '0', 'byteSplit': '0', 'hexa': '0'}, {'nameCmd': 'T° Ambiance A', 'cmdId': '2859', 'format': 'longformat', 'functioncode': 'fc03', 'nbregister': '1', 'startregister': '18', 'wordorder': 'littleword', 'byteorder': 'littlebyte', 'offset': '0', 'decimal': '5', 'operation': 0, 'multiR': '0', 'byteSplit': '0', 'hexa': '0'}]}}
DEBUG:__main__:{'typeDevice': 'rtu', 'portserial': '/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_B001BMT1-if00-port0', 'baudrate': 9600, 'unitID': 10, 'parity': 'N', 'stopbits': 1, 'bytesize': 8, 'id': '298', 'eqlogicName': 'TEST De Dietrich', 'registerParams': [{'nameCmd': 'T° Bascule Eté Hiver', 'cmdId': '2865', 'format': 'longformat', 'functioncode': 'fc03', 'nbregister': '1', 'startregister': '8', 'wordorder': 'littleword', 'byteorder': 'littlebyte', 'offset': '0', 'decimal': 0, 'operation': 0, 'multiR': '0', 'byteSplit': '0', 'hexa': '0'}, {'nameCmd': 'T° Ambiance A', 'cmdId': '2859', 'format': 'longformat', 'functioncode': 'fc03', 'nbregister': '1', 'startregister': '18', 'wordorder': 'littleword', 'byteorder': 'littlebyte', 'offset': '0', 'decimal': '5', 'operation': 0, 'multiR': '0', 'byteSplit': '0', 'hexa': '0'}]}
DEBUG:__main__:{'nameCmd': 'T° Bascule Eté Hiver', 'cmdId': '2865', 'format': 'longformat', 'functioncode': 'fc03', 'nbregister': '1', 'startregister': '8', 'wordorder': 'littleword', 'byteorder': 'littlebyte', 'offset': '0', 'decimal': 0, 'operation': 0, 'multiR': '0', 'byteSplit': '0', 'hexa': '0'}
DEBUG:pymodbus.transaction:Current transaction state - IDLE
DEBUG:pymodbus.transaction:Running transaction 1
DEBUG:pymodbus.transaction:SEND: 0xa 0x3 0x0 0x8 0x0 0x1 0x4 0xb3
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0xa 0x3 0x2 0x0 0xa0 0x1d 0xfd
DEBUG:pymodbus.framer.rtu_framer:Getting Frame - 0x3 0x2 0x0 0xa0
DEBUG:pymodbus.factory:Factory Response[ReadHoldingRegistersResponse: 3]
DEBUG:pymodbus.framer.rtu_framer:Frame advanced, resetting header!!
DEBUG:pymodbus.transaction:Adding transaction 10
DEBUG:pymodbus.transaction:Getting transaction 10
DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
DEBUG:__main__:READHOLDING
DEBUG:__main__:{'nameCmd': 'T° Ambiance A', 'cmdId': '2859', 'format': 'longformat', 'functioncode': 'fc03', 'nbregister': '1', 'startregister': '18', 'wordorder': 'littleword', 'byteorder': 'littlebyte', 'offset': '0', 'decimal': '5', 'operation': 0, 'multiR': '0', 'byteSplit': '0', 'hexa': '0'}
DEBUG:pymodbus.transaction:Current transaction state - TRANSACTION_COMPLETE
DEBUG:pymodbus.transaction:Running transaction 2
DEBUG:pymodbus.transaction:SEND: 0xa 0x3 0x0 0x12 0x0 0x1 0x25 0x74
DEBUG:pymodbus.framer.rtu_framer:Changing state to IDLE - Last Frame End - 1726561985.085525, Current Time stamp - 1726561985.08917
DEBUG:pymodbus.framer.rtu_framer:Waiting for 3.5 char before next send - 4.01 ms
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
WARNING:pymodbus.client.sync:Cleanup recv buffer before send: 0x0 0x0 0x0
DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0xa 0x3 0x2 0x0 0xd3 0x5c 0x18
DEBUG:pymodbus.framer.rtu_framer:Getting Frame - 0x3 0x2 0x0 0xd3
DEBUG:pymodbus.factory:Factory Response[ReadHoldingRegistersResponse: 3]
DEBUG:pymodbus.framer.rtu_framer:Frame advanced, resetting header!!
DEBUG:pymodbus.transaction:Adding transaction 10
DEBUG:pymodbus.transaction:Getting transaction 10
DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
DEBUG:__main__:READHOLDING
DEBUG:__main__:{'data': {'298': {'T° Bascule Eté Hiver': [{'StartRegister': 8, 'CmdId': '2865', 'byteSplit': '0', 'value': [160]}], 'T° Ambiance A': [{'StartRegister': 18, 'CmdId': '2859', 'byteSplit': '0', 'value': [211]}]}}, 'FUNC': 'readF'}
[2024-09-17 10:33:05] DEBUG : Result:{"data":{"298":{"T\u00b0 Bascule Et\u00e9 Hiver":[{"StartRegister":8,"CmdId":"2865","byteSplit":"0","value":[160]}],"T\u00b0 Ambiance A":[{"StartRegister":18,"CmdId":"2859","byteSplit":"0","value":[211]}]}},"FUNC":"readF"}
[2024-09-17 10:33:05] DEBUG : DATACORRESPOND : {"298":{"T\u00b0 Bascule Et\u00e9 Hiver":[{"StartRegister":8,"CmdId":"2865","byteSplit":"0","value":[160]}],"T\u00b0 Ambiance A":[{"StartRegister":18,"CmdId":"2859","byteSplit":"0","value":[211]}]}}
[2024-09-17 10:33:05] DEBUG : DECODER : {"data":{"298":{"T\u00b0 Bascule Et\u00e9 Hiver":[{"StartRegister":8,"CmdId":"2865","byteSplit":"0","value":[160]}],"T\u00b0 Ambiance A":[{"StartRegister":18,"CmdId":"2859","byteSplit":"0","value":[211]}]}},"FUNC":"readF"}
Dernier conseil, remets tes réglages de base, vérifie que tu as bien de nouveau 160 et 211 (+/-)
Si ok, écrit intval(#value#)/10 dans calcul sur valeur. Cela donne quoi?
Si toujoura NOK, passe par des virtuels en attendant une meilleurer réponse. Un intval() pourrait aussi être nécessaire dans le virtuel.
Antoine
Il y a un champ Opération sur Calcul :
mettez y votre : /10
Ce que je trouve étrange, c’est la remontée entre [ ]
Pouvez vous supprimer le registre, et recréer la commande, sans choisir le hexa2dec initial
Ce sujet a été automatiquement fermé après 24 heures suivant le dernier commentaire. Aucune réponse n’est permise dorénavant.