How can I use the PWM LED Component in hassio on raspberry pi 3. When trying to turn on the light i turns back off and I am getting the following error in the log.
2017-11-13 17:25:10 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/tasks.py", line 181, in _step
result = coro.throw(exc)
File "/usr/lib/python3.6/site-packages/homeassistant/core.py", line 1038, in _event_to_service_call
yield from service_handler.func(service_call)
File "/usr/lib/python3.6/site-packages/homeassistant/components/light/__init__.py", line 280, in async_handle_light_service
yield from light.async_turn_on(**params)
File "/usr/lib/python3.6/asyncio/futures.py", line 331, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.6/asyncio/tasks.py", line 244, in _wakeup
future.result()
File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result
raise self._exception
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.6/site-packages/homeassistant/components/light/rpi_gpio_pwm.py", line 145, in turn_on
brightness=_from_hass_brightness(self._brightness))
File "/usr/lib/python3.6/site-packages/pwmled/led/__init__.py", line 73, in set
self._update_pwm()
File "/usr/lib/python3.6/site-packages/pwmled/led/__init__.py", line 82, in _update_pwm
self._driver.set_pwm(values)
File "/usr/lib/python3.6/site-packages/pwmled/driver/__init__.py", line 56, in set_pwm
self._set_pwm(self._to_raw_pwm(values))
File "/usr/lib/python3.6/site-packages/pwmled/driver/gpio.py", line 30, in _set_pwm
self._pi.set_PWM_dutycycle(self._pins[i], raw_values[i])
File "/usr/lib/python3.6/site-packages/pigpio.py", line 1396, in set_PWM_dutycycle
self.sl, _PI_CMD_PWM, user_gpio, int(dutycycle)))
File "/usr/lib/python3.6/site-packages/pigpio.py", line 977, in _pigpio_command
sl.s.send(struct.pack('IIII', cmd, p1, p2, 0))
AttributeError: 'NoneType' object has no attribute 'send'
Is it because the pigpio-daemon isn’t running, if so how do I install/start it in hassio.
My configuration of the pwm led component is the following:
light:
- platform: rpi_gpio_pwm
leds:
- name: TV Light
driver: gpio
pins: [21]
type: simple