Lightwaverf via Wifi link

@GeoffAtHome

I’ve updated to 0.84, removed the custom component, and changed my config but can’t get my lights to show up anymore :neutral_face:

Here’s my old config for the custom component:

lightwave:
  host: 192.168.0.52
  
light:
  - platform: lightwave
    devices:
      R2D1:
        name: Lounge Light
      R2D2:
        name: Dining Room Light

and here's my new code for the new 'official' version:
lightwave:
  host: 192.168.0.52
  lights:
    R2D1:
      name: Lounge Light
    R2D2:
      name: Dining Room Light

Is there anything in my new config that looks wrong, or could be preventing it from working?

@jono did you remove the old files from your custom_components folder? If these are still present, the old configuration would be used.

If you have removed the files post up the error log so I can take a look at what may have happened.

@HarmlessSaucer from the details on the open API page, while I have not tested this, it should also work with the 2nd generation WiFi links.

But you are right, I should state this has only been tested on 1st generation WiFi links. Perhaps someone with a 2nd generation WiFi links can confirm if it works or fails for them? If it fails I would be interested in a log file to see the cause of the failure.

Cool! Ive got a Gen2 link so I’ll try and give it a go tonight and let you know. Obviously it’ll only work with Gen1 devices on that hub, which was my main concern.

@GeoffAtHome Yes, I’ve removed the files from the custom_components folder.

Here’s what shows up in the log:

2018-12-12 23:42:20 ERROR (MainThread) [homeassistant.setup] Error during setup of component lightwave
  File "/usr/src/app/homeassistant/components/lightwave.py", line 44, in async_setup
2018-12-12 23:42:23 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of light.lightwave. Setup failed for dependencies: lightwave
2018-12-12 23:42:23 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform light.lightwave: Could not set up all dependencies.

i am receiving the same error

2018-12-12 23:42:20 ERROR (MainThread) [homeassistant.setup] Error during setup of component lightwave
File “/usr/src/app/homeassistant/components/lightwave.py”, line 44, in async_setup

I updated my config per the components page

@jono, @mhaylock thanks for the info. I’ll check to see what the problem is. On the virtual python machine that I used for testing all was working. I haven’t, since it was pushed to .84, had a chance to test from within hassio. I am just pulling the update now.

I fear this is going to take time to figure out as I have as yet, not debugged in hassio and only in the virtual environment. Its going to be a learning curve for me to even understand how to update files in hassio.

I’ll update here as soon as I know more.

@jono, @mhaylock. Update complete. I an now running 0.84.1 and the component is working as expected. Looking at the changelog between 0.84 and 0.84.1 doesn’t look like this should have changed anything.

I have not tried 0.84.

Please verify with 0.84.1.that you still have the problem.

Yes, I’m running 0.84.1 and still have the same problem.

Thanks, and no hurry on my part. I’ll use the custom component until you get the chance to sort it out :slightly_smiling_face:

@jono thanks for the heads-up. Part of me was hoping to see the same error to help me understand the problem.

The log is suggesting that loading of dependencies is the problem. For this I would expect the error to be on line 34 and not 44. The code in question can be seen here:
https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/lightwave.py

Most odd.

Incase it helps
Gen 1
Hassio 84.1
Error

Error during setup of component lightwave
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 145, in _async_setup_component
    hass, processed_config)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/lightwave.py", line 44, in async_setup
    switches = config[DOMAIN][CONF_SWITCHES]
KeyError: 'switches'

Fantastic work Geoff!!
Just updated to 0.84.1 and all is working well!
Edited the config file as per the instructions and removed the lightwave.py file, along with the ‘light’ and ‘switch’ folders from custom_components directory. Gave Hassio a restart, and all is working well!

My configuration if anyone is interested:

lightwave:
  host: my.lightwaverfHub.ip.address
  lights:
    R1D6:
      name: Kitchen Table
    R1D2:
      name: Counter Lights
    R4D1:
      name: Hall Downstairs Ceiling Light
    R3D3:
      name: Master Bedroom Ceiling Light
    R5D1:
      name: Outside Front Lights
    R5D2:
      name: Outside Back Lights

  switches:
    R1D1:
     name: Kettle
    R1D3:
      name: Cupboard Lights
    R1D4:
      name: Coffee Machine
    R1D5:
      name: Kitchen Ceiling Lights
    R2D4:
      name: Torch & Surveyor Lamps
    R2D3:
      name: Love Lamp
    R4D3:
      name: Hall Downstairs Little Lamp
    R7D1:
      name: Erins Room Floor Lamp
    R7D2:
      name: Erins Room Squirrel Lamp
    R7D3:
      name: Erins Room Fairy Lights
    R7D4:
      name: Erins Room Unicorn Lamp
    R3D1:
      name: Master Bedroom Lamp
    R3D2:
      name: Master Bedroom Bourgie Lamp

ive updated to 0.84.1 and still cant get it to load

i see in the log the following, i didn’t use the custom component previously.

:/home/homeassistant/.homeassistant$ grep lightwave home-assistant.log
2018-12-14 10:48:33 INFO (MainThread) [homeassistant.loader] Loaded switch.lightwave from homeassistant.components.switch.lightwave
2018-12-14 10:48:34 INFO (MainThread) [homeassistant.loader] Loaded lightwave from homeassistant.components.lightwave
2018-12-14 10:48:34 INFO (MainThread) [homeassistant.setup] Setting up lightwave
2018-12-14 10:48:34 ERROR (MainThread) [homeassistant.setup] Error during setup of component lightwave
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/lightwave.py”, line 36, in async_setup
KeyError: ‘lightwave’
2018-12-14 10:48:34 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of switch.lightwave. Setup failed for dependencies: lightwave
2018-12-14 10:48:34 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform switch.lightwave: Could not set up all dependencies.

hi Martin can you help with some info what generation of lightwave is the new component meant for cant seem to find it in the docs, its for a friend (im his tec surpport) think he has early gen 1 hub has no lcd screen.
thanks

I have the Gen1 hub that is currently still sold (called the Connect I think).

Looks like this:

i solved my issue, as i only have switches, i only declared config for switches however it looks like the component requires both lights and switches to be declared. After adding a dummy light it all works correctly. I updated to 0.84.3 at the same time.

grep lightwave home-assistant.log
2018-12-18 10:37:52 INFO (MainThread) [homeassistant.loader] Loaded lightwave from homeassistant.components.lightwave
2018-12-18 10:37:52 INFO (MainThread) [homeassistant.setup] Setting up lightwave
2018-12-18 10:37:52 INFO (MainThread) [homeassistant.setup] Setup of domain lightwave took 0.0 seconds.
2018-12-18 10:37:54 INFO (MainThread) [homeassistant.loader] Loaded switch.lightwave from homeassistant.components.switch.lightwave
2018-12-18 10:37:54 INFO (MainThread) [homeassistant.components.switch] Setting up switch.lightwave
2018-12-18 10:37:59 INFO (MainThread) [homeassistant.loader] Loaded light.lightwave from homeassistant.components.light.lightwave
2018-12-18 10:37:59 INFO (MainThread) [homeassistant.components.light] Setting up light.lightwave
2018-12-18 10:38:46 INFO (Thread-5) [lightwave.lightwave] LW broker OK!
2018-12-18 10:38:58 INFO (Thread-6) [lightwave.lightwave] LW broker OK!

1 Like

Ooo, great find!

I’ve just done the same, adding a dummy switch and my lights are now discovered and work again :grinning:

Doesn’t seem to work for me? Can you show a copy of your config please? Would be a great help!

Does this support generation 2 (smart) devices and provide status feedback?

Also, do the api calls go via local network, or via the internet?

Either way, thanks for the work.

Here’s my config:

lightwave:
  host: 192.168.0.52
  lights:
    R2D1:
      name: Lounge Light
    R2D2:
      name: Dining Room Light
  
switches:
    R2D5:
      name: Dummy

I only have lights, so added the dummy switch even though it doesn't exist. Now the lights work fine for me.
1 Like