h4de5 / home-assistant-vimar

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

[SETUP] Please help with my setup #5

Closed Nardonline closed 4 years ago

Nardonline commented 4 years ago

Describe the problem Could you pls help me to solve this issue ? I tried to use port 80 and 443, the error message are different but in any case the initial procedure is not completing. Configuration.yaml and Home-assistant.log below:

vimar_platform: username: xxxxxxxx password: xxxxxxxx host: 192.168.1.205 schema: http port: 80 certificate: rootCA.VIMAR.crt

2020-06-19 22:47:05 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for vimar_platform which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-06-19 22:47:09 INFO (MainThread) [custom_components.vimar_platform.vimarlink] Vimar link initialized 2020-06-19 22:47:14 INFO (SyncWorker_18) [custom_components.vimar_platform.vimarlink] Vimar login successfull 2020-06-19 22:47:14 ERROR (SyncWorker_2) [custom_components.vimar_platform.vimarlink] HTTP error occurred: 500 Server Error: Internal Server Error for url: https://192.168.1.205/cgi-bin/dpadws 2020-06-19 22:47:14 ERROR (MainThread) [custom_components.vimar_platform] Could not find any groups or rooms on Vimar Webserver 192.168.1.205 2020-06-19 22:47:14 ERROR (MainThread) [homeassistant.setup] Setup failed for vimar_platform: Integration failed to initialize.

vimar_platform: username: xxxxxx password: xxxxxx host: 192.168.1.205 schema: https port: 443 certificate: rootCA.VIMAR.crt

2020-06-19 23:09:05 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for vimar_platform which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-06-19 23:09:09 INFO (MainThread) [custom_components.vimar_platform.vimarlink] Vimar link initialized 2020-06-19 23:09:09 INFO (MainThread) [custom_components.vimar_platform] Vimar CA Certificate is already in place: rootCA.VIMAR.crt 2020-06-19 23:09:12 INFO (SyncWorker_2) [custom_components.vimar_platform.vimarlink] Vimar login successfull 2020-06-19 23:09:12 INFO (SyncWorker_11) [custom_components.vimar_platform.vimarlink] getDevices started 2020-06-19 23:09:19 ERROR (SyncWorker_11) [custom_components.vimar_platform.vimarlink] Other error occurred: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='192.168.1.205', port=443): Read timed out. (read timeout=6)")) 2020-06-19 23:09:19 ERROR (MainThread) [custom_components.vimar_platform] Could not find any devices on Vimar Webserver 192.168.1.205 2020-06-19 23:09:19 ERROR (MainThread) [homeassistant.setup] Setup failed for vimar_platform: Integration failed to initialize.

Check for some things first

Setup

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

h4de5 commented 4 years ago

Hello. Can you try the following config:

vimar_platform:
  username: your-login-user
  password: your-login-password
  host: 192.168.1.205
  certificate: 
  timeout: 30

(leave certificate empty and add the timeout setting) Also, can you confirm that you can login using the user/password combination under this url: https://192.168.1.205/vimarbyweb/modules/system/externalframe.php

Do you see any rooms and devices there?

I added some more debug to the login action - please update the integration and try again.

Nardonline commented 4 years ago

Hi Andi, thanks for your answer. just tried with the config you suggested, but it seems timeout is not a valid parameter, below the outcome. I cannot see any vimar device on hassio. to install the software I have used the command git clone https://github.com/h4de5/home-assistant-vimar.git vimar_platform

I think username & password are correct, I have used 2 different account that I use on the webserver and I think the message "Vimar login successful" should confirm this.

2020-06-20 08:49:46 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for vimar_platform which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-06-20 08:49:47 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=40 from 2020-06-19 21:41:53.307489) 2020-06-20 08:49:51 INFO (MainThread) [custom_components.vimar_platform.vimarlink] Vimar link initialized 2020-06-20 08:49:54 INFO (SyncWorker_11) [custom_components.vimar_platform.vimarlink] Vimar login successfull 2020-06-20 08:49:55 ERROR (SyncWorker_7) [custom_components.vimar_platform.vimarlink] HTTP error occurred: 500 Server Error: Internal Server Error for url: https://192.168.1.205/cgi-bin/dpadws 2020-06-20 08:49:55 ERROR (MainThread) [custom_components.vimar_platform] Could not find any groups or rooms on Vimar Webserver 192.168.1.205 2020-06-20 08:49:55 ERROR (MainThread) [homeassistant.setup] Setup failed for vimar_platform: Integration failed to initialize. 2020-06-20 08:51:11 ERROR (MainThread) [homeassistant.components.hassio] Invalid config for [vimar_platform]: [timeout] is an invalid option for [vimar_platform]. Check: vimar_platform->vimar_platform->timeout. (See /config/configuration.yaml, line 9).

Il giorno sab 20 giu 2020 alle ore 04:31 Andi notifications@github.com ha scritto:

Hello. Can you try the following config:

vimar_platform: username: your-login-user password: your-login-password host: 192.168.1.205 certificate: timeout: 30

(leave certificate empty and add the timeout setting) Also, can you confirm that you can login using the user/password combination under this url: https://192.168.1.205/vimarbyweb/modules/system/externalframe.php

Do you see any rooms and devices there?

I added some more debug to the login action - please update the integration and try again.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/h4de5/home-assistant-vimar/issues/5#issuecomment-646923569, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP6XLNZQ4XJPC75QUNB46MDRXQNQ5ANCNFSM4ODCDO7A .

h4de5 commented 4 years ago

Hi. To update the integration to the latest version you can switch to the vimar_platform directory and do a git pull - then the timeout parameter should be valid. The login successful message may even be printed if the user exists but has not access to any devices - hence the test.

Nardonline commented 4 years ago

Andi, sorry for my stupid question but I am not familiar with git command, do I have to use git pull with the same parameters of git clone ? Thanks for your patience

Il giorno sab 20 giu 2020 alle 09:33 Andi notifications@github.com ha scritto:

Hi. To update the integration to the latest version you can switch to the vimar_platform directory and do a git pull - then the timeout parameter should be valid. The login successful message may even be printed if the user exists but has not access to any devices - hence the test.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/h4de5/home-assistant-vimar/issues/5#issuecomment-646957960, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP6XLNZZWEVSYRXNLWJN5NLRXRQ6FANCNFSM4ODCDO7A .

h4de5 commented 4 years ago

No problem. git pull within the vimar_platform directory is enough.

Nardonline commented 4 years ago

Andi, this is the last log

2020-06-20 20:22:21 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for vimar_platform which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-06-20 20:22:25 INFO (MainThread) [custom_components.vimar_platform.vimarlink] Vimar link initialized 2020-06-20 20:22:35 WARNING (MainThread) [homeassistant.setup] Setup of vimar_platform is taking over 10 seconds. 2020-06-20 20:22:55 ERROR (SyncWorker_5) [custom_components.vimar_platform.vimarlink] Other error occurred: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='192.168.1.205', port=443): Read timed out. (read timeout=30)")) 2020-06-20 20:22:55 ERROR (SyncWorker_5) [custom_components.vimar_platform.vimarlink] Error parsing XML: TypeError("a bytes-like object is required, not 'bool'") 2020-06-20 20:22:55 ERROR (SyncWorker_5) [custom_components.vimar_platform.vimarlink] Problematic XML: False 2020-06-20 20:22:55 ERROR (MainThread) [homeassistant.setup] Error during setup of component vimar_platform Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 190, in _async_setup_component result = await asyncio.wait_for(task, SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/config/custom_components/vimar_platform/init.py", line 129, in async_setup valid_login = await hass.async_add_executor_job(vimarconnection.check_login) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/vimar_platform/vimarlink.py", line 123, in check_login self.login() File "/config/custom_components/vimar_platform/vimarlink.py", line 101, in login logincode = xml.find('result') AttributeError: 'NoneType' object has no attribute 'find'

Il giorno sab 20 giu 2020 alle ore 18:28 Andi notifications@github.com ha scritto:

No problem. git pull within the vimar_platform directory is enough.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/h4de5/home-assistant-vimar/issues/5#issuecomment-647016962, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP6XLN5VME2PDKNODY6RDB3RXTPUJANCNFSM4ODCDO7A .

Nardonline commented 4 years ago

Andi, another info for you, yesterday I have noticed the webserver was freezed many times during my test to connect, now I have realized that webserver is working fine until the message: 2020-06-20 20:46:09 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for vimar_platform which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-06-20 20:46:13 INFO (MainThread) [custom_components.vimar_platform.vimarlink] Vimar link initialized 2020-06-20 20:46:17 INFO (SyncWorker_15) [custom_components.vimar_platform.vimarlink] Vimar login ok 2020-06-20 20:46:17 INFO (SyncWorker_10) [custom_components.vimar_platform.vimarlink] getDevices started 2020-06-20 20:46:23 WARNING (MainThread) [homeassistant.setup] Setup of vimar_platform is taking over 10 seconds.

then webserver (that I was using on another display) freezed and then the next error: 2020-06-20 20:46:47 ERROR (SyncWorker_10) [custom_components.vimar_platform.vimarlink] Other error occurred: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='192.168.1.205', port=443): Read timed out. (read timeout=30)")) 2020-06-20 20:46:47 ERROR (MainThread) [custom_components.vimar_platform] Could not find any devices on Vimar Webserver 192.168.1.205 2020-06-20 20:46:47 ERROR (MainThread) [homeassistant.setup] Setup failed for vimar_platform: Integration failed to initialize.

So for some reason the webserver freeze during the stabilization, and I have to manual reboot it. do you have any idea ?

Il giorno sab 20 giu 2020 alle ore 20:41 Stefano Nardo < stefano.nardo.360@gmail.com> ha scritto:

Andi, this is the last log

