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

Node is not rediscovered once it was offline #93

Open
rocktale opened this issue Jun 10, 2023 · 18 comments
Open

Node is not rediscovered once it was offline #93

rocktale opened this issue Jun 10, 2023 · 18 comments
Labels
bug Something isn't working

Comments

@rocktale
Copy link

I'm running version 2.0.0 of the plugin with Home Assistant 2023.6.0 (but the issue was already present with some of the previous versions of it) and it seems like the fix introduced with #42 does no longer work (at least for me). Maybe something was changed with the refactoring that went into the multi nodes setup in 2.0.0?

I have only one node configured that is not online all the time. When I reconfigure the integration it works like a charm. But once the node was offline and it comes back, all sensors show "unavailable" as if it was not there. Basically the same as when it was offline. I waited for at least half an hour but without any luck.

Would be nice if the integration could automatically detect that the node is back. Optimally, with a configurable retry interval.

@dougiteixeira dougiteixeira added the bug Something isn't working label Jun 16, 2023
@VeeeneX
Copy link
Contributor

VeeeneX commented Jun 20, 2023

It's a bug but it has a workaround not a nice one but it works :D

I have a script called Reload proxmoxve:

alias: Reload Proxmox
description: ""
trigger:
  - platform: time_pattern
    minutes: /1
condition:
  - condition: state
    entity_id: binary_sensor.void
    state: "on"
action:
  - service: rest_command.reload_proxmoxve
    data: {}
mode: single

It calls rest_command that reload integration 😅 only when server is reachable over network and it does so every minute, you could preserve state somewhere to crate a simple State Machine and avoid repeated reloads but that's up to you. :)

@kumarunster
Copy link

kumarunster commented Jun 28, 2023

same issue here

@VeeeneX could you share full example? where is the service 'rest_command.reload_proxmoxve' defined?

UPD:

found a good way to reload integration:

action:
  - service: homeassistant.reload_config_entry
    data:
      entry_id: <config_id>

where the config_id can be found via url (click on ProxmoxVE integration in integration/devices: config/integrations/integration/proxmoxve#config_entry=<config_id>

@VeeeneX
Copy link
Contributor

VeeeneX commented Jun 29, 2023

Sure, this is my setup. But I like yours more 😄

rest_command:
  reload_proxmoxve:
    url: http://127.0.0.1:8123/api/config/config_entries/entry/89d77de9b91cb775b4bc24ceb646f208/reload
    method: POST
    headers:
      authorization: "Bearer <TOKEN>"
      accept: "application/json"
    content_type:  'application/json; charset=utf-8'
    verify_ssl: false

@porklander
Copy link

same issue here

@VeeeneX could you share full example? where is the service 'rest_command.reload_proxmoxve' defined?

UPD:

found a good way to reload integration:

action:
  - service: homeassistant.reload_config_entry
    data:
      entry_id: <config_id>

where the config_id can be found via url (click on ProxmoxVE integration in integration/devices: config/integrations/integration/proxmoxve#config_entry=<config_id>

sorry for that question but I can't find the <config_id>. Can you explain me where I can find it?

@kumarunster
Copy link

@porklander already explained at the end of my comment, where are you stuck?

@porklander
Copy link

porklander commented Jul 18, 2023 via email

@porklander
Copy link

IMG_20230718_112147

@kumarunster
Copy link

hi, click auf Dienste unter "Intergrationseinträge" um auf der Hauptseite der Integration zu landen

Bildschirmfoto 2023-07-18 um 11 26 50 Bildschirmfoto 2023-07-18 um 11 27 26

@porklander
Copy link

porklander commented Jul 18, 2023 via email

@kumarunster
Copy link

Kein Problem, viel Erfolg damit!

@VeeeneX
Copy link
Contributor

VeeeneX commented Jul 18, 2023

As much as I like German 😅, for English speaking friends: Each integration has it's own id expressed as config_id. Thanks for pictures though!

@dougiteixeira
Copy link
Owner

I created a blueprint to work around this situation...

But it involves creating a sensor with Ping integration.

Since I only have one Proxmox host, I can't fully test it...

Follow the link, please, who can test it and give some feedback on its operation or bugs I appreciate it.

After getting some feedback here I include it in the integration documentation.

@AdmiralRaccoon
Copy link

Hi,
I´m using the blueprint in a 2 bode environment, and since the 2nd node is for testing only and not 24/7 online, I´ve tested your blueprint and can confirm it´s working!

Thanks for that
Philipp

@Munsio
Copy link

Munsio commented Aug 31, 2023

I do have the same problem since a few days that some nodes are still not there after I turned them on. What I found is the following error in the log maybe it has something to do with it:

Logger: urllib3.connectionpool
Source: custom_components/proxmoxve/coordinator.py:64
Integration: Proxmox VE (documentation, issues)
First occurred: August 27, 2023 at 14:33:23 (3 occurrences)
Last logged: August 27, 2023 at 14:55:23
Connection pool is full, discarding connection: pve-asus1.XXXXXXX.com. Connection pool size: 10

@nima-1102

This comment was marked as off-topic.

@dougiteixeira
Copy link
Owner

Can anyone confirm if this behavior still occurs in the latest version of the integration?

@Munsio
Copy link

Munsio commented Jan 8, 2024

Unfortunately for me it does not work 100%

HA: 2024.1.2
Addon: 3.3.0

  • Disabled the reload Automation
  • Updated Extension
  • Rebooted HA
  • Started the Node
  • Entities are unavailable
  • Run Automation without enabling it - which reloaded the extension
  • Entities are shown as wanted
  • Shutdown Node
  • Entities are unavailable
  • Started Node again
  • Entities are shown as wanted
  • Did the whole turn off/on of the node again
  • Entities are shown as wanted

So it seems that if the node was not running before the HA reboot, then starting the node afterwards does not work. Everything else did work as expected.

Will try the HA reboot node shutdown part again.

Edit: Can confirm, if a HA reboot is in between turning on a node the data is not refreshed for it.

@e87131
Copy link

e87131 commented Nov 5, 2024

This still appears to be the case as of today, v3.4.4, using HomeAssistant 2024.10.4
Is the workaround the go-to solution or is there anything planned on integrating the reauth/reload into the integration itself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants