Z-Wave rgb broken after last update

I got my scenes working again.

For some reason I had used the channel light.sov_rgb_level_7_0_2 in my scenes before updating and it used to work (it probably shouldn’t have). Now I use light.sov_rgb_level_7_0 (without the _2) and it works as it should again.

I had some strange behaviour for a while even after changing my scene config, but restarting home assistant a second time fixed it for me.

OK, so unfortunately what happened here is python-openzwave changed their API under our feet with version 0.3.3. The people using Docker were automatically updated to the latest version, and this broke for them. We put out a fix with Home Assistant v0.42.4, but this broke it for people who have not yet updated python-openzwave.

If you’re seeing TypeError: expected bytes, str found, it means you need to updated python-openzwave to version 0.3.3.
If you’re seeing TypeError: Expected str, got bytes, it means you need to update home-assistant to version 0.42.4.

2 Likes

thanks mate! good info!

Thanks! Updating Openzwave worked.

For me it is throwing following error:

2017-05-13 13:16:32 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1015, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/__init__.py", line 248, in async_handle_light_service
    yield from light.async_turn_on(**params)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/zwave.py", line 321, in turn_on
    self._color_channels & COLOR_CHANNEL_WARM_WHITE or
TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'

I am running on hass.io with latest updates.

What should I do now?

I had that error for a bit. Pretty sure I just dumped the deps folder and then did a ha upgrade using sudo. I think I had some dependencies that didn’t install correctly.

Hey @azeroth12

So Im having the same issue with my Fibaro controller. Updating OZW and switching to the _0 entity caused the color picker to now show up in the front end again, but the picker doesnt actually seem to work (no color change) nor does turning it on via scene. Any ideas?

Do you have any errors? What version of hass are you on?

@azeroth12 So I just updated it via the following comands but Im wondering if it actualy updated because im getting these errors:

sudo su -s /bin/bash homeassistant
source /srv/homeassistant/bin/activate
cd /srv/homeassistant/src/python-openzwave
make uninstall
make clean
make update
make build
make install

Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/core.py", line 1015, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/light/__init__.py", line 246, in async_handle_light_service
    yield from light.async_turn_on(**params)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/light/zwave.py", line 334, in turn_on
    self.values.color.data = rgbw
  File "/srv/homeassistant/lib/python3.4/site-packages/openzwave-0.3.2-py3.4.egg/openzwave/value.py", line 292, in data
    self._network.manager.setValue(self.value_id, value)
  File "src-lib/libopenzwave/libopenzwave.pyx", line 2827, in libopenzwave.PyManager.setValue (src-lib/libopenzwave/libopenzwave.cpp:21766)
TypeError: expected bytes, str found

Did you pull down the latest source .3.3? You need the get openzwave to .3.3. Looks like you are on .3.2

How do I do that?

Part with the git clone.

If I do git clone https://github.com/OpenZWave/python-openzwave.git,

I get:

(homeassistant) homeassistant@hassbian:/srv/homeassistant/src $ git clone https://github.com/OpenZWave/python-openzwave.gitfatal: destination path 'python-openzwave' already exists and is not an empty directory.
(homeassistant) homeassistant@hassbian:/srv/homeassistant/src $

This seems to be my issue and Im not sure how to resolve it:

(homeassistant) homeassistant@hassbian:/srv/homeassistant/src/python-openzwave $ make update
git pull
Your configuration specifies to merge with the ref 'python3'
from the remote, but no such ref was fetched.
Makefile:264: recipe for target 'update' failed
make: *** [update] Error 1

Might need different steps with hassbian. I don’t use it so probably need to find someone who has more info with it, sorry.
I’m just on a standard OS X box and am able to do the normal *nix commands.

Have you tried doing the clone to an empty directory?

had to reinstall OZW entirely but now Im on the proper OZW and its working. that was a PITA!

Okay, I try to reinstall Hass.IO.

After a fresh reinstall of Hass.IO the Bug is still there.
Can’t change the color of my Fibaro RGBW Controller.

2017-05-14 13:59:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1015, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/__init__.py", line 248, in async_handle_light_service
    yield from light.async_turn_on(**params)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/zwave.py", line 321, in turn_on
    self._color_channels & COLOR_CHANNEL_WARM_WHITE or
TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'

I had the same error, but turns out this was a symptom if the fibaro rgbw controller behaviour being fixed.

You have 6 entities, light.fibaro_system_fgrgbwm441_rgbw_controller_level_3_0 though to 3_0_6 (the 3 will be different for you).
Each of these is a colour, with 3_0 being all.
It used to be that you could do a colour pick on all entities, by setting 3 octets e.g RGB[255,255,255] for RGB all on.
now instead you can only do this on 3_0, and the remaining entities should be toggled just using brightness.

tbh this makes more sense than the original configuration.