Closed mczerski closed 3 months ago
Started mosquitto from docker as in your example and got the same connection problem. I think you need to configure mosquitto to allow connections from remote network. docker logs shows:
[zork@archdevel ~]$ docker logs 9f5c771b5956
1715930388: mosquitto version 2.0.18 starting
1715930388: Config loaded from /mosquitto/config/mosquitto.conf.
1715930388: Starting in local only mode. Connections will only be possible from clients running on this machine.
1715930388: Create a configuration file which defines a listener to allow remote access.
1715930388: For more details see https://mosquitto.org/documentation/authentication-methods/
yeah, thats it. got it working with network=host. I must say that I'm very impressed how fast modmqttd talks to my usb-uart adapter. I am able to reach around 500 request/response cycles per second for reading single coil.
I am glad that it worked :-)
Yes, speed is a priority here. I am using this gateway for controlling light switches by polling registers that holds switch counters. A 0.3s or slower for full round-trip (modbus poll -> MQTT publish counter -> process -> publish light toggle -> modbus write) starts to feel clumsy :-).
For RTU with single slave it is very fast. Things starts to get complicated when there are multiple slaves from different vendors. You may need to add some delays in this case.
Yes, speed is a priority here. I am using this gateway for controlling light switches by polling registers that holds switch counters.
This is exactly what I want to do :-) right now I just want to make a proof of concept but it seems like I found a proof already :-D glad to know I'm heading the right direction.
I will be using my own hardware for that so I'm not worried by clumsy firmware in modbus slaves.
I get this error when trying to use modmqttd and have no clue what is wrong. I'm using mosquitto as broker started like that:
modmqttd config:
stdout of modmqttd: