{"action":"opened","issue":{"url":"https://api.github.com/repos/Cloud-Automation/node-modbus/issues/50","repository_url":"https://api.github.com/repos/Cloud-Automation/node-modbus","labels_url":"https://api.github.com/repos/Cloud-Automation/node-modbus/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/Cloud-Automation/node-modbus/issues/50/comments","events_url":"https://api.github.com/repos/Cloud-Automation/node-modbus/issues/50/events","html_url":"https://github.com/Cloud-Automation/node-modbus/issues/50","id":179048687,"number":50,"title":"Modbus RTU slave address in serial stream constantly = 0x01","user":{"login":"SuperJojo2001","id":19713876,"avatar_url":"https://avatars.githubusercontent.com/u/19713876?v=3","gravatar_id":"","url":"https://api.github.com/users/SuperJojo2001","html_url":"https://github.com/SuperJojo2001","followers_url":"https://api.github.com/users/SuperJojo2001/followers","following_url":"https://api.github.com/users/SuperJojo2001/following{/other_user}","gists_url":"https://api.github.com/users/SuperJojo2001/gists{/gist_id}","starred_url":"https://api.github.com/users/SuperJojo2001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SuperJojo2001/subscriptions","organizations_url":"https://api.github.com/users/SuperJojo2001/orgs","repos_url":"https://api.github.com/users/SuperJojo2001/repos","events_url":"https://api.github.com/users/SuperJojo2001/events{/privacy}","received_events_url":"https://api.github.com/users/SuperJojo2001/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-24T19:55:10Z","updated_at":"2016-09-24T19:55:10Z","closed_at":null,"body":"Using node-red-contrib-modbus which is based on \"node-modbus\" I have no chance today to send any serial request to an address other than 1. So whatever I do on the serial line I see always a value 0x01 as first byte sent to the serial line.\r\n\r\nI went to the source code and in the current onSend function...\r\n\r\nvar onSend = function (pdu) {\r\n\r\n            var pkt = Put()\r\n                .word8(1)\r\n                .put(pdu),\r\nbuf = pkt.buffer();\r\n\r\n\r\n... I see that the first byte is set to value 1 always. This shall be change to enable the possibility to sent to different slave addresses other than 1.\r\n\r\nwatch Modbus RTU spec here http://www.modbus.org/docs/Modbus_over_serial_line_V1_02.pdf\r\n\r\n"}}
{"actor":{"display_login":"SuperJojo2001"}}