2020-06-20 20:22:21 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for vimar_platform which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-06-20 20:22:25 INFO (MainThread) [custom_components.vimar_platform.vimarlink] Vimar link initialized 2020-06-20 20:22:35 WARNING (MainThread) [homeassistant.setup] Setup of vimar_platform is taking over 10 seconds. 2020-06-20 20:22:55 ERROR (SyncWorker_5) [custom_components.vimar_platform.vimarlink] Other error occurred: ReadTimeout(ReadTimeoutError("HTTPSConnectionPool(host='192.168.1.205', port=443): Read timed out. (read timeout=30)")) 2020-06-20 20:22:55 ERROR (SyncWorker_5) [custom_components.vimar_platform.vimarlink] Error parsing XML: TypeError("a bytes-like object is required, not 'bool'") 2020-06-20 20:22:55 ERROR (SyncWorker_5) [custom_components.vimar_platform.vimarlink] Problematic XML: False 2020-06-20 20:22:55 ERROR (MainThread) [homeassistant.setup] Error during setup of component vimar_platform Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 190, in _async_setup_component result = await asyncio.wait_for(task, SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/config/custom_components/vimar_platform/init.py", line 129, in async_setup valid_login = await hass.async_add_executor_job(vimarconnection.check_login) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/vimar_platform/vimarlink.py", line 123, in check_login self.login() File "/config/custom_components/vimar_platform/vimarlink.py", line 101, in login logincode = xml.find('result') AttributeError: 'NoneType' object has no attribute 'find'

Il giorno sab 20 giu 2020 alle ore 18:28 Andi notifications@github.com ha scritto:

No problem. git pull within the vimar_platform directory is enough.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/h4de5/home-assistant-vimar/issues/5#issuecomment-647016962, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP6XLN5VME2PDKNODY6RDB3RXTPUJANCNFSM4ODCDO7A .

h4de5 commented 4 years ago

Mnh. It seems your webserver returns something different from what i am expecting. It is the vimar webserver art.nr. 01945 ?

Nardonline commented 4 years ago

yes, 01945 confirmed.

Il giorno sab 20 giu 2020 alle ore 20:55 Andi notifications@github.com ha scritto:

Mnh. It seems your webserver returns something different from what i am expecting. It is the vimar webserver art.nr. 01945 ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/h4de5/home-assistant-vimar/issues/5#issuecomment-647033129, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP6XLN37SCITJH734RJSYVDRXUAYJANCNFSM4ODCDO7A .

h4de5 commented 4 years ago

Oh. I just saw your message about the freeze.

Is it possible that you do have way over 100 entities/actors/groups in your installation?

In the beginning of my development i tried to read out everything at once and the webserver kept freezing as well. Thats why I switched to this less invasive way of reading groups first and then details. But it may be possible that too many items are still killing it :/

I'll think of a workaround for that.

Nardonline commented 4 years ago

Actually I have exactly 100 devices connected. In attached XML file uploaded to webserver, and also the db file used by Vimat EasyTool Professional 2.14 About the freeze, I can see it happens only sometimes...not clear in which cases....

[image: image.png]

Il giorno sab 20 giu 2020 alle ore 21:07 Andi notifications@github.com ha scritto:

Oh. I just saw your message about the freeze.

Is it possible that you do have way over 100 entities/actors/groups in your installation?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/h4de5/home-assistant-vimar/issues/5#issuecomment-647034345, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP6XLN4WIIXH6DAGTZLAUADRXUCFVANCNFSM4ODCDO7A .

h4de5 commented 4 years ago

Attachments do not work when answering via email ;) I'll try to limit it to a workable amount of groups. So you can at least control some of the devices until i found a better solution.

Nardonline commented 4 years ago

Ok, I have uploaded to the site the 2 files, the XML file uploaded to webserver, and also the db file used by Vimat EasyTool Professional 2.14 Nardolandia.zip

Nardonline commented 4 years ago

image

h4de5 commented 4 years ago

@Nardonline after restarting my own web server a couple of times - I now tweaked the start a little bit. It limits the devices and attributes to a number that is at least working on my web server. Please try again and let me know if you can at least control some of your devices.

Nardonline commented 4 years ago

Andi, great!!! I can see a lot of devices now and I don't have any error. Great Job

Il giorno lun 22 giu 2020 alle ore 00:09 Andi notifications@github.com ha scritto:

@Nardonline https://github.com/Nardonline after restarting my own web server a couple of times - I now tweaked the start a little bit. It limits the devices and attributes to a number that is at least working on my web server. Please try again and let me know if you can at least control some of your devices.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/h4de5/home-assistant-vimar/issues/5#issuecomment-647188084, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP6XLN5M3WYBFWGUZEDH72LRX2AIJANCNFSM4ODCDO7A .

h4de5 commented 4 years ago

Sorry again for crashing the webserver before ;-)

I'll close this issue now. if you have got more questions let me know or open a new one.

Nardonline commented 4 years ago

Hi Andi, now I can see the lights, scenarios and thermostats. Do you think it would be possible to see switches and SAI devices ? it would be very useful to use SAI devices to manage the alarm system. Let me know if you prefer I open a new ticket for this request. Many thanks Stefano

Il giorno lun 22 giu 2020 alle ore 12:07 Andi notifications@github.com ha scritto:

Sorry again for crashing the webserver before ;-)

I'll close this issue now. if you have got more questions let me know or open a new one.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/h4de5/home-assistant-vimar/issues/5#issuecomment-647419990, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP6XLN6AQKOUFD6NNZSQWULRX4UPVANCNFSM4ODCDO7A .

h4de5 commented 4 years ago

Yes. Please. See the CONTRIBUTING.md for details on how to request new device types. Switches should be available already.