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.

M-Bus (Meter-Bus) library and examples
#23
(Yesterday, 10:12)Daniel Wrote: Did you change the port name in the script accordingly?

this is my script:
require('mbus')
-
res,err= mbus.init('/dev/RS485-1', 2400

log (res,err)

--scan from range 0 to 5 (inclusive)

res1,err = mbus.scan(0, 100)
--save result to Logs tab

log(res1,err)

-- read all data from device 26

res2, er = mbus.getdata(26)
log ( res2,er)

-- read ok
if res2 then
  log(res2)
-- read failed
else
  log('[mbus] failed to read data from short address ' .. 26 .. ' ' .. tostring(err))
end
Reply


Messages In This Thread
RE: M-Bus (Meter-Bus) library and examples - by Acla - 10 hours ago

Forum Jump: