This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Integration Between AFD WEB (RS485) + homeLYnk (ModBus)
#3
(Yesterday, 11:00)Daniel Wrote: on SE hw port is /dev/RS485 not /dev/RS485-1

Modify to RS485 instead of RS485-1 in:

Code:
-- load mbus library require('mbus') -- use /dev/RS485 serial port with 2400 baud rate mbus.init('/dev/RS485', 2400) -- new address to write addr = event.getvalue() -- change short address from default 0 to new one res, err = mbus.writeaddr(0, addr) -- change ok if res then   alert('[mbus] changed short address to' .. addr) -- change failed else   alert('[mbus] failed to change short address to ' .. addr .. ' ' .. tostring(err)) end

The error log is still givinng me:
 
Code:
Test Modbus 12.09.2026 12:48:35 User script:6: attempt to index global 'event' (a nil value) stack traceback:
Reply


Messages In This Thread
RE: Integration Between AFD WEB (RS485) + homeLYnk (ModBus) - by JuLopez - Yesterday, 11:10

Forum Jump: