Lightwave Generation 2 component

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:

020-06-08 19:14:22 DEBUG (MainThread) [lightwave2.lightwave2] Connecting to websocket
2020-06-08 19:14:23 WARNING (MainThread) [homeassistant.components.media_player] MediaPlayerDevice is deprecated, modify ArloMediaPlayerDevice to extend MediaPlayerEntity
2020-06-08 19:14:26 DEBUG (MainThread) [lightwave2.lightwave2] Requesting authentication token (using username and password)
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:29 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:30 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:30 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:30 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:30 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:30 WARNING (MainThread) [aiohue.util] Received unexpected bridge id: 93eadbeef13
2020-06-08 19:14:31 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 19:14:34 DEBUG (MainThread) [lightwave2.lightwave2] Requesting authentication token (using username and password)
2020-06-08 19:14:34 WARNING (MainThread) [lightwave2.lightwave2] Cannot connect, max_tries exceeded, aborting

Not sure if this is much help!?

Found this posted on the site, don’t know if it is any help.

I’ve been having the same issue, and have done a bit of investigation…

The error is caused by python3.7/site-packages/aiohue/bridge.py at line 62 it has

            async with self.websession.request(method, url, json=json) as res:
                if res.content_type != 'application/json':
                    raise ResponseError(
                        'Invalid content type: {}'.format(res.content_type))

looking at the URL it is calling…

http://xx.xx.xx.xx/api/<apikey>/lights/

or variations of.
This returns a type

text/html

although the content is JSON formatted.
Thus the error is thrown.

I don’t know enough about what is happening here, but this may give someone else a clue.
Happy to test ideas.

Can you check username and password please? I can reproduce this by entering an incorrect password.

Easiest thing to do is to delete the integration and re-add it.

Can you also check your username/password allows you to log in to the official web app at:
https://my.lightwaverf.com/a/login

Hangs head in complete shame…

D’oh.

Er I could weakly mention that it is a weird response, but no, I just need to go and sit in the corner and be quiet for a while.

:flushed:

No worries. I should definitely improve the error messages at some point.

Let me know if you have any feedback on the component.

Will do, and thank you for your work, excellent btw, very pleased.

I’ve just got the radiators, boiler and thermostat and energy monitor into the new Hub and HA, I’ve got a whole house of plugs and light switches left to add so I will let you know how I get on.

Seems to be being a little strange trying to control the boiler and thermostat so far, doesn’t seem to want to go “on”, it is either off or heat but showing idle.

The other thing is the radiators will not go back into AUTO once you have picked a percentage. So if it is showing AUTO, and I click 20%, then try AUTO it sets it to 100%, not back to AUTO.

Oh, also the Energy Monitor only has two options now, which is strange because I used another module previously (since removed) for that and I got more data entities.

Ok update. Once I had switched the boiler on, it’s state changed (correctly) to Heating, then I turned it off using the controls.

Now it is fine.

But you can have a state of idle, so it looks like this isn’t being handled, you can’t then go into heating through HA without first manually switching it on.

Thermostat, that seems strange, but always has, only had it working once properly, stupid thing. But it doesn’t seem to be reacting other than off, then it seems to go back to idle. (the device does show off, then back on to the idle state of not on, or off, just sort of existing…)

:slight_smile:

I’ll take this in two bits - hopefully the one that’s easy to solve first. On the energy monitor, what are the missing entities? All of the data provided by the device should be provided through attributes. I don’t have an energy monitor, but the attributes for a gen 2 light are shown below.

If you want these to be available as separate entities in HA, you can set up a template sensor:

How do they appear in the offical app?

And now the harder one :slight_smile:

Thermostats/boilers. I struggle with this because the LW behaviour seems weird, and the HA template is quite constraining.

Let’s do the boiler first. I think you’re probably the first person to use one of these. How does it appear in the offical app - can you provide screenshots (either from the phone app or the web app? If you can provide log files where you control it using the offical app and let me know roughly what you did I can try and work it out.

For the thermostat, which of these is it?


or

https://lightwaverf.com/search?type=product&q=LW934

Again, a description/screenshots of the official behaviour and some logs will help.

The LW934 should work (that’s the one I have). “Idle” means “On but has already reached target temperature”. If the room falls below the target temperature, the state should change to “Heating”

image
image

Will do, get to work on this in the evenings, so will get you screen shots and debug reports.

What I will do is cycle through with debug on, hopefully that can help us find out exactly what is gonig on.

The thermostat is a pain the arse and the physical device is a pile of pants to be polite. I am thinking of having that just diabled as it interfers.

For example, I can turn the boiler on through HA, then after about 30 seconds it turns itself off again, I think this is the thermostat doing it.

                self.current_usage = self.lightwave_energy_data.get("cUse")
                self.today_usage = self.lightwave_energy_data.get("todUse")

I had pulled it from the module I used, the today_usage (todUse) used to work there.

Currently the sensor.energy_monitor is sending a single value of 922, and not moving, but sensor.energy_monitor_2 is picking up the usage as current usage.

So taking your explanation, I increased the temperature target on the boiler and yes, it did begin to heat.

So i’m going to have to control it through its target temperature. They had some intersting ideas the old lightwaverf boys. There will be a good reason why I suppose.

Works for me… :slight_smile:

How is your experience with the AOne Smart 13a Double Socket ? Where have you bought it?

Is there any way to get a history of the switch power consumption in graph format. Currently, as the switch is not a sensor (I suspect), a history card only gives on/off state over time.

@ChrisHammond56 you can use a template sensor to turn an attribute into its own sensor.

Ok so new to this but after spending many hours on this i am stuck.
Have installed the Lightwave RF integration but it dosnt ask for my username or password? have installed and uninstalled many times. Any ideas?

@CarbonChris - how have you installed it?

Hi
Using Hacs

It’s odd. I started a new install of HA yesterday after my old pi died. Was working on my last install and only started using it a few weeks ago. Is it posible that HA is setup differently and failing to run the file that requests the account info.

1 Like