joriws / nilan2homeassistant

Nilan modbus to home assistant gateway with ha discovery
3 stars 1 forks source link

nilan2homeassistant

This repository contains Home Assistant configuration files and information how to natively integrate Nilan E-series heatpumps into Home Assistant. As I don't have EC9 with floor heating support I could not prepare temperature out to battery/floor heating. If you have EC9 and want to enhance, it should be doable although I understand you need to emulate keypresses to set floor heating circuit settings. Please create pull request after making configuration work.

!NOTE! Writing to modbus registers is not done. It requires climates and switches configuration. Check todo..

Hardware requirements:

The architecture is like this as typically modbus slave such Nilan is not close to Home Assistant running computer so you need some kind of remote connection, which is implemented over WiFi via Raspberry Zero W on my setup.

Comms architecture

Modbus gateway installation:

  1. Install mbusd gateway software into gateway hardware; I use Raspberry Pi Zero W with Raspbian. Other Linux computer should be fine. Use mbusd instructions.
  2. Copy provided mbusd-ttyUSB0.conf to /etc/mbusd/
  3. Connect USB/RS-485 adapter to Nilan controller board and Raspberry's USB port. Check Nilan documentation where to connect and how.
  4. Configure mbusd for start, I used systemctl service option to load on boot. Configure by changing filename and port in file and start/enable command line if your usb-port other than /dev/ttyUSB0
    systemctl enable mbusd@ttyUSB0.service
  5. Start mbusd
    systemctl start mbusd@ttyUSB0.service

Home assistant installation:

  1. Copy modbus_nilanec.yaml into /config -directory
  2. Modify modbus_nilanec.yaml -file with your mbusd gateway IP-address
  3. Copy NilanEC.svg into /config/www -directory
  4. Add configuration lines under homeassistant: -tag
    homeassistant:
    packages:
    nilanec: !include modbus_nilanec.yaml
  5. Go to developement - Check configuration files and if OK, restart
  6. Edit some dashboard and create picture-element card and paste nilanec_picture-element-card.yaml into editor and save

If everything works you should see following without Nilan power/energy consumption, as that is another card I decided to add to screenshot.

Working picture-element-card

Enhancements / Todo

Bugs

There might be bugs on picture card or in modbus-package, please report or create pull requests.

Known issues: