Lightwave Generation 2 component

Hi @bigbadblunt! Sorry for the late reply! You are spot on correct…I could have sworn that I had the Link Plus but turns out when I double checked it that I was wrong and it’s actually the LW930…Doh!

Thanks again for your help though and apologies for the wild goose chase! :flushed:

:smile: No worries.

Hi, Thanks for your work, this module has been working great except for some small issues.

I’m currently getting the following error on startup

Setup of lightwave2 is taking over 10 seconds.

And when I use the official HomeKit module to expose my thermostat I’m getting the following

climate.thermostat: HVAC modes not yet available. Please disable auto start for homekit.

The impact of this is more HVAC modes exposed to HomeKit than my thermostat is capable of (such as cool) and also that state changes don’t track to HomeKit correctly as a result.

I’ve disabled the autostart of HomeKit for over 10 minutes and it still gives me the same error. Is this because the lightwave2 module is using custom attributes (lwrf_) instead of the usual HomeAssistant ones for climate HVAC modes?

Thank you

Crwblyth

I have a few quick questions about this app.

When dimmers are connected I assume these can be controlled as dimmers in the HA app? Does the app report the state of the device if say another app was used (LightWave or if the button is used on the switch)?

The setup taking over 10 seconds is going to remain - it takes that long to establish a connection with the LW servers and download the hierarchy.

On the Homekit/HVAC modes, I’ll have to take a look. The component exposes the correct modes to Homeassistant, so I’m not sure why it has weird behaviour with Homekit. The error message you provided suggests it’s more to do with the generic behaviour of thermostats, but I’ll have a look and see what I can work out (but to set your expectations, I don’t have Homekit, so am limited in what I can do!).

Yes, the dimmers will work as you suggest.

The app will report state accurately for generation 2 devices - these have two way communication and are tracked properly. It’s using the same functionality as the official app, so will be as accurate as that is.

Thanks I may give Lightwave a go. It seems to be the best looking integrated solution in the UK at the moment for sockets and switches.

Thank you! Let me know if I can assist anyhow or send logs.

I’ve made a change that I think might fix this. Can you use the latest version and see what happens please?

Great! Thank you. I’ve just updated and will try it out over the next couple of days.

Edit:

This has thrown some new errors,

2019-12-21 22:22:15 ERROR (SyncWorker_15) [pyhap.characteristic] TargetHeatingCoolingState: value=0 is an invalid value.
2019-12-21 22:22:15 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/homekit/type_thermostats.py", line 332, in update_state
    self.char_target_heat_cool.set_value(HC_HASS_TO_HOMEKIT[hvac_mode])
  File "/usr/local/lib/python3.7/site-packages/pyhap/characteristic.py", line 198, in set_value
    value = self.to_valid_value(value)
  File "/usr/local/lib/python3.7/site-packages/pyhap/characteristic.py", line 137, in to_valid_value
    raise ValueError(error_msg)
ValueError: TargetHeatingCoolingState: value=0 is an invalid value.

Super, thanks. I know this is a slightly tedious process, but I’ve just pushed some new code. Can you give that a go please?

It’s not tedious, I appreciate your work and will try it tonight.

Edit:

It seems to be passing states correctly and updating in HomeKit and vice versa immediately.

Just getting this warning - is this just a debugging warning?


Received unhandled message: {'version': 1, 'senderId': 1, 'direction': 'response', 'items': [{'itemId': 84, 'payload': {'value': 0, 'status': 'ok', '_feature': {'deviceId': '5b4e4c8f415f952873b5c0a9-10-3157328708+1', 'productCode': 'LW921', 'featureId': '5b4e4c8f415f952873b5c0a9-110-3157328708+1', 'featureType': 'heatState'}}, 'success': True}], 'class': 'feature', 'operation': 'write', 'transactionId': 84}

Yes, if it’s just an isolated instance then safe to ignore the message. If you start getting lots of them, or something’s not working then let me know.

FYI, if you edit your posts, then I don’t get a notification. Safer to add a new post.

Thanks for your help testing this out.

Seems to be working as desired.

I’ve had that warning a couple more times but not concerned by it.

Thank you for sorting that and so quickly!

Do you have a donation link or anything so I can buy you a beer?

Merry Christmas

I second that. Really appreciate all the work you put into this component.

If you have a donation link, I’d like to buy you a beer too.

Merry Chrismas all.

Berto.

Thanks gents, that’s very kind. No donation necessary, have yourself a beer & a great Christmas.

I got some Lightwave stuff over Christmas so will do some testing shortly. However I don’t think I will yet go all out with this as I am not keen on it being cloud based.

I already have some Zigbee switches that I use and I’ve ordered an AOne Smart 13a Double Socket to test out so that may be the route I go down as it maintains local control.

Would it be possible to implement the ability to lock or unlock the switch via HA? And adjust the LED brightness? not sure about the light switches but with sockets you can lock the physical switch so it can’t be used, would be great if I could do this via HA so as to try and keep everything within one system?

Just had the Link Plus starter kit (Gen 2) with power socket. I have also had Gen1 kit for years, and over the Christmas period I have tasked myself to getting Gen2 up and running. Everything is working with your component, however, I cannot seem to get scripts to run for switching lights and sockets when using the Google Home app. All works in HA.
I did have Google Home (using Hey Google) for the Gen 1 lightwave component. For example, I had a script in HA call Lounge Lamps On, and I said in Google Home ‘hey google lounge lamps on’ and the script was executed. if i try that now with the Gen2 component google says that the device has not been setup yet.

Any clues as to why scripts are not executing?

Locking should be doable. I’ll add a service call to allow locking, unless you can think of a better way to expose this feature to users?