Cloud-Automation / node-modbus

Modbus TCP Client/Server implementation for Node.JS
467 stars 174 forks source link

RTU server unit ID #307

Closed JaagupAverin closed 1 year ago

JaagupAverin commented 2 years ago

Hello. I am confused as to how, when constructing the RTU server, one can assign the server's unit ID? Right now the server is reacting to all incoming data.

stefanpoeter commented 2 years ago

Hey @JaagupAverin ,

there isn't any. The serve does not check the unit ID. That is clearly a missing feature but it should not be that hard to implement. Would you care to setup a pull request?

KamaxSuen commented 1 year ago

Hi

I make a simple patch to address this issue. It work for me

jsmodbus-rtu-unit-id.patch

stefanpoeter commented 1 year ago

Hi @KamaxSuen

thanks for your work. Can you put this in a pull request.

KamaxSuen commented 1 year ago

Hi @KamaxSuen

thanks for your work. Can you put this in a pull request.

Hi @stefanpoeter

Thanks for appreciation I'm newcomer in GitHub. I'm not familiar how to create pull request but I will try