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.

Modbus help
#11
(09.07.2026, 06:40)admin Wrote: If you need to change the unit number dynamically then you should use scripts with a single write of multiple registers. The Modbus device might only handle a small number of parallel TCP connections which leads to communication issues.

Try logging the result of connect/write:
Code:
mb = require('luamodbus').tcp() mb:open('192.168.1.1', 502) res, err = mb:connect() if res then   res, err = mb:writeregisters(1, 2, 3)   if not res then     log('write failed', err)   end  else   log('connection failed', err) end mb:close()

The air conditioner communicates via the gateway's 485 interface using wired communication. Currently, I have placed the register reading in the resident script and the register writing in the event script. There has been a problem with communication conflicts between the event script and the resident script during use, causing the event script not to execute actions. Is there a good solution for this?
Reply


Messages In This Thread
Modbus help - by nisan - 22.04.2026, 09:35
RE: Modbus help - by admin - 22.04.2026, 09:36
RE: Modbus help - by nisan - 22.04.2026, 09:40
RE: Modbus help - by admin - 22.04.2026, 09:42
RE: Modbus help - by nisan - 28.04.2026, 06:05
RE: Modbus help - by nisan - 08.07.2026, 03:24
RE: Modbus help - by admin - 28.04.2026, 06:20
RE: Modbus help - by admin - 08.07.2026, 06:53
RE: Modbus help - by nisan - 09.07.2026, 04:06
RE: Modbus help - by admin - 09.07.2026, 06:40
RE: Modbus help - by nisan - 09.07.2026, 07:01
RE: Modbus help - by admin - 09.07.2026, 07:04

Forum Jump: