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.

Connect to a Nibe heatpump with modbus via RS485
#1
Hi,
would it be possible possible to use the modbus-mapper to send/read information from my Nibe heat pump,
see protocol description below.

Serial settings: 9600 baud, 8 bits, Parity: none, Stop bits 1
 
 MODBUS module support should be turned ON from the heat pump.
 
 Frame format:
 +----+----+----+-----+-----+----+----+-----+
 | 5C | 00 | 20 | CMD | LEN |  DATA  | CHK |
 +----+----+----+-----+-----+----+----+-----+
 
 Checksum: XOR
 
 When valid data is received (checksum ok),
  ACK (0x06) should be sent to the heat pump.
 When checksum mismatch,
  NAK (0x15) should be sent to the heat pump.

Regards Johan
Reply
#2
The frame format you've specified is not ModBus, though from the documentation it looks like standard ModBus is supported.
Try this resident script (sleep time about 10 seconds), you should either get a value or an error message in Logs tab, don't forget to disable RTU in mapper and change port handle if your is different:
Code:
require('luamodbus')

mb = luamodbus.rtu()

mb:open('/dev/RS485', 9600, 'N', 8, 1, 'H')
mb:connect()

mb:setslave(1)
mb:setresponsetimeout(3)

log(mb:readregisters(40004))

mb:close()
Reply
#3
Thanks Edgars,
How do I send the acknowledge, see documention below?

When valid data is received (checksum ok),
ACK (0x06) should be sent to the heat pump.
When checksum mismatch,
NAK (0x15) should be sent to the heat pump.


If heat pump does not receive acknowledge in certain time period,
pump will raise an alarm and alarm mode is activated.
Actions on alarm mode can be configured. The different alternatives
are that the Heat pump stops producing hot water (default setting)
 and/or reduces the room temperature.

Regards Johan
Reply


Forum Jump: