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

Vera Plugin Broken since ~0.96 #25467

Closed
gniknalu opened this issue Jul 24, 2019 · 9 comments
Closed

Vera Plugin Broken since ~0.96 #25467

gniknalu opened this issue Jul 24, 2019 · 9 comments

Comments

@gniknalu
Copy link

Home Assistant release with the issue:

0.96.4

Last working Home Assistant release (if known):
0.95.4

Operating environment (Hass.io/Docker/Windows/etc.):

Ubuntu 18.04.2 LTS with Hass.io supervisor version 170

Component/platform:

https://www.home-assistant.io/components/vera/

Description of problem:

Vera devices are not reporting back their status. I can control vera devices (turning on/off lights, locking/unlocking doors) but automations don't reliably run as their status isn't properly updating.

In the traceback, I can take the 'host' mentioned here: HTTPConnectionPool(host='XXX.XXX.XXX.XXX', port=3480):

And the URL portion mentioned here:
Max retries exceeded with url: //data_request?output_format=json&DeviceNum=25230&id=sdata

And put them together to http://XXX.XXX.XXX.XXX:3480/data_request?output_format=json&DeviceNum=25230&id=sdata

And the output is correct. Is the problem the "//" ???

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

vera:
  vera_controller_url: http://XXX.XXX.XXX.XXX:3480/
  lights: [57, 6514, 6515, 25231, 47, 56, 55, 10]

Traceback (if applicable):

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 380, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/vera/lock.py", line 45, in update
    self._state = (STATE_LOCKED if self.vera_device.is_locked(True)
  File "/usr/local/lib/python3.7/site-packages/pyvera/__init__.py", line 1011, in is_locked
    self.refresh()
  File "/usr/local/lib/python3.7/site-packages/pyvera/__init__.py", line 608, in refresh
    j = self.vera_request(id='sdata', output_format='json').json()
  File "/usr/local/lib/python3.7/site-packages/pyvera/__init__.py", line 484, in vera_request
    return self.vera_controller.data_request(request_payload)
  File "/usr/local/lib/python3.7/site-packages/pyvera/__init__.py", line 107, in data_request
    return requests.get(request_url, timeout=timeout, params=payload)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='XXX.XXX.XXX.XXX', port=3480): Max retries exceeded with url: //data_request?output_format=json&DeviceNum=23230&id=sdata (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f575b9a7190>: Failed to establish a new connection: [Errno 111] Connection refused'))

Additional information:

Also seeing these errors - which are related to what is mentioned above:

2019-07-23 13:58:22 INFO (Vera Poll Thread) [pyvera.subscribe] Could not poll Vera - will retry in 10s
2019-07-23 13:58:32 INFO (Vera Poll Thread) [pyvera.subscribe] Could not poll Vera - will retry in 10s
2019-07-23 13:58:42 INFO (Vera Poll Thread) [pyvera.subscribe] Could not poll Vera - will retry in 10s
@jwater7
Copy link
Contributor

jwater7 commented Jul 25, 2019

Could this be the same as #24987 ?

@brandond
Copy link
Contributor

brandond commented Jul 25, 2019

This is unrelated - that issued is an exception caused by missing fields in the response from the Vera device. According to the log shared here, the Vera device is refusing connections:

requests.exceptions.ConnectionError: HTTPConnectionPool(host='XXX.XXX.XXX.XXX', port=3480):
Max retries exceeded with url: //data_request?output_format=json&DeviceNum=23230&id=sdata
(Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f575b9a7190>:
Failed to establish a new connection: [Errno 111] Connection refused'))

If you're sure you have the right IP address, you might try power cycling the device. If you're concerned about the double // at the start of the URL, you can remove the trailing / in your configuration, as that's where it's coming from:

vera:
  vera_controller_url: http://XXX.XXX.XXX.XXX:3480
  lights: [57, 6514, 6515, 25231, 47, 56, 55, 10]

@gniknalu
Copy link
Author

Could this be the same as #24987 ?

Looks very similar. Thank you!

@gniknalu
Copy link
Author

This is unrelated - that issued is an exception caused by missing fields in the response from the Vera device. According to the log shared here, the Vera device is refusing connections:

requests.exceptions.ConnectionError: HTTPConnectionPool(host='XXX.XXX.XXX.XXX', port=3480):
Max retries exceeded with url: //data_request?output_format=json&DeviceNum=23230&id=sdata
(Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f575b9a7190>:
Failed to establish a new connection: [Errno 111] Connection refused'))

If you're sure you have the right IP address, you might try power cycling the device. If you're concerned about the double // at the start of the URL, you can remove the trailing / in your configuration, as that's where it's coming from:

vera:
  vera_controller_url: http://XXX.XXX.XXX.XXX:3480
  lights: [57, 6514, 6515, 25231, 47, 56, 55, 10]

As I mentioned, if I take the error output and assemble the URL, I get the proper response every time.

@monsieurlatte
Copy link

I am seeing the same thing with my vera hub.

@stale
Copy link

stale bot commented Oct 24, 2019

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 now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 24, 2019
@kmycek
Copy link

kmycek commented Oct 29, 2019

I am a recent HA user. I have been unable to connect my Vera. I am running 0.100.3. I found a blog entry that seems to suggest that Vera changed API with some of the later firmware. According to this blog - instead of the URL being "http://[VERA_IP]:3480/", it should be "http://[VERA_IP]/port_3480". Although, that must just be the tip of the iceberg. I tried changing the URL in my config, and it still doesn't work - however if I put "http://[VERA_IP]/port_3480/data_request?id=sdata" into a browser window - I get a bunch of jSON data returned with data specific to my VERA.

I just don't know how to go about debugging the integration code - or I would fix it myself.

@stale stale bot removed the stale label Oct 29, 2019
@MarkJenniskens
Copy link

I am a recent HA user. I have been unable to connect my Vera. I am running 0.100.3. I found a blog entry that seems to suggest that Vera changed API with some of the later firmware. According to this blog - instead of the URL being "http://[VERA_IP]:3480/", it should be "http://[VERA_IP]/port_3480". Although, that must just be the tip of the iceberg. I tried changing the URL in my config, and it still doesn't work - however if I put "http://[VERA_IP]/port_3480/data_request?id=sdata" into a browser window - I get a bunch of jSON data returned with data specific to my VERA.

I just don't know how to go about debugging the integration code - or I would fix it myself.

I don't think this is the right place for this question. try asking on the community forums of HA and Vera. Also include your Vera model and firmware version. My Vera Lite with the most recent firmware works with port 3480 on HA 0.98.1.

@stale
Copy link

stale bot commented Jan 30, 2020

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 now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 30, 2020
@stale stale bot closed this as completed Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants