This library receives and responds to messages on the NIBE MODBUS 40 RS-485 serial interface. It requests data items to be read or written, and forwards the read data.
The available data items are according to these JSON files. The requests use the name
field for identification, and the value is interpreted according to the other fields as int, float or mapping string, for example:
name | value |
---|---|
bt1-outdoor-temperature-40004 | 11.6 |
hot-water-comfort-mode-47041 | ECONOMY |
The program forwards UDP datagrams from NIBE, and takes data requests from MQTT. The topic is the name prefixed, and the value JSON-encoded in the payload.
The climate unit can also be configured in its logging function to continously publish a set of variables on a separate topic. See nibe-log-set for configuration.
With MODBUS 40, a NIBE climate unit can be controlled and monitored by external Modbus-equipped equipment.
This accessory is connected to an RS-485 bus according to the linked manual. It makes read and write requests when polled, and receives requested data.
NIBE ModbusManager can be used to select up to 23 data items in a LOG.SET file that, when uploaded to the climate unit from a USB drive, causes those data items to be continuously sent on the accessory interface without read requests.
Note The serial protocol on the RS-485 bus is not Modbus. It is an undocumented internal NIBE protocol.
There are other devices that connect to the same interface:
- OpenHAB Nibe Heatpump Binding is an Arduino firmware or Linux service that forwards the communication to UDP. The datagrams are handled by OpenHAB or Jevgeni Kiski's Nibe library.
- NibePi is a RaspberryPi image with a NodeRed module for communicating, and other NodeRed modules for adjusting the climate unit to the electricity price.
The program was developed to accept datagrams from an Elfin EW11A RS-485 to WiFi adapter. The adapter is configured as a UDP client sending datagrams to where this program is running according to this configuration. It forwards raw RS-485 frames without interpretation. This program returns the response.
The serial interface seems sensitive to delays in the response. In my infrastructure replacing UDP with TCP works, but not with MQTT.