core
core copied to clipboard
[Errno 104] Connection reset by peer and [Errno 111] Connect call failed after updating heat pump to 2.22.6
The problem
After updating the S1255 heat pump to software version 2.22.6 the integration is unable to fetch all information from the heat pump. I can see in the dashboard that the integration starts to fetch information but before all registers is read the integration throws the errors below. I suspect it may be because Nibe added new Modbus TCP/IP registers?
https://www.nibe.eu/webdav/files/myuplink_changelog/nibe-n.pdf
Added Modbus TCP/IP registers to read shunt voltage for extra climatesystem 2-8
- Climatesystem 2 = 2401
- Climatesystem 3 = 2402
- Climatesystem 4 = 2403
- Climatesystem 5 = 2404
- Climatesystem 6 = 2405
- Climatesystem 7 = 2406
- Climatesystem 8 = 2407
Added RPP10 to holiday functionality
Added possibility to add hourly prices in menu and by Modbus TCP/IP for shunted addition in Smart
Energy Source
Added extended ventilation settings on home screen and RMU S40
Added power consumption for S135 in energy log
2023-10-20 10:28:35.180 ERROR (MainThread) [homeassistant.components.nibe_heatpump] Unexpected error fetching Nibe Heat Pump data: [Errno 104] Connection reset by peer
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/nibe_heatpump/__init__.py", line 266, in _async_update_data
return await self._async_update_data_internal()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/nibe_heatpump/__init__.py", line 288, in _async_update_data_internal
async for data in self.connection.read_coils(_get_coils()):
File "/usr/local/lib/python3.11/site-packages/nibe/connection/__init__.py", line 43, in read_coils
yield await self.read_coil(coil, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 88, in async_wrapped
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 47, in __call__
do = self.iter(retry_state=retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tenacity/__init__.py", line 314, in iter
return fut.result()
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 50, in __call__
result = await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nibe/connection/modbus.py", line 116, in read_coil
result = await self._client.read_holding_registers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/async_modbus/core.py", line 181, in read_holding_registers
return await self._send_message(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/async_modbus/core.py", line 142, in _send_message
return await self.protocol._async_send_message(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/async_modbus/core.py", line 42, in send_message_tcp
response_error_adu = await reader.readexactly(exception_adu_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sockio/aio.py", line 36, in wrapper
return await coro
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sockio/aio.py", line 383, in readexactly
return await self._readexactly(n)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sockio/aio.py", line 52, in wrapper
await self.close()
File "/usr/local/lib/python3.11/site-packages/sockio/aio.py", line 309, in close
await self.writer.wait_closed()
File "/usr/local/lib/python3.11/asyncio/streams.py", line 350, in wait_closed
await self._protocol._get_close_waiter(self)
File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 989, in _read_ready__data_received
data = self._sock.recv(self.max_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ConnectionResetError: [Errno 104] Connection reset by peer
2023-10-20 10:29:36.133 ERROR (MainThread) [homeassistant.components.nibe_heatpump] Unexpected error fetching Nibe Heat Pump data: [Errno 111] Connect call failed ('192.168.50.150', 502)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/nibe_heatpump/__init__.py", line 266, in _async_update_data
return await self._async_update_data_internal()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/nibe_heatpump/__init__.py", line 288, in _async_update_data_internal
async for data in self.connection.read_coils(_get_coils()):
File "/usr/local/lib/python3.11/site-packages/nibe/connection/__init__.py", line 43, in read_coils
yield await self.read_coil(coil, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 88, in async_wrapped
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 47, in __call__
do = self.iter(retry_state=retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tenacity/__init__.py", line 314, in iter
return fut.result()
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 50, in __call__
result = await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nibe/connection/modbus.py", line 110, in read_coil
result = await self._client.read_input_registers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/async_modbus/core.py", line 194, in read_input_registers
return await self._send_message(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/async_modbus/core.py", line 142, in _send_message
return await self.protocol._async_send_message(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/async_modbus/core.py", line 39, in send_message_tcp
await writer.drain()
File "/usr/local/lib/python3.11/site-packages/async_modbus/core.py", line 113, in drain
await self._write_coro
File "/usr/local/lib/python3.11/site-packages/sockio/aio.py", line 31, in wrapper
await self.open()
File "/usr/local/lib/python3.11/site-packages/sockio/aio.py", line 287, in open
self.reader, self.writer = await coro
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sockio/aio.py", line 153, in open_connection
transport, _ = await loop.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 628, in sock_connect
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 668, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.50.150', 502)
What version of Home Assistant Core has the issue?
core-2023.10.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
nibe_heatpump
Link to integration documentation on our website
https://www.home-assistant.io/integrations/nibe_heatpump
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
Hey there @elupus, mind taking a look at this issue as it has been labeled with an integration (nibe_heatpump
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of nibe_heatpump
can trigger bot actions by commenting:
-
@home-assistant close
Closes the issue. -
@home-assistant rename Awesome new title
Renames the issue. -
@home-assistant reopen
Reopen the issue. -
@home-assistant unassign nibe_heatpump
Removes the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
nibe_heatpump documentation nibe_heatpump source (message by IssueLinks)
Looks like a bug in the new software. The pump disconnects us, then refuse a new connection.
Are you you using some other modbus client at the same time perhaps?
I also did the NIBE update just a few minutes ago and Home Assistant can not see any information anymore. I tried rebooting HA and disabled/re-enabled TCP/IP Modbus on the NIBE to no avail. I remember reading that you can boot the prior firmware somehow. Do you know how?
Just installed the new firmware and have the same problem. All entities are unavailable. I tried to create a new device (to see if a fresh read would solve the problem of new registers) but no luck.
@elupus No other Modbus client is connected to the heat pump. Have tried to reboot the pump without any luck.
@elupus Same issue here. I also used standard modbus integration, which worked paralell. With todays update the Nibe integration stopped working with my SMO S40, however the standard modbus still OK.
Looks like a kind of DDoS-Protection. I tried to disable all entities except the 11 that I show on my dashboard, then the data will be served.
I will try to figure out when the connection abort will occur. Has someone checked for invalid modbus id's? Maybe the connection abort is triggered by trying to download non-existing modbus data.
That was my guess too. Us requesting some data that it consider invalid.
Hi all, disabling all entities and whitelisting only the needed ones fixed the error on my side. Thanks for the hint!
Can you find out which one caused the error. We should remove that option.
I did research during 1am but without success.
I figured out that entitie "overload-pool" delivers wrong values.
Am 21.10.2023 um 09:28, Joakim Plate @.***> schrieb:
Can you find out which one caused the error. We should remove that option. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID:
Achtung! Diese Nachricht stammt von außerhalb der Organisation!
sophospsmartbannerend
Can you find out which one caused the error. We should remove that option.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
It seems that many registers is changed. I had a saved file of all modbus registers for S1255 with the old software and after exporting the registers for 2.22.6 I got the difference below.
New in the 2.22.6
Titel
Register
5245 id:4045
5247 id:4046
5249 id:4049
5250 id:4050
5251 id:4051
5256 id:4591
5257 id:4617
5267 id:4660
5268 Shuntad köldbärare, tillbehör
5271 Shuntad köldbärare max temp.
5272 id:4703
5273 id:4704
5274 id:4705
5275 id:4706
5276 id:4707
5277 id:4708
5278 id:4709
5279 id:4710
5295 id:4969
5296 id:4970
5297 id:4971
5298 id:4972
5299 id:4973
5300 id:4974
2727 Aktuell effekt
5227 id:7048
2401 id:7122
2402 id:7123
2403 id:7124
2404 id:7125
2405 id:7126
2406 id:7127
2407 id:7128
5441 id:7138
5442 id:7139
5443 id:7140
5444 id:7141
5445 id:7142
5446 id:7143
5447 id:7144
5448 id:7145
5449 id:7146
5450 id:7147
5451 id:7148
5452 id:7149
5453 id:7150
5454 EB103/104-GP12
5455 id:7176
5409 Starttid VVC period 1
5413 Starttid VVC period 2
5417 Starttid VVC period 3
5421 Stopptid VVC period 1
5425 Stopptid VVC period 2
5429 Stopptid VVC period 3
5241 id:7855
5242 id:7856
5243 id:7857
2399 id:7943
2400 id:7944
5351 Minsta tillåtna hastighet (EB100 GP1)
5368 id:8060
5369 id:8061
5370 id:8062
5371 id:8063
5372 id:8064
5373 id:8065
5374 id:8066
5375 id:8067
5388 id:8302
5390 id:8982
5326 Ljudsignal vid alarm
5327 Ljud vid knapptryck
5307 id:12388
5393 Starttid
5397 Starttid
5401 Stopptid
5392 Disable emergency restart GP1
2375 id:26793
2376 id:26794
2377 id:26795
2378 id:26796
2379 id:26797
2380 id:26798
2381 id:26799
2382 id:26800
2383 id:26801
2384 id:26802
2385 id:26803
2386 id:26804
2387 id:26805
2388 id:26806
2389 id:26807
2390 id:26808
2391 id:26809
2392 id:26810
2393 id:26811
2394 id:26812
2395 id:26813
2396 id:26814
2397 id:26815
2398 id:26816
5183 id:26817
5184 id:26818
5185 id:26819
5186 id:26820
5187 id:26821
5188 id:26822
5189 id:26823
5190 id:26824
5191 id:26825
5192 id:26826
5193 id:26827
5194 id:26828
5195 id:26829
5196 id:26830
5197 id:26831
5198 id:26832
5199 id:26833
5200 id:26834
5201 id:26835
5202 id:26836
5203 id:26837
5204 id:26838
5205 id:26839
5206 id:26840
5181 id:26865
5182 id:26867
Removed since old software:
Titel
Register
4041 id:4045
4043 id:4046
4045 id:4049
4046 id:4050
4047 id:4051
4052 id:4591
4053 id:4617
4063 id:4660
4064 Shuntad köldbärare, tillbehör
4067 Shuntad köldbärare max temp.
4068 id:4703
4069 id:4704
4070 id:4705
4071 id:4706
4072 id:4707
4073 id:4708
4074 id:4709
4075 id:4710
0 id:4711
4091 id:4969
4092 id:4970
4093 id:4971
4094 id:4972
4095 id:4973
4096 id:4974
2177 Aktuell effekt
3987 id:7048
4009 id:7138
4010 id:7139
4011 id:7140
4012 id:7141
4013 id:7142
4014 id:7143
4015 id:7144
4016 id:7145
4017 id:7146
4018 id:7147
4019 id:7148
4020 id:7149
4021 id:7150
4022 EB103/104-GP12
4023 id:7176
4024 Starttid VVC period 1
4026 Starttid VVC period 2
4028 Starttid VVC period 3
4030 Stopptid VVC period 1
4032 Stopptid VVC period 2
4034 Stopptid VVC period 3
4036 id:7855
4038 id:7856
4039 id:7857
3242 Minsta tillåtna hastighet (EB100 GP1)
3259 id:8060
3260 id:8061
3261 id:8062
3262 id:8063
3263 id:8064
3264 id:8065
3265 id:8066
3266 id:8067
3339 id:8302
3346 id:8982
3232 Ljudsignal vid alarm
3233 Ljud vid knapptryck
3092 id:12388
3071 Starttid
3073 Starttid
3075 Stopptid
2012 Tryck 1 (SFT10)
2123 Tryck 2 (SFT10)
2130 Difftryck luftflöde (BP15)
3628 Disable emergency restart GP1
2374 Difftryck luftflöde (BP16)
CSV file old Software: modbus_addresses_all_20231010 - 1.csv
CSV file new software: modbus_addresses_all_20231021 - 2.22.6.csv
Thanks, can you help how you did this, so I would try to do the same for SMO S40
I've tried disabling all entities and just re-enabling a single one (first tried Priority, and then Current Outdoor Temperature), and on both attempts it was still showing my single entity as unavailable.
I've tried reloading the integration, and restarting HA, but neither helps.
You people who've solved it by disabling entities, did it start working immediately upon disabling, or did you have to restart things, and how did you restart them in that case?
Same here, but even worse. After updating to newest firmware, the Nibe S1255PC-6 is in a bootloop and unusable. After disabling Modbus TCP the device is working again. After downgrading to precision version everything is fine again...
Same here, but even worse. After updating to newest firmware, the Nibe S1255PC-6 is in a bootloop and unusable. After disabling Modbus TCP the device is working again. After downgrading to precision version everything is fine again...
This indicates they have a major bug in their device. Should be reported to nibe.
Same here, but even worse. After updating to newest firmware, the Nibe S1255PC-6 is in a bootloop and unusable. After disabling Modbus TCP the device is working again. After downgrading to precision version everything is fine again...
How did you downgrade to previous version? I did not find anything in the menu.
How did you downgrade to previous version? I did not find anything in the menu.
I’d like to know the same. I am using a VVM S320. Besides the Modbus problem mine is working fine since the update.
How to roll-back to previous Firmware on S1255PC6: 1. shutdown the device until Power Button is blue 2. Power on the device 3. when the light of the power button gets white, press the button as long as it gets green and release it (one time this failed and the machine powered off, so I successfully retried it one time by pressing the button only a second) 4. the device starts with backup firmware I hope that helps you as well...
Same here, but even worse. After updating to newest firmware, the Nibe S1255PC-6 is in a bootloop and unusable. After disabling Modbus TCP the device is working again. After downgrading to precision version everything is fine again...
This indicates they have a major bug in their device. Should be reported to nibe.
Already done...
How to roll-back to previous Firmware on S1255PC6: 1. shutdown the device until Power Button is blue 2. Power on the device 3. when the light of the power button gets white, press the button as long as it gets green and release it (one time this failed and the machine powered off, so I successfully retried it one time by pressing the button only a second) 4. the device starts with backup firmware I hope that helps you as well...
I can confirm that this steps works to downgrade to 2.21.12 on our S1255. When the button gets white and I pushed it got green immediately so I released it directly. Now the integration works again with the old firmware.
Seems to be different with the VVM S320. Following these steps powers it off. Pressing the white button for only a second instead of holding it does nothing and boots regularly to the current 2.22.6 firmware. At least I found out that I can enter emergency mode (Notbetrieb in german) by pressing and holding the power button while the device is powered off. The button and the LED turn green/yellow and the display is off. I’ve contacted NIBE…
Same here, but even worse. After updating to newest firmware, the Nibe S1255PC-6 is in a bootloop and unusable. After disabling Modbus TCP the device is working again. After downgrading to precision version everything is fine again...
same here, with Nibe SMO S40 / F2120 the control unit goes into endless reboot loop if there's a Modbus TCP request on the network. Only way is to disable request from home assistant otherwise heat pump is unusable...
Please keep us posted on the feedback from Nibe! Meanwhile - do you know if it's possible to manually download older versions of firmware to downgrade from USB Stick?
I finally got my HA-connection working again, with the new firmware. I have a Nibe S1255 for reference. In case it helps someone else. the steps I did to get it working was:
- Disabled all entities for the device in HA. (it's likely not needed to disable all, but that's where I ended up)
- Deactivated TCP-Modbus on the S1255.
- Restarted the S1255.
- Made sure to wait until it had reconnected to the remote roomsensor and I was sure it was done booting up.
- Reactivated TCP-Modbus.
- Enabled the entities I wanted in HA, and they were back in business.
I finally got my HA-connection working again, with the new firmware. I have a Nibe S1255 for reference.
In case it helps someone else. the steps I did to get it working was:
Disabled all entities for the device in HA. (it's likely not needed to disable all, but that's where I ended up)
Deactivated TCP-Modbus on the S1255.
Restarted the S1255.
Made sure to wait until it had reconnected to the remote roomsensor and I was sure it was done booting up.
Reactivated TCP-Modbus.
Enabled the entities I wanted in HA, and they were back in business.
But if you need to reboot your control unit for any reason - you're back to the endless reboot loop. Correct?
I finally got my HA-connection working again, with the new firmware. I have a Nibe S1255 for reference. In case it helps someone else. the steps I did to get it working was:
- Disabled all entities for the device in HA. (it's likely not needed to disable all, but that's where I ended up)
- Deactivated TCP-Modbus on the S1255.
- Restarted the S1255.
- Made sure to wait until it had reconnected to the remote roomsensor and I was sure it was done booting up.
- Reactivated TCP-Modbus.
- Enabled the entities I wanted in HA, and they were back in business.
This made my HA NIBE integration and my own modbus setup work again together with my SMO S40 system.
After the firmware update to 2.22.6, the heat pump have had problems to keep connected to the wifi. I will track it during some time to see if this is a problem or not
I use my SMO S40 through Ethernet cable and have the same HA issue. I don't know if Ethernet has the connection instability but I don't faced it. I also use standard modbus integration and i have no issue there, just with the plugin.
From: ekamagn @.> Sent: Friday, October 27, 2023 9:45:14 AM To: home-assistant/core @.> Cc: matebenyovszky @.>; Comment @.> Subject: Re: [home-assistant/core] [Errno 104] Connection reset by peer and [Errno 111] Connect call failed after updating heat pump to 2.22.6 (Issue #102385)
After the firmware update to 2.22.6, the heat pump have had problems to keep connected to the wifi. I will track it during some time to see if that will a probable cause of this.
— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/102385#issuecomment-1782454495, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANVUQMRH5G5EYWBZIV2VBGTYBNRAVAVCNFSM6AAAAAA6I6WYNKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSGQ2TINBZGU. You are receiving this because you commented.Message ID: @.***>
Same issue with my SMO S40 after update to 2.22.6. HA can't make a connection. Interface seems to be inactive. No open ports.
I am also using Ethernet, so I can’t comment on using WLAN, but I tested the workaround posted by MrWizardOfOz and it works for me, too. After just enabling a couple of entities I enabled all (nearly 800) NIBE entities to see what happens. After the usual ~30 s I could see all (maybe not all, but many) my entities suddenly filling with data for about 1 second. Then all of them switched back to the not available state. So the NIBE must have decided that it does not agree with something and closed the communication.
I can reproduce this and, at least in my case, it is not necessary to reboot the NIBE. It suffices to
- Disable Modbus on my VVM S320
- Disable all NIBE entities in HA
- Wait for at least 30 seconds
- Enable Modbus again
- Enable only a select few entities
You can switch 3 and 4 if you want. The next step I suppose would be to re-enable your entities 1 by 1 until you find the culprit. Great Fun! 😵💫