Open albgit opened 3 weeks ago
I will look into it in two weeks.Von meinem iPhone gesendetAm 31.10.2024 um 02:01 schrieb albgit @.***>: I'm trying to add a coil to my working specification (with only holding registers), but it fails to read it. I remeber that modbus2mqtt uses the same modbus api as nodered, so I tried to replicate the coil read there (coil 21). Everything is working fine so I assume that is a modbus2mqtt problem. Log:
Add-on: Modbus <=> MQTT Service converts RTU and TCP Modbus to MQTT from other Add-on version: 0.16.11 You are running the latest version of this add-on. System: Home Assistant OS 13.2 (amd64 / generic-x86-64) Home Assistant Core: 2024.10.2 Home Assistant Supervisor: 2024.10.3 Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat. s6-rc: info: service base-addon-banner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service base-addon-log-level: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service base-addon-log-level successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started 10/30/2024 9:19:01 PM notice HttpServerBase Hassio authentication successful 10/30/2024 9:19:01 PM notice modbus2mqtt modbus2mqtt listening on 37e92509-modbus2mqtt: 3000 10/30/2024 11:11:10 PM notice modbuscache http(3) readDiscreteInputs TIMEOUT: slave:3 address: 0 length:1 retrying ... 10/30/2024 11:12:14 PM notice modbuscache http(3) readDiscreteInputs TIMEOUT: slave:3 address: 21 length:1 retrying ... nodered flow with coil reading: coil.nodered.png (view on web)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
Can you please download the specification and attach it to the issue? (Menu/import/export) download link of the affected specification.I tested the coils with RTU only. May be that’s the reason.Von meinem iPhone gesendetAm 31.10.2024 um 07:20 schrieb Volkmar Nissen @.>:I will look into it in two weeks.Von meinem iPhone gesendetAm 31.10.2024 um 02:01 schrieb albgit @.>: I'm trying to add a coil to my working specification (with only holding registers), but it fails to read it. I remeber that modbus2mqtt uses the same modbus api as nodered, so I tried to replicate the coil read there (coil 21). Everything is working fine so I assume that is a modbus2mqtt problem. Log:
Add-on: Modbus <=> MQTT Service converts RTU and TCP Modbus to MQTT from other Add-on version: 0.16.11 You are running the latest version of this add-on. System: Home Assistant OS 13.2 (amd64 / generic-x86-64) Home Assistant Core: 2024.10.2 Home Assistant Supervisor: 2024.10.3 Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat. s6-rc: info: service base-addon-banner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service base-addon-log-level: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service base-addon-log-level successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started 10/30/2024 9:19:01 PM notice HttpServerBase Hassio authentication successful 10/30/2024 9:19:01 PM notice modbus2mqtt modbus2mqtt listening on 37e92509-modbus2mqtt: 3000 10/30/2024 11:11:10 PM notice modbuscache http(3) readDiscreteInputs TIMEOUT: slave:3 address: 0 length:1 retrying ... 10/30/2024 11:12:14 PM notice modbuscache http(3) readDiscreteInputs TIMEOUT: slave:3 address: 21 length:1 retrying ... nodered flow with coil reading: coil.nodered.png (view on web)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
I've attached the specification file, but I can't add the coil to it (the specification editor doesn't permit it). This is the screenshoot of the editor:
Thank you for attaching the specification. It helped to get an idea of the issue. However, I have no device with the same behaviour. My devices have a single coil per address. Your device seem to have 8 coils per address.
So, can you please help me? Add three coils to your specification. Modbus Address = 1,2,3 (one by one) Please let me know if they return values.
These are my expectations:
Modbus2mqtt Address | Byte | Bit | description |
---|---|---|---|
1 | 1 | 8 | Weekly Timer |
2 | 2 | 16 | Solar Heater |
3 | 3 | 24 | Floor Debug |
Please let me know whether my expectations are correct.
You can also select the first bit of any other Byte to verify the value.
If I understood it returns no results...
s6-rc: info: service base-addon-banner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service base-addon-log-level: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service base-addon-log-level successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started 11/15/2024 6:32:26 PM notice HttpServerBase Hassio authentication successful url:/api/hassio_ingress/V-WPNoBn6KfX9HNBTDRBbQ1DOannwEfEPmT8f8Ea7Dc 11/15/2024 6:32:26 PM notice modbus2mqtt modbus2mqtt listening on 37e92509-modbus2mqtt: 3000 11/15/2024 6:55:41 PM notice modbuscache http(3) readDiscreteInputs TIMEOUT: slave:3 address: 1 length:1 retrying ... 11/15/2024 6:56:37 PM notice modbuscache http(3) readDiscreteInputs TIMEOUT: slave:3 address: 0 length:2 retrying ... 11/15/2024 6:57:08 PM notice modbuscache http(3) readDiscreteInputs TIMEOUT: slave:3 address: 1 length:1 retrying ... 11/15/2024 6:57:28 PM notice modbuscache http(3) readDiscreteInputs TIMEOUT: slave:3 address: 1 length:2 retrying ... 11/15/2024 6:58:00 PM notice modbuscache http(3) readDiscreteInputs TIMEOUT: slave:3 address: 2 length:1 retrying ... 11/15/2024 6:58:31 PM notice modbuscache http(3) readDiscreteInputs TIMEOUT: slave:3 address: 0 length:3 retrying ... 11/15/2024 6:59:02 PM notice modbuscache http(3) readDiscreteInputs TIMEOUT: slave:3 address: 1 length:1 retrying ... 11/15/2024 6:59:32 PM notice modbuscache http(3) readDiscreteInputs TIMEOUT: slave:3 address: 1 length:3 retrying ... 11/15/2024 7:00:03 PM notice modbuscache http(3) readDiscreteInputs TIMEOUT: slave:3 address: 2 length:1 retrying ...
I also couldn't manage to read coils. Here is screenshot from validation response:
And to be sure i also check reading coils from pymodbus using this piece of code: `result = client.read_input_registers(address=0x0000, count=0x01, slave=0x01) print (result.registers)
result = client.read_coils(address=0x0000, count=0x01, slave=0x01) print (result.bits)`
and got result:
[3] [True, False, False, False, False, False, False, False]
Maybe there is something I don't understand here but I assume that first coil is active.
Yes, this is still not solved. I have no device with multiple coils per byte.Von meinem iPhone gesendetAm 19.11.2024 um 19:37 schrieb arturmietek @.***>:
I also couldn't manage to read coils.
Here is screenshot from validation response:
image.png (view on web)
And to be sure i also check reading coils from pymodbus using this piece of code:
result = client.read_input_registers(address=0x0000, count=0x01, slave=0x01) print (result.registers) result = client.read_coils(address=0x0000, count=0x01, slave=0x01) print (result.bits)
and got result:
[3] [True, False, False, False, False, False, False, False]
Maybe there is something I don't understand here but I assume that first coil is active.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
In my case I would like to build driveway gate adapter. I started with Arduino UNO and UART to RS485 board. It is simple to make Modbus slave with https://github.com/CMB27/ModbusADU library. In this project i can use holding register to provide opening request but coils would be more elegant way.
Maybe i can make some debug for you?
For Arduino as modbus slave, it should be possible to use coils. There is a working specification named "Dimplex PCO5" it has two or three coil entities. If your device sticks to modbus standard with one coil (bit) per address, it works. The "Dimplex PCO5" is a working example.
I'm trying to add a coil to my working specification (with only holding registers), but it fails to read it. I remeber that modbus2mqtt uses the same modbus api as nodered, so I tried to replicate the coil read there (coil 21). Everything is working fine so I assume that is a modbus2mqtt problem.
Log:
Add-on: Modbus <=> MQTT Service converts RTU and TCP Modbus to MQTT from other
Add-on version: 0.16.11 You are running the latest version of this add-on. System: Home Assistant OS 13.2 (amd64 / generic-x86-64) Home Assistant Core: 2024.10.2 Home Assistant Supervisor: 2024.10.3
Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.
s6-rc: info: service base-addon-banner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service base-addon-log-level: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service base-addon-log-level successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started 10/30/2024 9:19:01 PM notice HttpServerBase Hassio authentication successful 10/30/2024 9:19:01 PM notice modbus2mqtt modbus2mqtt listening on 37e92509-modbus2mqtt: 3000 10/30/2024 11:11:10 PM notice modbuscache http(3) readDiscreteInputs TIMEOUT: slave:3 address: 0 length:1 retrying ... 10/30/2024 11:12:14 PM notice modbuscache http(3) readDiscreteInputs TIMEOUT: slave:3 address: 21 length:1 retrying ...
nodered flow with coil reading: