Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HA crashes while installing Nibe Heat Pump integration #83759

Closed
remcoselles opened this issue Dec 11, 2022 · 35 comments
Closed

HA crashes while installing Nibe Heat Pump integration #83759

remcoselles opened this issue Dec 11, 2022 · 35 comments

Comments

@remcoselles
Copy link

The problem

When I try to install the Nibe Heat Pump integration, home assistant crashes and restarts.
I checked the logs (home-assistant.log, home-assistant.log.1 and home-assistant.log.fault) but there is nothing to be found there.

I do get a generic error message while installing, quickly after that HA restarts:
image

NibeGw seems to be working fine, I can see the UDP message coming in using node-red:
image

I am using the F1255 heat pump with ESPHome (https://github.com/elupus/esphome-nibe) LilyGo T-CAN485.

What version of Home Assistant Core has the issue?

2022.12.1

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 Heat Pump

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

@home-assistant
Copy link

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 Change the title of 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)

@remcoselles remcoselles changed the title NHA crashes while installing Nibe Heat Pump integration HA crashes while installing Nibe Heat Pump integration Dec 11, 2022
@jmhenglen
Copy link

jmhenglen commented Dec 11, 2022

Adding that im also having the same problem today with a F1245 that i try to add. I can also see my udp messages coming in from the nibeGW.
HA Core 2022.12.1.
image

@elupus
Copy link
Contributor

elupus commented Dec 11, 2022

Can you check debug log for an error?

@elupus
Copy link
Contributor

elupus commented Dec 11, 2022

Also. If you have that thing active on node red, you will be blocking the listening port.

@remcoselles
Copy link
Author

I'll try to lookup the debug logs. (Try to do it tomorrow)

Regarding blocking of the port, node-red was disabled at the moment of adding Nibe Heat Pump. I added node-red later on to check whether NibeGw was working correctly.

@jmhenglen
Copy link

jmhenglen commented Dec 12, 2022 via email

@jmhenglen
Copy link

from adding_nibe_heatpump until crash.zip

didn't follow when replying the mail, trying here

@remcoselles
Copy link
Author

remcoselles commented Dec 12, 2022

Logfile from my side:
home-assistant.log.1.zip

At around line 482 it starts registering lots of entities. Just like the example from @jmhenglen.

@AndreFjeld
Copy link

Hi,

Same here, Crash and restart of HA each time i try to install the integration.
image

I have looked through my Log files, but cant find a trace of the crash, except for all systems booting up again. Running HA on Raspberry PI 4

@elupus
Copy link
Contributor

elupus commented Dec 17, 2022

I wonder if you guys are running out of memory. Could you check the supervisor logs?

@AndreFjeld
Copy link

Hi,
How much memory does this integration need? I have 950Mb free memory at the moment i try to install the integration.
Seems like it triggers the watchdog when i press Send after entering the data for my heat pump.
I pushed the send button at exactly 21:20.

I also check the supervisor from last time i pushed the send button in the nibe integration, then there also was a wachdog incident, but for node red instead.

22-12-17 21:16:41 INFO (MainThread) [supervisor.host.manager] Host information reload completed 22-12-17 21:19:08 WARNING (MainThread) [supervisor.addons.options] Option 'dark_mode' does not exist in the schema for Node-RED (a0d7b954_nodered) 22-12-17 21:19:08 WARNING (MainThread) [supervisor.addons.options] Option 'require_ssl' does not exist in the schema for Node-RED (a0d7b954_nodered) 22-12-17 21:21:00 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API error: Received message 257:None is not str 22-12-17 21:21:00 ERROR (MainThread) [supervisor.homeassistant.api] Error on call http://172.30.xx.xx:8123/api/config: Server disconnected 22-12-17 21:21:00 ERROR (MainThread) [supervisor.homeassistant.api] Error on call http://172.30.xx.xx:8123/api/config: [Errno 104] Connection reset by peer 22-12-17 21:21:00 ERROR (MainThread) [supervisor.misc.tasks] Watchdog found a problem with Home Assistant API! 22-12-17 21:21:00 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API connection is closed 22-12-17 21:21:00 INFO (SyncWorker_5) [supervisor.docker.interface] Restarting ghcr.io/home-assistant/raspberrypi4-64-homeassistant 22-12-17 21:21:05 INFO (MainThread) [supervisor.homeassistant.core] Wait until Home Assistant is ready 22-12-17 21:21:05 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon Node-RED is failed, restarting... 22-12-17 21:21:05 INFO (SyncWorker_6) [supervisor.docker.interface] Cleaning addon_a0d7b954_nodered application 22-12-17 21:21:06 WARNING (MainThread) [supervisor.addons.options] Option 'dark_mode' does not exist in the schema for Node-RED (a0d7b954_nodered) 22-12-17 21:21:06 WARNING (MainThread) [supervisor.addons.options] Option 'require_ssl' does not exist in the schema for Node-RED (a0d7b954_nodered) 22-12-17 21:21:06 WARNING (SyncWorker_5) [supervisor.addons.options] Option 'dark_mode' does not exist in the schema for Node-RED (a0d7b954_nodered) 22-12-17 21:21:06 WARNING (SyncWorker_5) [supervisor.addons.options] Option 'require_ssl' does not exist in the schema for Node-RED (a0d7b954_nodered) 22-12-17 21:21:06 INFO (SyncWorker_5) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/node-red/aarch64 with version 14.0.0 22-12-17 21:21:07 WARNING (MainThread) [supervisor.addons.options] Option 'dark_mode' does not exist in the schema for Node-RED (a0d7b954_nodered) 22-12-17 21:21:07 WARNING (MainThread) [supervisor.addons.options] Option 'require_ssl' does not exist in the schema for Node-RED (a0d7b954_nodered) 22-12-17 21:21:10 WARNING (MainThread) [supervisor.addons.options] Option 'dark_mode' does not exist in the schema for Node-RED (a0d7b954_nodered) 22-12-17 21:21:10 WARNING (MainThread) [supervisor.addons.options] Option 'require_ssl' does not exist in the schema for Node-RED (a0d7b954_nodered) 22-12-17 21:21:20 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING 22-12-17 21:21:21 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete 22-12-17 21:21:24 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json 22-12-17 21:21:24 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/adamoutler/HassOSArgonOneAddon repository 22-12-17 21:21:24 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/hassio-addons/repository repository 22-12-17 21:21:24 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/addons repository 22-12-17 21:21:24 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/adamoutler/HassOSConfigurator repository 22-12-17 21:21:24 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/hassio-addons-development repository 22-12-17 21:21:24 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/sabeechen/hassio-google-drive-backup repository 22-12-17 21:21:24 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/esphome/home-assistant-addon repository 22-12-17 21:21:30 INFO (MainThread) [supervisor.store] Loading add-ons from store: 83 all - 0 new - 0 remove 22-12-17 21:21:30 INFO (MainThread) [supervisor.store] Loading add-ons from store: 83 all - 0 new - 0 remove 22-12-17 21:21:32 WARNING (MainThread) [supervisor.addons.options] Option 'dark_mode' does not exist in the schema for Node-RED (a0d7b954_nodered) 22-12-17 21:21:32 WARNING (MainThread) [supervisor.addons.options] Option 'require_ssl' does not exist in the schema for Node-RED (a0d7b954_nodered) 22-12-17 21:22:17 INFO (MainThread) [supervisor.homeassistant.core] Detect a running Home Assistant instance 22-12-17 21:22:28 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request initialize 22-12-17 21:22:28 INFO (MainThread) [supervisor.api.proxy] WebSocket access from a0d7b954_nodered 22-12-17 21:22:28 INFO (MainThread) [supervisor.api.proxy] Home Assistant WebSocket API request running

@elupus
Copy link
Contributor

elupus commented Dec 17, 2022

I do not think it could need that much. I have total 900meg used for HA. So memory is probably not the issue then.

@AndreFjeld
Copy link

AndreFjeld commented Dec 17, 2022

Is there any information / logs that i could send, that would help you in locating the reason for the crash?

I am already running Modbus sensors from other equipment (Which is working fine), are your integration running the same py script as the HA modbus? So that it could be modbus overload that is crashing everything? I remember reading somewhere that there is a max limit for requesting/reading modbus adresses.

@elupus
Copy link
Contributor

elupus commented Dec 18, 2022

No it's not. It's using async-modbus, which in turn uses umodbus library.

The only thing i could think of is if you could disable as much as possible other things. Or spin up a separate home assistant instance and test in that.

@remcoselles
Copy link
Author

I am not running any other modbus sensor, so I don't think that is the problem. I have around 400MB of ram to spare. But I would be surprised if the integration needs more than that. Maybe it does need a lot of RAM for a short period of time during setup? @elupus besides the total ram used, do you have a lot to spare? My Raspberry Pi only has 1GB installed.

@remcoselles
Copy link
Author

I think I found out what the problem is!
So I noticed all of you have Node Red installed, so I disabled this add-on and now I am able to add the nibe heat pump integration. 😄

After adding Nibe Heat Pump I enabled node-red again but that took a long time. I thought HA was crashing again but it kept going.

So maybe the issue is related to the large amount of sensors and the use of node red.

Also: after adding the integration I noticed it recognized the F1155.
image
But I have the F1255, also double checked and selected that one during setup. Have you seen this before?

@AndreFjeld
Copy link

Worked after stopping Node red here to...
But i have to say, thats an insane amount of sensors :)
image

@elupus
Copy link
Contributor

elupus commented Dec 18, 2022

They are all disabled. Buuut, maybe nodered is not filtering on disabled entities.

@remcoselles
Copy link
Author

Also, enabling sensors with node-red is not working. You first need to disable node-red.

@elupus Do you know why the integration was added as F1155? It seems to be working, I just enabled the outdoor temp sensor and I seem to be getting data.

@remcoselles
Copy link
Author

Regarding hidden entities, it only invisible in the UI. They will still keep on using resources and available for other integrations like node-red:
https://community.home-assistant.io/t/disable-vs-hide-vs-remove-entities/409148/2

So maybe the entities should initially be in 'removed' state?

@elupus
Copy link
Contributor

elupus commented Dec 18, 2022

They are in disabled state. Not in hidden state. So they should not consume resources.

@remcoselles
Copy link
Author

Oops I see, my mistake!

@elupus
Copy link
Contributor

elupus commented Dec 18, 2022

Ps. Name will be correct in next release.

@elupus
Copy link
Contributor

elupus commented Dec 18, 2022

How do you guys get entities from home assistant into node red?

@remcoselles
Copy link
Author

Like this:
image
I used the fifth component from the top.

@elupus
Copy link
Contributor

elupus commented Dec 18, 2022

Right. I assume it also lists disabled entities in node red selection dialogs? That would be a bug for node red integration.

@remcoselles
Copy link
Author

No it does not list those, but maybe node-red is doing something on the background causing HA to crash. Also, @AndreFjeld found errors related to node-red. I would expect nothing is wrong with Nibe Heat Pump, but the issue I related to node-red after all.

@elupus
Copy link
Contributor

elupus commented Dec 18, 2022

I have created a bug report in node red repo. I think in the right component. Would be good if you guys could chime in on that report with the node red version as well as the component versions.

zachowj/node-red-contrib-home-assistant-websocket#809

@AndreFjeld
Copy link

Seems like the fun only lasted for a short while. Is there any debug possibilities in the integration? I cant find any errors in the core or the supervisor logs. But all the sensors are gone and are now unavailable.
Worked good for some minutes.
image

Andrè

@AndreFjeld
Copy link

AndreFjeld commented Dec 18, 2022

How do you guys get entities from home assistant into node red?

They are all added automatic by Home Assistant in Node-Red.
https://github.com/hassio-addons/addon-node-red

I checked, and only those who I made active are available in Node-Red, Disabled are not there in the list.
image

@elupus
Copy link
Contributor

elupus commented Dec 18, 2022

@AndreFjeld you have likely added an entity that is unsupported by the pump. It annoyingly crashes whole integration at the moment. Will be fixed eventually. Try to remember which entities you enabled and disable them again.

Ps. There aught to be an error in the log on what errored, but it will only show up once.

@AndreFjeld
Copy link

AndreFjeld commented Dec 18, 2022

@AndreFjeld you have likely added an entity that is unsupported by the pump. It annoyingly crashes whole integration at the moment. Will be fixed eventually. Try to remember which entities you enabled and disable them again.

Ps. There aught to be an error in the log on what errored, but it will only show up once.

Thanks, deactivating some entitites fixed the problem. :)
Had to add some entities to see which ones that gave data I could use :) that again crashed the integration.
If you press Activate Debuglogging on the NIBE integration under integrations, then hit reload. You get a designated debug log with the entities thats stops the integration from loading.

image

Big tanks to you @elupus Joakim Plate for good help and service.

@remcoselles
Copy link
Author

Thank you @elupus!

@elupus
Copy link
Contributor

elupus commented Dec 22, 2022

Can you guys update the node-red-contrib-home-assistant-websocket component in node red and see if it has solved the issue?

Ps. I have no idea myself on how to update that on node red.

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 29, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants