Giter Site home page Giter Site logo

Comments (22)

bigbadblunt avatar bigbadblunt commented on September 27, 2024

Hi @dhardiker

The easiest way to get started is to turn on debug logging and you to send me the logs from a restart. On restart the component read all of the "features" exposed by lightwave, then it should just be a case of me trying to map these onto Ha's interface.

If you're on the latest version of the component, you can turn logging on through the integrations page of the web interface (go into the options for the lightwave 2 component). Then restart ha, and send me the logs.

from homeassistant-lightwave2.

dhardiker avatar dhardiker commented on September 27, 2024

Thanks for the prompt response! Happy to do this later (just updating the firmware on my devices, which seems to make the hub unreliable/unresponsive over the web socket while it does so).

Is the debug log safe to post on this issue?
or is there anything I should sanitise first?
or should we fine a secure way to send the logs?

from homeassistant-lightwave2.

bigbadblunt avatar bigbadblunt commented on September 27, 2024

There are a couple of lines at the start that show a one time access token. These should be pretty obvious, you can delete them.

from homeassistant-lightwave2.

bigbadblunt avatar bigbadblunt commented on September 27, 2024

Also (again at the start) your name and email. Once the initial authentication is done, everything else should be safe to post.

from homeassistant-lightwave2.

dhardiker avatar dhardiker commented on September 27, 2024

I've redacted the token & personal information. It's pretty big so I've put it onto Dropbox - I'll remove once you confirm you've got what you need.

Sorry about the needle in the haystack, I've got rather a large number of Lightwave devices. Let me know if I can provide anything else.

from homeassistant-lightwave2.

bigbadblunt avatar bigbadblunt commented on September 27, 2024

You weren't kidding about having a large number of devices 😁

You can delete the log now, thanks.

An answer in three parts:

Short term fix

If you urgently need to read the missing state information (but not write it), then each entity should already expose all of the attributes. E.g. :

image

So under binary_sensor.office_trv you should be able to read all of the various state of the trv through the corresponding attribute.

This is very much not the right solution, but will work if you need something today.

A proper fix

