Lightwave Generation 2 component

I’ve added the feature to lock/unlock - there are two new service calls lightwave2.lock and lightwave2.unlock.

There was already a service call lightwave2.set_led_rgb to set the brightness/colour of the LED.

Wow that was quick thanks very much,

As this is by far the best forum topic covering Lightwave, I thought I’d drop this little bit of experience in here incase it helps anyone else in the future…

Problems pairing LightwaveRF connect series dimmer / devices to Link Plus

As the connect series (1st Gen) devices do not give feedback to the link plus, when pairing, the link plus (app) automatically assumes the device pair has been successful and creates the entry in the App. However as I found out, sometimes the pairing fails and control of the device doesn’t work. After a discussion with Lightwave support, they suggested the following work around/fix…

Pair as per the instructions… When the pairing fails and switching the device from the app fails (do not delete the device in the App), put the device into pair mode again and click the device on/off a couple of times in the App. This is enough to complete the pairing and you will be able to control the device.

If this fails, clear the device’s memory, re-pair, and then repeat the above last step.

Anyway, I was having this issue big time and failed to find a fix searching the forums. If everyone already knows this little bit of knowledge… I apologies for sounding like I invited the wheel!

Thanks to the Lightwave support Team, and as always bigbadblunt!

Berto.

Thanks for getting back to me. This is the first chance I have had to report back.

So, after some googling, it would appear that the scripts are listed in Google HA as scenes, and you can then go to add a ‘Routine’ by clicking (in Google HA), Routines->add a routine->assistant will->add action->browse popular->adjust scenes-> and select your script name from home assistant.

I am sorry I didn’t spot this earlier.

Speaking of enhancements. I have my setup working great now that I managed to get the Scenes into Google Home.

I have two ‘todos’.

  1. I have a door switch (magnetic switch) that does not appear as a lightwaverf device in HA. The switch is paired to the hub and I can get the status in the LightwaveRF Android App. Should this appear as a LightwaveRF sensor in your component as I wish to trigger an event when the door is opened/closed.
  2. I have automations in the LightwaveRF app (Android). Are you thinking about providing support for those with the plugin? My app has a automation to switch a light on when the door is closed. It would be nice to be able to use the already defined automations from the app without having to recreate in HA. However HA has more flexibilty.

Hiya. Sorry if this has been answered elsewhere.

How much of the Lightwave stuff works offline if you lose internet for some time? I assume physically pressing m switches works, and also assume the native HomeKit support would work through the Home app - would HA automations continue to fire, or does this competent require the internet to use the LW api?

Thanks in advance for your help! :pray:t2:

With a generation 2 hub, if your internet (or the Lightwave servers) are down:

  • the physical buttons will work
  • the Lightwave app won’t work
  • HA won’t work

I don’t know about Homekit, but I’m pretty sure that won’t work either as I think all of the hub’s actions are triggered using the remote Lightwave servers.

Great, thank you very much. :pray:t2:

@chrishammond56 - sorry, I missed your question, I’ve only just spotted it. I don’t have any sensor devices, so haven’t coded the component to support them. This should be doable assuming they behave similarly to other types of device. Could you increase the logging by adding the following to your configuraion file?

  default: warning
  logs:
    lightwave2.lightwave2: debug

then post or PM the log file?

I’ll have look at the automations and see if I can expose these through HA. I hadn’t thought of this before.

Edit: ignore this - read the post two down!

Thanks for sending the info. Please forgive my ignorance of HA, but where do the lines need to be inserted in the configuration file. I placed at the end of my current config and HA reported that the config file was incorrect.

After, I attempted to place in the default_config: but I didn’t see any additional logging.

Ooops. Sloppy copy and pasting. I was missing the first line.

logger:
  default: warning
  logs:
    lightwave2.lightwave2: debug

End of your config file should be fine as long as you don’t already have a logger entry.

Ok. Here is the extended log. The interesting ones are:
Energy monitor: ‘Consumer Unit’, ‘deviceId’: '5e164b8defa11c07306a90bf-6-3157351965+1

and

Magnetic Switch: ‘Doot’, ‘deviceId’: ‘5e164b8defa11c07306a90bf-16-3157351965+1’

NB. Ignore the spelling ‘Doot’. When I added the device, I incorrectly typed the name ‘Doot’ instead of ‘Door’ (obviously)

How do i post the file to you?

I have been using this component for 2 months now, and its working great. I have 2 observations:

  1. Memory Usage on the HA docker image jumps from ~1GB to >2.5GB over time (1-2 days) when the Energy Monitor is included in the Recorder settings (by default I have quite a lot of Recorder settings disabled in configuration.yaml). Not sure why the increase in memory usage, other then polling interval and data sent to DB? Your Python code infers that polling is not used?
  2. The Energy Monitor can display Current/Total Energy Used with each individual Gen2 device (Sockets and Dimmers). Can this be added to the component easily?

Again, thanks for a great plugin.

  1. Not sure what’s going on with recorder. I don’t have an energy monitor, but if it’s constantly updating your energy consumption, maybe it’s recording too many entries in the database? You could use a filter sensor, see someone else who was having a similar problem with a different energy sensor
  1. All gen 2 devices have the attributes current_power_w and lwrf_power for the current power usage, and lwrf_energy for total energy usage to date.

Just upgraded the plugin to v2.3.1 from v2.2.0 and I got these messages from the restart:

The following integrations and platforms could not be set up:

  • lightwave2.switch
  • lightwave2.binary_sensor
  • lightwave2.light
  • lightwave2.climate
  • lightwave2.cover

Please check your config.

Any ideas as to why. It was working fine before the upgrade. I reverted to v2.2.0 and everything is working again.

I had the same iirc - I had to upgrade Home Assistant to 0.110, it looked like an API had changed that the new version of the plugin required.

I have other issues with the upgrade to 0.110 but the Lightwave integration isn’t one of them, no problems with that!

Hope that helps.
Fred.

2020-06-08 12:31:53 WARNING (MainThread) [lightwave2.lightwave2] Cannot connect (exception '0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url='https://auth.lightwaverf.com/v2/lightwaverf/autouserlogin/lwapps'). Waiting 2 seconds to retry
2020-06-08 12:31:55 WARNING (MainThread) [lightwave2.lightwave2] Cannot connect, max_tries exceeded, aborting

This is with the latest Beta 3 version (2.3.2 Beta 3).

Any ideas?

Hi - I can’t reproduce this, so not 100% sure. My setup is working.

It’s failing at the authentication stage - the first step in connecting to the LW server is to send your username and password, and receive an access token. This is failing for some reason.

Possibilities:

  1. invalid username/password (I don’t think this is the case, I think you would get a different error) EDIT: having tried entering incorrect password, this could be the cause
  2. LW authentication server being temporarily down
  3. some kind of error with your internet connection

My first suggestion is to wait a while, reboot your HA server and hope it resolves itself. If that doesn’t work, can you turn on additional logging by putting the following in your configuration.yaml?

logger:
  default: warning
  logs:
    lightwave2.lightwave2: debug

Thanks for the quick reply, I’m doing a reboot now, and if that doesn’t work I’ll add logging and post back here.

I actually went out and bought the Plus Hub just because of this module lol, so I will be perservering.

:slight_smile: