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

Home Assistant not working after upgrade to 0.83.3 (probably Openzwave related) #19088

Closed
eriknl1982 opened this issue Dec 7, 2018 · 16 comments

Comments

@eriknl1982
Copy link

eriknl1982 commented Dec 7, 2018

Home Assistant release with the issue:

0.83

Last working Home Assistant release (if known):
0.82.1

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

Component/platform:
Probably related to open z-wave

Description of problem:
I just migrated my home assistant configuration from a raspberry pi to a NUC. Everything seemed to work fine, but since I was already a few versions behind (I think I was on 0.81.x) I decided to upgrade to the latest version, 0.83.3.

After that, I'm unable to use home assistant. When I start home assistant, I see these errors in the log:

Dec 07 11:02:05 nuc hass[440]: TypeError: expected bytes, NoneType found
Dec 07 11:02:05 nuc hass[440]: Exception ignored in: 'libopenzwave.str_to_cppstr'
Dec 07 11:02:05 nuc hass[440]: TypeError: expected bytes, NoneType found

and in the OZW_log is only see:

2018-12-07 11:02:05.561 Always, OpenZwave Version 1.4.3254 Starting Up

I'm unable to reach the UI of home assistant, even though parts of home assistent seem to be running, because when I enable logging for MQTT, I see messages coming in.

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

zwave:
  usb_path: /dev/ttyACM0
  
  

Traceback (if applicable):


Additional information:
OS: Debian GNU/Linux 9
system: Intel NUC D34010WYK
z-wave: Aeotec USB Z-Stick

I have home assistant running in a virtual env

I did some more testing: When I downgrade to 0.82.1, everything works fine. When I upgrade to 0.83, the problem is present again.

@Martinvdm
Copy link

Martinvdm commented Dec 12, 2018

same error here.

TypeError: expected bytes, NoneType found,
Exception ignored in: 'libopenzwave.str_to_cppstr',
TypeError: expected bytes, NoneType found,

@vondruska
Copy link

I also ran into this. Curiously, I commented out the zwave component in my configuration and the error message disappeared as I expected. But even with Z-Wave removed from the configuration, Home Assistant never brought up the HTTP server. I did notice things like MQTT were working while the HTTP server never started.

I ended up downgrading to 0.82.1 and I'm back in business. I'm using the homeassistant/home-assistant Docker container.

@Martinvdm
Copy link

Martinvdm commented Dec 12, 2018

I have got the error in the log but all functioning well. No issues so far.
Also running with docker

@aantono
Copy link

aantono commented Dec 13, 2018

Having the same issue using docker image mentioned above. Using stick Zooz ZST10 S2 Z-Wave Plus USB Stick, it seems to show up fine, but interestingly in the description shows is zwave plus false, which is an error, as the stick is clearly Z-Wave Plus ;) Version of Home Assistant is 0.83.3

@vondruska
Copy link

vondruska commented Dec 13, 2018

Seems like python-openzwave was upgraded to 0.4.11 with the 0.83.0 release via #18160. Maybe that's related?

Maybe over the weekend I'll try to pull down the code, revert the PR and see what happens.

@sidoh

This comment has been minimized.

@vondruska

This comment has been minimized.

@aantono
Copy link

aantono commented Dec 13, 2018

I’m not using owntracks, so at the very least there could be multiple reasons (though an upgrade of openzwave sounds the most likely culprit)

@vondruska

This comment has been minimized.

@Martinvdm
Copy link

I do not use owntracks. Same error but zwavr is functional

@eriknl1982
Copy link
Author

I just upgraded to 0.84.2, still the same problem.
I did actually have owntracks enabled in my configuration, but I was not using it. After removing it, home assistant was functional again, even though the errors (TypeError etc ) persist.

@cofw2005
Copy link

I might have the same issue, I cannot access the Frontend every morning, components like Hue_bridge, and alexa intent scripts all cannot run.
Then I see the OWZ_log.txt had the last save at 2:00 o'clock. Three continuous days, exactly same situation. So I guess the death of homeassistant was caused by Zwave.

@GregPK
Copy link

GregPK commented Dec 26, 2018

Same here, but this started to pop-up without any upgrades (did an upgrade 2 weeks ago) and was keenly looking at the logs.

Dec 26 11:00:39 raspberrypi hass[21179]: TypeError: expected bytes, NoneType found
Dec 26 11:00:39 raspberrypi hass[21179]: Exception ignored in: 'libopenzwave.str_to_cppstr'
Dec 26 11:00:39 raspberrypi hass[21179]: TypeError: expected bytes, NoneType found

Curiously, zwave switches actually work, but my xiaomi_aqara component stopped working at the same time I saw the above. Could be a coincidence since I've looked at the logs because it stopped working.

@cofw2005
Copy link

Update: I tried to downgrade the homeassistant to 0.82.1 but next morning the issue still exists.
I used command: sudo systemctl Status home-assistant, and it said Status [dead] and the same description as above. NoneType found, libopenzwave.str_to_cppstr.

@cofw2005
Copy link

cofw2005 commented Dec 27, 2018

Here is the log from OZW_log-txt

2018-12-25 02:00:10.235 Info, mgr, Manager::WriteConfig completed for driver with home ID of 0x********
2018-12-25 02:00:11.240 Info, mgr, Driver for controller /dev/tty0 pending removal
2018-12-25 02:00:11.240 Detail, Notification: DriverRemoved
2018-12-25 02:00:11.240 Always, ***************************************************************************
2018-12-25 02:00:11.240 Always, ********************* Cumulative Network Statistics *********************
2018-12-25 02:00:11.240 Always, *** General
2018-12-25 02:00:11.240 Always, Driver run time: . . . 0 days, 18 hours, 12 minutes
2018-12-25 02:00:11.240 Always, Frames processed: . . . . . . . . . . . . . . . . . . . . 1128
2018-12-25 02:00:11.240 Always, Total messages successfully received: . . . . . . . . . . 1128
2018-12-25 02:00:11.241 Always, Total Messages successfully sent: . . . . . . . . . . . . 277
2018-12-25 02:00:11.241 Always, ACKs received from controller: . . . . . . . . . . . . . 276
2018-12-25 02:00:11.241 Always, *** Errors
2018-12-25 02:00:11.241 Always, Unsolicited messages received while waiting for ACK: . . 1
2018-12-25 02:00:11.241 Always, Reads aborted due to timeouts: . . . . . . . . . . . . . 0
2018-12-25 02:00:11.241 Always, Bad checksum errors: . . . . . . . . . . . . . . . . . . 0
2018-12-25 02:00:11.241 Always, CANs received from controller: . . . . . . . . . . . . . 1
2018-12-25 02:00:11.241 Always, NAKs received from controller: . . . . . . . . . . . . . 0
2018-12-25 02:00:11.241 Always, Out of frame data flow errors: . . . . . . . . . . . . . 0
2018-12-25 02:00:11.241 Always, Messages retransmitted: . . . . . . . . . . . . . . . . . 1
2018-12-25 02:00:11.241 Always, Messages dropped and not delivered: . . . . . . . . . . . 2
2018-12-25 02:00:11.241 Always, ***************************************************************************
2018-12-25 02:00:13.476 Info, mgr, Driver for controller /dev/tty0 removed
2018-12-25 02:00:14.476 Error, mgr, Manager::GetDriver failed - Home ID 0x** is unknown
2018-12-25 02:00:14.476 Warning, Exception: Manager.cpp:373 - 100 - Invalid HomeId passed to GetDriver
2018-12-25 02:00:14.476 Info, mgr, GetSendQueueCount() failed - _homeId -*** not found

@cofw2005
Copy link

Here are some update, I happened to find out when I use command "sudo systemctl stop home-assistant.service", I will see:
:~ $ sudo systemctl status home-assistant.service
● home-assistant.service - Home Assistant
Loaded: loaded (/etc/systemd/system/home-assistant.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Sat 2018-12-29 19:48:48 CET; 2s ago
Process: 5048 ExecStart=/srv/homeassistant/homeassistant_venv/bin/hass -c /home/homeassistant/.homeassistant (code=exited, status=0/SUCCESS)
Main PID: 5048 (code=exited, status=0/SUCCESS)

Dec 29 14:35:54 raspberrypi hass[5048]: 2018-12-29 14:35:54 INFO (MainThread) [homeassistant.loader] Loaded lovelace from homeassistant.components.lovelace
Dec 29 14:35:54 raspberrypi hass[5048]: 2018-12-29 14:35:54 INFO (MainThread) [homeassistant.loader] Loaded logger from homeassistant.components.logger
Dec 29 14:35:54 raspberrypi hass[5048]: 2018-12-29 14:35:54 INFO (MainThread) [homeassistant.setup] Setting up logger
Dec 29 14:35:59 raspberrypi hass[5048]: [74f95358] pulse audio output error: PulseAudio server connection failure: Connection refused
Dec 29 19:48:41 raspberrypi systemd[1]: Stopping Home Assistant...
Dec 29 19:48:47 raspberrypi hass[5048]: TypeError: expected bytes, NoneType found
Dec 29 19:48:47 raspberrypi hass[5048]: Exception ignored in: 'libopenzwave.str_to_cppstr'
Dec 29 19:48:47 raspberrypi hass[5048]: TypeError: expected bytes, NoneType found
Dec 29 19:48:47 raspberrypi hass[5048]: Config directory: /home/homeassistant/.homeassistant
Dec 29 19:48:48 raspberrypi systemd[1]: Stopped Home Assistant.

There is error message:
Dec 29 19:48:47 raspberrypi hass[5048]: TypeError: expected bytes, NoneType found
Dec 29 19:48:47 raspberrypi hass[5048]: Exception ignored in: 'libopenzwave.str_to_cppstr'
Dec 29 19:48:47 raspberrypi hass[5048]: TypeError: expected bytes, NoneType found

But if I use command "sudo systemctl stop home-assistant" (without .service), it showed:
:~ $ sudo systemctl status home-assistant.service
● home-assistant.service - Home Assistant
Loaded: loaded (/etc/systemd/system/home-assistant.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Sat 2018-12-29 19:50:12 CET; 4s ago
Process: 11142 ExecStart=/srv/homeassistant/homeassistant_venv/bin/hass -c /home/homeassistant/.homeassistant (code=killed, signal=TERM)
Main PID: 11142 (code=killed, signal=TERM)

Dec 29 19:50:09 raspberrypi hass[11142]: 2018-12-29 19:50:09 INFO (MainThread) [homeassistant.loader] Loaded system_log from homeassistant.components.system_log
Dec 29 19:50:09 raspberrypi hass[11142]: 2018-12-29 19:50:09 INFO (MainThread) [homeassistant.loader] Loaded auth from homeassistant.components.auth
Dec 29 19:50:09 raspberrypi hass[11142]: 2018-12-29 19:50:09 INFO (MainThread) [homeassistant.loader] Loaded onboarding from homeassistant.components.onboarding
Dec 29 19:50:09 raspberrypi hass[11142]: 2018-12-29 19:50:09 INFO (MainThread) [homeassistant.loader] Loaded lovelace from homeassistant.components.lovelace
Dec 29 19:50:09 raspberrypi hass[11142]: 2018-12-29 19:50:09 INFO (MainThread) [homeassistant.loader] Loaded history from homeassistant.components.history
Dec 29 19:50:09 raspberrypi hass[11142]: 2018-12-29 19:50:09 INFO (MainThread) [homeassistant.loader] Loaded recorder from homeassistant.components.recorder
Dec 29 19:50:09 raspberrypi hass[11142]: 2018-12-29 19:50:09 INFO (MainThread) [homeassistant.loader] Loaded logger from homeassistant.components.logger
Dec 29 19:50:09 raspberrypi hass[11142]: 2018-12-29 19:50:09 INFO (MainThread) [homeassistant.setup] Setting up logger
Dec 29 19:50:12 raspberrypi systemd[1]: Stopping Home Assistant...
Dec 29 19:50:12 raspberrypi systemd[1]: Stopped Home Assistant.

There is then so such error message. The other difference is previous one is code=exited, second is code=killed. I don't know the reason, just post what I see.

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

9 participants