home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.8k stars 28.94k forks source link

Komfovent integration configuration wizard error #104773

Closed MaBeniu closed 7 months ago

MaBeniu commented 7 months ago

The problem

when trying to add a device I get error that host is required or failed to connect though I add correct IP address and add password that is 10 symbols long. image

image

I did full restart of the Home Assistant machine.

What version of Home Assistant Core has the issue?

2023.12.0b0

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

Komfovent

Link to integration documentation on our website

https://rc.home-assistant.io/integrations/komfovent

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

In system logs menu I dont see any captured event for the error.

home-assistant[bot] commented 7 months ago

Hey there @prostosanja, mind taking a look at this issue as it has been labeled with an integration (komfovent) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `komfovent` 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 komfovent` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


komfovent documentation komfovent source (message by IssueLinks)

joostlek commented 7 months ago

Anything in the logs?

joostlek commented 7 months ago

Also, share device info, model, type etc

MaBeniu commented 7 months ago

I cannot find any errors in the logs, is there anyway to enable more logging?

Here is device software version: Screenshot_2023-11-29-07-04-01-05_40deb401b9ffe8e1df2f1cc5ba480b12~2

Could it be that in the config port also needs to be added? I know modbus protocol is open via 502 port

mib1185 commented 7 months ago

to enable debug logging add the following to your configuration.yaml restart HA and provide the home-assistant.log after you got the error message:

logger:
  default: info
  logs:
    homeassistant.components.komfovent: debug
    komfovent-api: debug

Note: it is better to drag the log into the comment (which will add it as an attachment) and not copy paste as it is hard to read logs in GitHub.

MaBeniu commented 7 months ago

now with these logger settings when I choose komfovent integation from the list of available integrations to add and then I add host, user and password and press submit no new events are captured. like it wouldnt do anything and just fail capturing entered values. here are log events that are captured at the similar time. but nothing in relation to this integration. 2023-11-30 15:35:42.403 INFO (Thread-7) [pychromecast.controllers] Receiver:channel_disconnected 2023-11-30 15:35:42.432 INFO (Thread-7) [pychromecast.socket_client] [Living Room TV(192.168.0.133):8009] Connection reestablished! 2023-11-30 15:37:08.705 INFO (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (E0:E1:A9:38:85:0A): Bluetooth scanner has gone quiet for 90s, restarting

need deeper logging probably, if anyone know the params please share

mib1185 commented 7 months ago

interesting, neither the configuration flow part in HA, nor the komfovent-api has any logging implemented 🙄

EDIT: as far as I can see from the code of komfovent-api, it assumes the device to be reachable via http on port 80 and tries at first to fetch some status information. Please show us the result of http://192.168.0.150/st.html from a browser of your choise

MaBeniu commented 7 months ago

image

also I did enabled logger with debug mode on the whole HA. it took some time to delete all the noise. here is the log at the event of adding integration.

komfovent lines in HA debug log.txt It doesnt seem to include anything valuable

I did also ran LAN scanning and I see that it has port 80 open for sure. with the st.html I can logging and I end up in the settings page of the unit.

mib1185 commented 7 months ago

the komfovent-api lib seems to be based on web scraping which is not allowed by adr-004 Webscraping for multiple reasons :monocle_face:

frenck commented 7 months ago

Well spotted @mib1185 đź‘Ť

This unfortunately means, this integration should never have been merged. I've opened up a PR to remove it from Core again.

../Frenck

MaBeniu commented 7 months ago

For the better world you say... 🙂

ProstoSanja commented 7 months ago

That was quick, didn’t even have time to check this thread before you reverted everything. I guess nothing more can be done at this point? Yes it was scraping, but they actually dont provide local api. The only one they have is cloud based, so that’s why i prioritised local one.

ProstoSanja commented 7 months ago

Isn’t the whole point of hass to be able to integrate anything? Or what’s happening here?

MaBeniu commented 7 months ago

As written in the documentation link above - It will still be possible to have custom integrations provide information via webscraping. would you consider that @ProstoSanja ? that would be appreciated. currently I use a package https://github.com/borpin/ha_komfovent_config via modbus which actually is buggy.

ProstoSanja commented 7 months ago

@MaBeniu added it as a custom integration and with hacs support at my repo https://github.com/ProstoSanja/komfovent-api-python . Also fixed the bug you were experiencing (probably)