Here is how I checked if the pump responds to modbus using https://github.com/favalex/modbus-cli
Installing modbus-cli
git clone [email protected]:favalex/modbus-cli.git
python3 -m venv .env
source .env/bin/activate
pip install modbus_cli
Getting modbus addresses from https://proffs.nibe.se/upload/NEW/Support/Kommunikation/M12676SV.pdf
Note that for me the following addresses are not included since they’re not working, probably due to the features missing or not being used 8, 39, 1319.
Calling pump using modbus-cli with the addresses above
modbus 192.168.x.y i@1/h -v
modbus 192.168.x.y i@5/h -v
modbus 192.168.x.y i@7/h -v
modbus 192.168.x.y i@9/h -v
modbus 192.168.x.y i@10/h -v
modbus 192.168.x.y i@11/h -v
modbus 192.168.x.y i@12/h -v
modbus 192.168.x.y i@13/h -v
modbus 192.168.x.y i@14/h -v
modbus 192.168.x.y i@16/h -v
modbus 192.168.x.y i@26/h -v
modbus 192.168.x.y i@86/h -v
modbus 192.168.x.y i@1102/h -v
modbus 192.168.x.y i@853/h -v
modbus 192.168.x.y i@218/h -v
modbus 192.168.x.y i@1046/h -v
modbus 192.168.x.y i@1083/h -v
modbus 192.168.x.y i@1100/h -v
modbus 192.168.x.y i@1104/h -v
modbus 192.168.x.y i@222/h -v
Optionally you should be able to use an input file like below
$ sudo nano registers.modbus
nibe_utetemperatur_BT1 i@1/h
nibe_framledningstemperatur_BT2 i@5/h
nibe_returledningstemperatur_BT3 i@7/h
nibe_varmvatten_laddning_BT6 i@9/h
nibe_koldbarare_in_BT10 i@10/h
nibe_koldbarare_ut_BT11 i@11/h
nibe_kondensor_fram_BT12 i@12/h
nibe_hetgas_BT14 i@13/h
nibe_vatskeledning_BT15 i@14/h
nibe_suggas_BT17 i@16/h
nibe_rumstemperatur_1_BT50 i@26/h
nibe_kompressorgivare_EB100_BT29 i@86/h
nibe_varmebararpumphastighet_GP1 i@1102/h
nibe_driftlage_varmebararpump i@853/h
nibe_varmebararpumphastighet_GP1_Manuell i@218/h
nibe_aktuell_kompressorfrekvens i@1046/h
nibe_kompressorstarter i@1083/h
nibe_kompressor_status i@1100/h
nibe_koldbararpumphastighet_GP2 i@1104/h
nibe_koldbararpumphastighet_GP2_Manuell i@222/h
Using the file above
modbus -r registers.modbus 192.168.x.y nibe\*
The other registers return just fine as per the output below.
(.env) pi@raspberrypi:~/Documents $ modbus -r registers.modbus 192.168.x.y nibe\*
Parsed 20 registers definitions from 2 files
nibe_utetemperatur_BT1: 51 0x33
nibe_framledningstemperatur_BT2: 460 0x1cc
nibe_returledningstemperatur_BT3: 303 0x12f
nibe_varmvatten_laddning_BT6: 420 0x1a4
nibe_koldbarare_in_BT10: 52 0x34
nibe_koldbarare_ut_BT11: 26 0x1a
nibe_kondensor_fram_BT12: 355 0x163
nibe_hetgas_BT14: 790 0x316
nibe_vatskeledning_BT15: 336 0x150
nibe_suggas_BT17: 88 0x58
nibe_rumstemperatur_1_BT50: 229 0xe5
nibe_kompressorgivare_EB100_BT29: -32768 -0x8000
nibe_varmebararpumphastighet_GP1_Manuell: 0 0x0
nibe_koldbararpumphastighet_GP2_Manuell: 0 0x0
nibe_driftlage_varmebararpump: 0 0x0
nibe_aktuell_kompressorfrekvens: 270 0x10e
nibe_kompressorstarter: 493 0x1ed
nibe_kompressor_status: 1 0x1
nibe_varmebararpumphastighet_GP1: 100 0x64
nibe_koldbararpumphastighet_GP2: 41 0x29
I have tried translating this all into home assistant modbus which to me should be something like
modbus:
type: tcp
host: 192.168.x.y
port: 502
name: "Nibe"
delay: 10
#close_comm_on_error: true
retry_on_empty: true
retries: 3
timeout: 15
message_wait_milliseconds: 500
sensors:
- name: "Nibe - Utetemperatur (BT1)"
unit_of_measurement: "°C"
data_type: int16
device_class: temperature
address: 1
input_type: input
scale: 0.1
precision: 1
state_class: measurement
- name: "Nibe - Framledningstemperatur (BT2)"
unit_of_measurement: "°C"
data_type: int16
device_class: temperature
address: 5
input_type: input
scale: 0.1
precision: 1
state_class: measurement
- name: "Nibe - Returledningstemperatur (BT3)"
unit_of_measurement: "°C"
data_type: int16
device_class: temperature
address: 7
input_type: input
scale: 0.1
precision: 1
state_class: measurement
#- name: "Nibe - Varmvatten topp (BT7)"
# unit_of_measurement: "°C"
# data_type: int16
# device_class: temperature
# address: 8
# input_type: input
# scale: 0.1
# precision: 1
# state_class: measurement
- name: "Nibe - Varmvatten laddning (BT6)"
unit_of_measurement: "°C"
data_type: int16
device_class: temperature
address: 9
input_type: input
scale: 0.1
precision: 1
state_class: measurement
- name: "Nibe - Köldbärare in (BT10)"
unit_of_measurement: "°C"
data_type: int16
device_class: temperature
address: 10
input_type: input
scale: 0.1
precision: 1
state_class: measurement
- name: "Nibe - Köldbärare ut (BT11)"
unit_of_measurement: "°C"
data_type: int16
device_class: temperature
address: 11
input_type: input
scale: 0.1
precision: 1
state_class: measurement
- name: "Nibe - Kondensor fram (BT12)"
unit_of_measurement: "°C"
data_type: int16
device_class: temperature
address: 12
input_type: input
scale: 0.1
precision: 1
state_class: measurement
- name: "Nibe - Hetgas (BT14)"
unit_of_measurement: "°C"
data_type: int16
device_class: temperature
address: 13
input_type: input
scale: 0.1
precision: 1
state_class: measurement
- name: "Nibe - Vätskeledning (BT15)"
unit_of_measurement: "°C"
data_type: int16
device_class: temperature
address: 14
input_type: input
scale: 0.1
precision: 1
state_class: measurement
- name: "Nibe - Suggas (BT17)"
unit_of_measurement: "°C"
data_type: int16
device_class: temperature
address: 16
input_type: input
scale: 0.1
precision: 1
state_class: measurement
- name: "Nibe - Rumstemperatur 1 (BT50)"
unit_of_measurement: "°C"
data_type: int16
device_class: temperature
address: 26
input_type: input
scale: 0.1
precision: 1
state_class: measurement
#- name: "Nibe - Extern Framledning (BT25)"
# unit_of_measurement: "°C"
# data_type: int16
# device_class: temperature
# address: 39
# input_type: input
# scale: 0.1
# precision: 1
# state_class: measurement
- name: "Nibe - Kompressorgivare (EB100-BT29)"
unit_of_measurement: "°C"
data_type: int16
address: 86
input_type: input
scale: 0.1
precision: 1
state_class: measurement
- name: "Nibe - Värmebärarpumphastighet (GP1)"
unit_of_measurement: "%"
data_type: int16
device_class: temperature
address: 1102
input_type: input
scale: 0.1
precision: 1
state_class: measurement
- name: "Nibe - Värmebärarpumphastighet Manuell (GP1)"
unit_of_measurement: "%"
data_type: int16
device_class: power_factor
address: 218
input_type: input
scale: 1
precision: 1
state_class: measurement
- name: "Nibe - Aktuell kompressorfrekvens"
unit_of_measurement: "Hz"
data_type: int16
address: 1046
input_type: input
scale: 1
precision: 1
state_class: measurement
- name: "Nibe - Kompressorstarter"
unit_of_measurement: None
data_type: int16
address: 1083
input_type: input
scale: 1
precision: 1
state_class: measurement
- name: "Nibe - Köldbärarpumphastighet (GP2)"
unit_of_measurement: "%"
data_type: int16
device_class: power_factor
address: 1104
input_type: input
scale: 1
precision: 1
state_class: measurement
- name: "Nibe - Köldbärarpumphastighet Manuell (GP2)"
unit_of_measurement: "%"
data_type: int16
device_class: power_factor
address: 222
input_type: input
scale: 1
precision: 1
state_class: measurement
binary_sensors:
- name: "Nibe - Driftläge värmebärarpump"
address: 853
input_type: discrete_input
device_class: power
- name: "Nibe - Kompressor status"
address: 1100
input_type: discrete_input
device_class: power
#- name: "Nibe - Driftläge köldbärarpump"
# address: 1319
# input_type: discrete_input
# device_class: power
Enabling logs using
logger:
default: warning
logs:
pymodbus: debug
homeassistant.components.modbus: debug
pymodbus.client: debug
Yields the following logs. Sorry for the long entry here
2021-10-10 06:03:09 DEBUG (SyncWorker_6) [pymodbus.transaction] Current transaction state - IDLE
2021-10-10 06:03:09 DEBUG (SyncWorker_6) [pymodbus.transaction] Running transaction 1
2021-10-10 06:03:09 DEBUG (SyncWorker_6) [pymodbus.transaction] SEND: 0x0 0x1 0x0 0x0 0x0 0x6 0x0 0x2 0x3 0x55 0x0 0x1
2021-10-10 06:03:09 DEBUG (SyncWorker_6) [pymodbus.client.sync] New Transaction state 'SENDING'
2021-10-10 06:03:09 DEBUG (SyncWorker_6) [pymodbus.transaction] Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
2021-10-10 06:03:09 DEBUG (SyncWorker_6) [pymodbus.transaction] Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
2021-10-10 06:03:09 DEBUG (SyncWorker_6) [pymodbus.transaction] RECV: 0x0 0x1 0x0 0x0 0x0 0x3 0x0 0x82 0x1
2021-10-10 06:03:09 DEBUG (SyncWorker_6) [pymodbus.framer.socket_framer] Processing: 0x0 0x1 0x0 0x0 0x0 0x3 0x0 0x82 0x1
2021-10-10 06:03:09 DEBUG (SyncWorker_6) [pymodbus.factory] Factory Response[130]
2021-10-10 06:03:09 DEBUG (SyncWorker_6) [pymodbus.transaction] Adding transaction 1
2021-10-10 06:03:09 DEBUG (SyncWorker_6) [pymodbus.transaction] Getting transaction 1
2021-10-10 06:03:09 DEBUG (SyncWorker_6) [pymodbus.transaction] Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
2021-10-10 06:03:09 ERROR (SyncWorker_6) [homeassistant.components.modbus.modbus] Pymodbus: Nibe: Exception Response(130, 2, IllegalFunction)
2021-10-10 06:03:09 DEBUG (SyncWorker_10) [pymodbus.transaction] Current transaction state - TRANSACTION_COMPLETE
2021-10-10 06:03:09 DEBUG (SyncWorker_10) [pymodbus.transaction] Running transaction 2
2021-10-10 06:03:09 DEBUG (SyncWorker_10) [pymodbus.transaction] SEND: 0x0 0x2 0x0 0x0 0x0 0x6 0x0 0x2 0x4 0x4c 0x0 0x1
2021-10-10 06:03:09 DEBUG (SyncWorker_10) [pymodbus.client.sync] New Transaction state 'SENDING'
2021-10-10 06:03:09 DEBUG (SyncWorker_10) [pymodbus.transaction] Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
2021-10-10 06:03:09 DEBUG (SyncWorker_10) [pymodbus.transaction] Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
2021-10-10 06:03:09 DEBUG (SyncWorker_10) [pymodbus.transaction] RECV: 0x0 0x2 0x0 0x0 0x0 0x3 0x0 0x82 0x1
2021-10-10 06:03:09 DEBUG (SyncWorker_10) [pymodbus.framer.socket_framer] Processing: 0x0 0x2 0x0 0x0 0x0 0x3 0x0 0x82 0x1
2021-10-10 06:03:09 DEBUG (SyncWorker_10) [pymodbus.factory] Factory Response[130]
2021-10-10 06:03:09 DEBUG (SyncWorker_10) [pymodbus.transaction] Adding transaction 2
2021-10-10 06:03:09 DEBUG (SyncWorker_10) [pymodbus.transaction] Getting transaction 2
2021-10-10 06:03:09 DEBUG (SyncWorker_10) [pymodbus.transaction] Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
2021-10-10 06:03:09 DEBUG (SyncWorker_10) [homeassistant.components.modbus.modbus] Pymodbus: Nibe: Exception Response(130, 2, IllegalFunction)
2021-10-10 06:03:09 DEBUG (SyncWorker_9) [pymodbus.transaction] Current transaction state - TRANSACTION_COMPLETE
2021-10-10 06:03:09 DEBUG (SyncWorker_9) [pymodbus.transaction] Running transaction 3
2021-10-10 06:03:09 DEBUG (SyncWorker_9) [pymodbus.transaction] SEND: 0x0 0x3 0x0 0x0 0x0 0x6 0x0 0x2 0x5 0x27 0x0 0x1
2021-10-10 06:03:09 DEBUG (SyncWorker_9) [pymodbus.client.sync] New Transaction state 'SENDING'
2021-10-10 06:03:09 DEBUG (SyncWorker_9) [pymodbus.transaction] Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
2021-10-10 06:03:09 DEBUG (SyncWorker_9) [pymodbus.transaction] Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
2021-10-10 06:03:09 DEBUG (SyncWorker_9) [pymodbus.transaction] RECV: 0x0 0x3 0x0 0x0 0x0 0x3 0x0 0x82 0x1
2021-10-10 06:03:09 DEBUG (SyncWorker_9) [pymodbus.framer.socket_framer] Processing: 0x0 0x3 0x0 0x0 0x0 0x3 0x0 0x82 0x1
2021-10-10 06:03:09 DEBUG (SyncWorker_9) [pymodbus.factory] Factory Response[130]
2021-10-10 06:03:09 DEBUG (SyncWorker_9) [pymodbus.transaction] Adding transaction 3
2021-10-10 06:03:09 DEBUG (SyncWorker_9) [pymodbus.transaction] Getting transaction 3
2021-10-10 06:03:09 DEBUG (SyncWorker_9) [pymodbus.transaction] Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
2021-10-10 06:03:09 DEBUG (SyncWorker_9) [homeassistant.components.modbus.modbus] Pymodbus: Nibe: Exception Response(130, 2, IllegalFunction)
2021-10-10 06:03:09 DEBUG (SyncWorker_6) [pymodbus.transaction] Current transaction state - TRANSACTION_COMPLETE
Any ideas why I’m not getting any data?
EDITED
I was missing slave: 1
.
More details on solution plus a working home assistant configuration can be found here https://github.com/home-assistant/core/issues/57410#issuecomment-939441649