The devices should show up as climate.devicename, however, the setup for the climate component is failing as the honeywell devices seems to have slightly different attributes to the lightwave versions. The way that HA loads the devices means that if the setup of one climate entity fails, they all fail (I could probably code around this, but that's maybe a longer term goal).

The first step is to get the climate entities to show up. There will then probably be a follow up stage where we have to decode what the attributes mean (and I can the map to the home assistant architecture). From experience the climate entities are a bit finicky so this might take a few goes to get all functionality working as expected.

I've pushed a new version of the code (v3.5.2alpha) which hopefully will get us to a point where the correct entities showing up. Can you please install this version (if you're installing through HACS, you'll need to turn on the option to allow pre-releases) and send me another log?

Once we get it working, the climate entity will look something like this

image
image

Binary sensor

I don't understand why there is a binary_sensor.office_trv. This is reflecting the lightwave feature windowPosition which (as the name implies) is associated with a window opening sensor. Any ideas what feature of the trv this could mean?

from homeassistant-lightwave2.

bigbadblunt avatar bigbadblunt commented on September 27, 2024

While I was at it, I just pushed another new version that will remove the sensitive info from the log, so you shouldn't have to redact it manually next time.

from homeassistant-lightwave2.

dhardiker avatar dhardiker commented on September 27, 2024

Thanks for the prompt response. I've updated and have the logs below.

More Logs

I happened to catch you releasing (then got pulled into meetings so only just got back to the computer) so you've got a few log files. I've named them with the version running:

Again, let me know when you've got them and I'll take them down.

Binary Sensor

I'm not sure why the Honeywell TR91 TRV would have a boolean referring to the position of a window. As you'd expect, they're simply replacing the usual dumb TRVs on the radiators, with both a current temperature from a sensor, and target set - which then decides whether to open the valve, as well as whether to ask for more heat to be provided. So, I'm not sure either.

Given how much Lightwave kit I've taken, I've got an account manager I could ask (who usually refers my questions on the dev team / pro specialists). Let me know if that's of help.

from homeassistant-lightwave2.

bigbadblunt avatar bigbadblunt commented on September 27, 2024

Oooh. Nearly there. It added a lot more of the climate entities. Just the DTS92E to go.

Once we have the entities all loading into HA, we can just watch for changes in state (or perform actions in the app and try to force changes in state) - these all get reported in the log so it's usually easy to work out what's going on.

I'll push a new version imminently to try and get the DTS92Es loading.

from homeassistant-lightwave2.

bigbadblunt avatar bigbadblunt commented on September 27, 2024

PS I have what I need from the above logs

from homeassistant-lightwave2.

bigbadblunt avatar bigbadblunt commented on September 27, 2024

OK, just released another version

from homeassistant-lightwave2.

dhardiker avatar dhardiker commented on September 27, 2024

The climate entities sure are popping up!
I can also see the L92 other values - so that's good.

Here's the log files: v3.5.2alpha4

from homeassistant-lightwave2.

bigbadblunt avatar bigbadblunt commented on September 27, 2024

OK - looks like all entities loaded in the log file. So it's just over to you to see if any behaviour isn't correct. Let me know anything that doesn't work as expected. There are two ways of debugging:

  1. change the state using the lightwave app or physical controls, and send me the log files from that period (the log should show all state change activity, it will just be that it's not mapped correctly into the HA model)
  2. open your HA web interface, go to /developer-tools/state, filter on the relevant entity - then change the state using the app and see what attribute changes on the web. Again, all the attribute are exposed to HA, I just haven't necessarily connected them correctly to the HA entity model.

Some questions unrelated to the climate entities:

A) You have Master Ensuite Fan which is appearing as a cover (blinds) - does this make sense? You must have it set up as a threeWayRelay in Lightwave
B) In alpha6 I have added sensors to the sockets to measure current (amps) and voltage, and to detect if there is a plug in the socket - can you see if those work?

from homeassistant-lightwave2.

bigbadblunt avatar bigbadblunt commented on September 27, 2024

Oh, and I added in battery sensors. Let me know if those work!

from homeassistant-lightwave2.

dhardiker avatar dhardiker commented on September 27, 2024

Thanks! It's all looking pretty good. I've not noticed anything odd, but I have noticed some things that might be missing. I am still running alpha4 though, so will need to retry later with alpha6.

Cellar TRV

I can see it in the Developer Tools:

Screenshot 2021-10-23 at 14 27 03

However the battery level doesnt show in the list:

Screenshot 2021-10-23 at 14 27 53

If I go into Configuration and look at the device:

Screenshot 2021-10-23 at 14 28 05

If I then open up the Climate entity:

Screenshot 2021-10-23 at 14 28 34

In the Entities list there's no status though (not sure if that's expected, or what it should say):

Screenshot 2021-10-23 at 14 30 07

Looking at the Climate history it looks like this (picked a more interesting room):

Screenshot 2021-10-23 at 14 32 02

Thoughts

The Climate history chart is really useful. It would be nice to optionally have the detail about how open the valve is over time. I guess that data is there, but the Home Assistant History view just doesn't show it.

Also, it would be nice to see a full list of all the Climate TRVs charted in a list so I could see at any given point in time, which TRVs were calling for heat when the boiler was on. I guess similarly - I'll need to construct that view.

Right now my focus is making sure the data is aggregated in a central place that has a reasonable storage approach, which Home Assistant seems to be. Soon enough I'll worry about presentation - I only state this in case you have any comments on my grand designs!

Your Question A - Master Ensuite Fan

This is a Lightwave Mini Smart Relay which is turned on/off by a timer automation. It comes on when the ensuite light comes on, and then goes off 15 minute after the light is turned off. I hope to make this overrun time dynamic once I add humidity sensors, so it runs as long as it needs to and only if it needs to. No point in having the fan on if you've just been mopping the floor / shaving. I think that's a bit of a way down the line yet, still need to get all the sensor data in! (I'm looking at Z-wave > Home Assistant right now with Aeotec MultiSensor 6's)

So my use of the Smart Relay should really just be on/off like a switch. Although it's capable of.being a three way switch (open/stop/close).

Your Question B - Alpha6

Will try that later this weekend and let you know.

from homeassistant-lightwave2.

dhardiker avatar dhardiker commented on September 27, 2024

I've installed alpha6:

  • The battery is now showing up - great
  • There's some extra entities (including signal strength)
  • Unfortunately the TRV Climate entity has an error.

I've attached the alpha6 logs in the usual way, the first and only mention of ERROR is:

2021-10-23 17:12:15 ERROR (MainThread) [homeassistant.components.climate] Error while setting up lightwave2 platform for climateTraceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/lightwave2/climate.py", line 26, in async_setup_entry
    climates.append(LWRF2Climate(name, featureset_id, link, url))
  File "/config/custom_components/lightwave2/climate.py", line 55, in __init__
    elif self._thermostat:
AttributeError: 'LWRF2Climate' object has no attribute '_thermostat'

Battery Showing

Screenshot 2021-10-23 at 17 17 35

Extra Entities

Screenshot 2021-10-23 at 17 17 54

Office TRV Climate Erroring

Screenshot 2021-10-23 at 17 18 36

from homeassistant-lightwave2.

bigbadblunt avatar bigbadblunt commented on September 27, 2024

Just pushed a new release that should fix it.

To capture the valve level I think you'll need to create your own custom sensor that references the lwrf_valveLevel attribute. I've not done this before but I think it's covered at https://www.home-assistant.io/integrations/template/

How does your smart relay appear in the lightwave app? Is there a way of choosing its operation mode? I think it's appearing in HA as both a switch and a cover?

from homeassistant-lightwave2.

dhardiker avatar dhardiker commented on September 27, 2024

Thanks - I've just upgraded to the beta.

I'm going to need to move onto the other raw data first. I need to get my Zwave network up and running for my motion/humidity/luminance sensors. And I need to build some pipe contact temperature sensors so I can read the temperature across various places of my (somewhat complex) piping system. And pull it all into Home Assistant. But I will be back to finish off the view layer and this is very helpful thank you!

As for the relay, it appears like a single socket. I've put some screenshots below:

A29B07E7-A9E1-4FE1-8F3E-A71340D6C4F1_1_105_c

CCA00698-0600-427D-BDF0-5BD6248CDB4D_1_105_c

FE9718F0-6695-4685-AD2A-C86B59DBE43C_1_105_c

55865869-2298-46AE-A499-24D446041DC0_1_105_c

3BF00FBD-188B-422F-93FB-ABF8CF7DD1E8_1_105_c

7669ECBD-DD7F-4775-B1D4-BC774F020CC6_1_105_c

C77DB0A5-1973-4FF4-8D1D-0016A2AA006B_1_105_c

C3FBFF7B-6BEF-4CFC-BACB-7D378C976602_1_105_c

0540C8A8-7797-4371-97B1-A7976F11BE22_1_105_c

from homeassistant-lightwave2.

bigbadblunt avatar bigbadblunt commented on September 27, 2024

Thanks. Let me know anything you notice that's not quite working right.

from homeassistant-lightwave2.

bigbadblunt avatar bigbadblunt commented on September 27, 2024

@dhardiker Happy to close this one?

from homeassistant-lightwave2.

dhardiker avatar dhardiker commented on September 27, 2024

Ah sorry! Yes. Totally should have done that. I've been distracted building sensors to get more data into Home Assistant (notably temperature sensors I can strap to heating pipes to see where the pipes get hot / not).

I'm sure I'll be back but I'm happy to reopen / open up more issues as needs be.

Thanks again for your swift help!

from homeassistant-lightwave2.

bigbadblunt avatar bigbadblunt commented on September 27, 2024

Yes, please do open another issue if you spot anything wrong, or just suggestions for improvement.

from homeassistant-lightwave2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.