h4de5 / home-assistant-vimar

VIMAR by-me integration into home-assistant.io
GNU General Public License v3.0
44 stars 7 forks source link

[SETUP] Please help with my setup #14

Closed unigarci closed 4 years ago

unigarci commented 4 years ago

hi, i can't run this platform on my ha v0.113.0 running on raspberry. Webserver is on v2.6. I have tried various settings but it always gives me error when rebooting. Some help?

Logs: Logger: custom_components.vimar_platform.vimarlink Source: custom_components/vimar_platform/vimarlink.py:100 Integration: vimar_platform (documentation) First occurred: 17:15:30 (1 occurrences) Last logged: 17:15:30

Other error occurred: ConnectionError(MaxRetryError("HTTPSConnectionPool(host='https', port=443): Max retries exceeded with url: //192.168.1.10:443/vimarbyweb/modules/vimar-byme/script/rootCA.VIMAR.crt (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x6804a750>: Failed to establish a new connection: [Errno -5] No address associated with hostname'))"))

Logger: homeassistant.setup Source: custom_components/vimar_platform/vimarlink.py:116 First occurred: 17:15:32 (1 occurrences) Last logged: 17:15:32

Error during setup of component vimar_platform Traceback (most recent call last): File "/home/homeassistant/.homeassistant/custom_components/vimar_platform/vimarlink.py", line 111, in install_certificate file = open(self._certificate, "w") FileNotFoundError: [Errno 2] No such file or directory: 'https://https://192.168.1.10:443/vimarbyweb/modules/vimar-byme/script/rootCA.VIMAR.crt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 193, in _async_setup_component result = await asyncio.wait_for(task, SLOW_SETUP_MAX_WAIT) File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for return fut.result() File "/home/homeassistant/.homeassistant/custom_components/vimar_platform/init.py", line 83, in async_setup valid_certificate = await hass.async_add_executor_job(vimarconnection.install_certificate) File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/home/homeassistant/.homeassistant/custom_components/vimar_platform/vimarlink.py", line 116, in install_certificate raise VimarConfigError("Saving certificate failed: %s", repr(err)) custom_components.vimar_platform.vimarlink.VimarConfigError: ('Saving certificate failed: %s', "FileNotFoundError(2, 'No such file or directory')")

unigarci commented 4 years ago

I just saw the double "https" error in the log, I’ve already fixed in settings. I have also tried with empty certificate field in config, it gives me this login error:

Logger: homeassistant.setup Source: custom_components/vimar_platform/vimarlink.py:138 First occurred: 18:00:21 (1 occurrences) Last logged: 18:00:21

Error during setup of component vimar_platform Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 193, in _async_setup_component result = await asyncio.wait_for(task, SLOW_SETUP_MAX_WAIT) File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for return fut.result() File "/home/homeassistant/.homeassistant/custom_components/vimar_platform/init.py", line 94, in async_setup valid_login = await hass.async_add_executor_job(vimarconnection.check_login) File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/home/homeassistant/.homeassistant/custom_components/vimar_platform/vimarlink.py", line 159, in check_login self.login() File "/home/homeassistant/.homeassistant/custom_components/vimar_platform/vimarlink.py", line 138, in login raise VimarConnectionError("Error during login: %s", loginmessage.text) custom_components.vimar_platform.vimarlink.VimarConnectionError: ('Error during login: %s', 'Log In Fallido; por favor, vuelva a intentarlo')

h4de5 commented 4 years ago

@unigarci how does your current configuration look like? (you can leave out the password, but make sure it is correct in your settings)

try this minimal config:

vimar_platform:
  username: vimar_user
  password: !secret vimar_password
  host: 192.168.1.10
unigarci commented 4 years ago

I finally got it to work. I created a new user on the webserver (previously used the admin user) and it suddenly worked like a charm 👏🏼

unigarci commented 4 years ago

@unigarci how does your current configuration look like? (you can leave out the password, but make sure it is correct in your settings)

try this minimal config:

vimar_platform:
  username: vimar_user
  password: !secret vimar_password
  host: 192.168.1.10

This is my working config:

vimar_platform: username: homeassistant password: !secret vimar_password host: 192.168.1.10 certificate:

Thanks h4de5 for your great job 👍🏼