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 Sensors Broke after pyvera 0.3.3 #25894

Closed
geekofweek opened this issue Aug 12, 2019 · 19 comments
Closed

Vera Sensors Broke after pyvera 0.3.3 #25894

geekofweek opened this issue Aug 12, 2019 · 19 comments

Comments

@geekofweek
Copy link
Contributor

geekofweek commented Aug 12, 2019

Home Assistant release with the issue:

0.97.2

Last working Home Assistant release (if known):
0.97.1

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

Docker
Component/platform:

Vera

Description of problem:
Certain sensors within Vera have stopped reporting with the bump of pyvera to 0.3.3. They will be discovered by do not report a state change. This is predominately around things like motion sensors

#25820

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

vera:
  vera_controller_url: http://REDACTED:3480/

Traceback (if applicable):


Additional information:

A fix may have already been found:

#24987 (comment)

maximvelichko/pyvera#115

@brandond
Copy link
Contributor

brandond commented Aug 12, 2019

Ugh, I wish we had better sample data for the Vera API responses. Seems like different versions of the controller will return completely different things. Missing attributes, strings instead of ints, etc. Folks that were having problems with 0.3.2 reported success with 0.3.3, but now different folks are having trouble with 0.3.3.

@damianromanowski
Copy link

I can confirm that converting the device_id to int on line 98, subscribe.py fixes the issue.

Just did it myself to get everything up and running again.

@lielle1
Copy link

lielle1 commented Aug 13, 2019

@brandond I can also confirm that HA 0.97.2 with pyvera 0.33 didn't work for me. (although your test / debug docker version did work. strange...)
and the change in line 98 on subscribe.py fix the problem.

@markiper
Copy link

Same issue here. All Vera devices are not updating their status in HA even though Vera is reporting the correct status change. HA 0.97.1 worked perfectly, issue only happened after update to 0.97.2.

@mrand
Copy link

mrand commented Aug 13, 2019

I don't know if it'll help, but I've started a spreadsheet that could be used to narrow down what works and what doesn't work for each version. Thought about a google form, but you lose copy and paste ability, making it slower to fill out for multiple devices and versions.

https://community.home-assistant.io/t/vera-plus-z-wave-hub-stops-updating-home-assistant-with-sensors-status/124776/24

@markiper
Copy link

rolled back to HA 0.97.1 (hassos 2.12 / supervisor 173) and all Vera devices update their status in Home Assistant regardless of where the status change is initiated (physical device, http call, vera interface, etc).

@DrMarlin
Copy link

DrMarlin commented Aug 13, 2019

rolled back to HA 0.97.1 (hassos 2.12 / supervisor 173) and all Vera devices update their status in Home Assistant regardless of where the status change is initiated (physical device, http call, vera interface, etc).

Likewise. I experienced the loss of Vera-based sensor status updates with 97.2 and subsequently rolled back. I had not experienced any difficulties prior to this version and was surprised to read its been an ongoing issue for some.

@rgabrielson11
Copy link

rgabrielson11 commented Aug 14, 2019

Same issue here after 97.2 update. rolling back. Got an initial update but stopped updating after that.

@fgsalvador
Copy link

Same issue here after upgrading to 0.97.2. Rolled back to 0.97.1 and it’s now working properly again.

@MwC-Trexx
Copy link

MwC-Trexx commented Aug 15, 2019

Similar issue when upgrading to 0.97.2.

Device: VeraPlus
FW: 1.7.4453

Issue mainly seemed to impact multi-function sensors (Light, Motion, etc.).

@KptnKMan KptnKMan mentioned this issue Aug 16, 2019
5 tasks
@alanthewild
Copy link

I upgraded from 0.96.something to 97.2 yesterday and ALL of my Vera devices stopped updating. Sensors, switches, dimmers, lights. The one time I didn't make a copy before upgrading my docker image...

Making the changes as per @KptnKMan above to bump Pyvera to 0.3.4 fixed it for me.

@KptnKMan
Copy link
Contributor

KptnKMan commented Aug 21, 2019

Hey @alanthewild do you mind putting a couple lines on how you did it? Might help someone 😃
Did you edit within the running docker image or do another modification?
Are you running hassio/hassos?
Within the docker image you can find the file: /usr/local/lib/python3.7/site-packages/pyvera/subscribe.py

@alanthewild
Copy link

alanthewild commented Aug 22, 2019

No need to play with that particular file @KptnKMan. Here are my couple of lines...

Super simple to bump pyvera to 0.3.4 if you don't want to wait for 0.97.3 to come out and don't want to roll-back (or use the dev version). Will take less than 5 minutes, including restarting HA.

Open a shell on your Home Assistant device (how you do that is dependent on how you've installed HA). I'm running this in a Docker container on a Synology NAS so I run the following:
sudo docker ps

That gives me a list of the running containers and their IDs.
image

Then I open a bash shell in the container:
sudo docker exec -it <container name/ID> /bin/bash
In my case that command is:
sudo docker exec -it 1dc67acf10f6 /bin/bash

I then had to install nano (or any other text editor) as it's not included in the container by default (nor is vi to be fair). Involves updating the apt sources list first (30 seconds):
apt-get update
apt-get install nano

Then edit the two files mentioned in the PyVera update @KptnKMan linked to above:
Update PyVera to 0.3.4 #25986

Click on the Files Changed tab on that GitHub page and it tells you the change to make and the specific files to change. Basically just change the pyvera version number from 0.3.3 to 0.3.4

requirements_all.txt (which lives at the base of your Home Assistant install) (line 1573 - do a search or you'll be there forever)
homeassistant/components/vera/manifest.json (line 6)

nano requirements_all.txt

Search for the string pyvera (CTRL-W), change the version to 0.3.4, CTRL-X to exit, yes to save.

Same thing for the second file:

nano homeassistant/components/vera/manifest.json

This file is all of about 10 lines so it's easy to spot what needs to change.

Once you've changed the files and saved them, restart Home Assistant.

This worked for me on the official docker image of HA.
YMMV.

@lassej01
Copy link

Hi! I had trouble with 0.95 (i think) version and Pyvera 0.31 or 0.32 a few weeks ago. I tried to upgrade / downgrade both pyvera and other components that had changed without success. After a while i reinstalled the whole Homeassistant and it started to work again. Now since i upgraded from 0.96.4 to 0.97.2 the error came back. I have 0.3.4 of Pyvera (had 0.3.3 after install of 0.97.2 but when i saw the error had returned i manually upgraded pyvera to latest version 0.3.4.
The solution for me this time was to go back to Homeassistant==0.96.4, and it started to work again. Still pyvera 0.3.4.

@alanthewild
Copy link

Hi @lassej01

Assuming from your troubleshooting steps that you are not running this in docker?

The previous issues seemed to affect both docker and native installs.
Wondering if yours is specific to your install or maybe your particular devices?

Any chance you can try docker install and see what happens? Just out of interest.
Then we are working with a known base with no software differences to mask potential issues.

@lassej01
Copy link

Hi @alanthewild . I do not have docker installed on my windows server.
I have been looking at this the last time it happened and i dont think we should only look at the pyvera component. Since that component is the same between hass versions, its time to look at other core components thats change between versions?

@alanthewild
Copy link

Hi @lassej01 ,
Part of the problem is that not everyone is having the same issue or result (like Brandon mentioned above). It looks like it didn't break for everyone and for those it did, most don't have the time to play with detailed debugging so just downgrade to a working version. With the current pyvera issue, 0.3.3 totally broke mine but that was 100% resolved with the bump to 0.3.4 pyvera. As my system works happily with pyvera 0.3.4 I can't assist with any troubleshooting for you at this point.

The reason I suggested trying a Docker container is that it is a known entity and rules out any other software dependencies. You stated earlier that a full reinstall of HomeAssistant fixed your initial issues. What we can't know is if that was a fluke that after a rebuild the error didn't reoccur or if that rebuild actually replaced a component that was causing your issue. My problem with 0.95.x only began after I restarted HA one day, not when I first upgraded to 0.95. I'm inclined to think that may be what happened to you as well - making you think the rebuild fixed it when it was just a timing issue before that bug surfaced.

As the old threads were closed off (0.95 not updating and the subscribe.py changes to pyvera) and pyvera version 0.3.4 doesn't resolve your issue, I think you may need to start a new issue thread to get it looked into further.

@brandond and @pavoni seem like the right people to look into it though. Sorry I can't be more helpful. Happy to test things if you find something I can test for you.

For reference I'm running the following:
Vera Plus (latest firmware)
Aeotec Nano Dual Switches with Power metering (4)
Aeotec Nano Switches (single) with Power metering (3)
Aeotec Smart Switch 6 (3)
Fibaro Dimmer 2 (3)
Aeotec Nano Dimmer (6)
Aeotec Multisensor 6 (4)
Vision Siren (1)
Heiman Smart Smoke Sensor (1)
Aeotec Door Window Sensor 6 (1)
Aeotec Water Sensor 6 (1)
Aeotec Z-Wave LED strip (3)

@lassej01
Copy link

Ok, the solution for me for the third time :-) is to reboot the whole windows machine after an update. Seems like some components hangs in the memory (or in python) even after an upgrade / restart, I got it to work again on 0.97 after a windows restart and it stopped again now with 0.98, but after a restart of windows it started to work again. Good fo me (and maybe others) to know for the future. Since noone else have written in this case for 5 days we may close this?

@stale
Copy link

stale bot commented Nov 27, 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 Nov 27, 2019
@stale stale bot closed this as completed Dec 4, 2019
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