node-red-contrib-s7 icon indicating copy to clipboard operation
node-red-contrib-s7 copied to clipboard

Change address from NodeRed property

Open gamesmusic454 opened this issue 1 year ago • 0 comments

It would be pretty nice if we could change the IP address of the nodes sending the IP in msg.address for example, I've tried to modify the code but I did't have luck getting my own approach into NodeRed as I've never made a Node package, the code that I've modified it's in the S7.js and my approach is the following: connOpts = { host: msg.address, port: Number(config.port), rack: Number(config.rack), slot: Number(config.slot), s7ConnOpts: s7ConnOpts } I hope that changing the host: value to msg.address gives you the possibility to make it. If there is anything required to make it work I could help with that.

gamesmusic454 avatar Sep 29 '22 11:09 gamesmusic454