basbruss / adaptive-cover

An Adaptive Cover component for HomeAsisstant to control covers based on the sun's position
MIT License
71 stars 10 forks source link

Having Issues Dialing This In #141

Closed Colorado4Wheeler closed 3 months ago

Colorado4Wheeler commented 4 months ago

What version of Adaptive Cover are you using?

1.1.3

What version of Home Assistant are you using?

2024.4.4

Checklist

Describe the issue

When I had 1.1.0 it seems to work OK, my shades would set to a level where the sun wasn't overwhelming, it was perfect. Somewhere along the line, either my setup became incorrect (albeit unchanged since 1.1.0) or something else has changed because the shades seem to now do the opposite of what they should.

For example: I have two windows on the east side of my house, so Adaptive Cover for those are set to 90 degrees. The first thing in the morning the sun is incredibly intense and Adaptive Cover on the shades used to completely close and then inch up until the sun was off the windows, but for some reason now they do the opposite, they open to the maximum level and blind you in that room.

I'm not quite sure how to diagnose this. Right now I'm writing automation to only use the "in sun" sensor on each window to control them, but Adaptive Cover used to do this for me. As a test, just now, I went through and re-defined the settings as the sun is right on this window and as soon as I disabled the auto control and re-enabled it, the shade went to its default level and blinded me as I type this, so I had to turn it off and manually lower the shade.

How can I best diagnose this issue? Debug logging doesn't seem to give me any information useful for this.

Reproduction steps

  1. Use the system :)
  2. ...

Diagnostics dump

System Information

version core-2024.4.4
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.6.25-haos
arch x86_64
timezone America/Denver
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4994 Installed Version | 1.34.0 Stage | running Available Repositories | 1418 Downloaded Repositories | 45
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | December 28, 2024 at 5:00 PM relayer_connected | true relayer_region | us-east-1 remote_enabled | true remote_connected | true alexa_enabled | false google_enabled | false remote_server | us-east-1-2.ui.nabu.casa certificate_status | ready instance_id | e4c3b0fc2d6345dd91513a760ef8ba51 can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 12.2 -- | -- update_channel | stable supervisor_version | supervisor-2024.05.1 agent_version | 1.6.0 docker_version | 25.0.5 disk_total | 196.2 GB disk_used | 136.8 GB healthy | true supported | true board | ova supervisor_api | ok version_api | ok installed_addons | Samba share (12.3.1), Terminal & SSH (9.13.0), Mosquitto broker (6.4.0), Samba Backup (5.2.0), HA Command Center (0.6.0), Z-Wave JS UI (3.6.0), Check Home Assistant configuration (3.11.0), Studio Code Server (5.15.0), NGINX Home Assistant SSL proxy (3.9.0), MariaDB (2.7.1), phpMyAdmin (0.9.1), InfluxDB (5.0.0), RTSP Simple Server Add-on (v0.17.6), ESPHome (2024.4.2), eufy-security-ws (1.8.0-2), Node-RED (17.0.12)
Dashboards dashboards | 11 -- | -- resources | 27 views | 65 mode | storage
Recorder oldest_recorder_run | March 25, 2024 at 5:12 PM -- | -- current_recorder_run | May 7, 2024 at 8:02 AM estimated_db_size | 4252.50 MiB database_engine | mysql database_version | 10.11.6
basbruss commented 4 months ago

Can you post the curves from the position sensors?

Colorado4Wheeler commented 4 months ago

I'm not sure what you mean by curves, do you want the configuration fields?

basbruss commented 4 months ago

From the history data of the sensor

Colorado4Wheeler commented 4 months ago

I haven't been logging history on those, so i only have the day, I'll set that up now so I can post it here.

Colorado4Wheeler commented 4 months ago

An interesting twist is that now that the sun is nearing the end of it's time shining on these windows, Adaptive properly keeps adjusting the height of the shade. It's funny because it's setting it lower than it did when it was in full sun :).

I have enabled a handful of entities to log so I can provide more data tomorrow when this all happens again.

Colorado4Wheeler commented 3 months ago

So a new day and new data. Right now the window I'm testing on is in full sun (not really it's cloudy but I don't use climate mode so that should make no difference) but the cover opened to 70% (which is my max, otherwise it would be 100%), which would be blinding right now if the sun really were out. I'm still collecting data for the day as things adjust so I'll post the graph later, but here is what I have so far:

Screenshot 2024-05-09 at 9 00 04 AM

The shade faces east, so the azimuth is set to 90, here are the sun details currently

image

image

basbruss commented 3 months ago

Could it be that you have inverse state selected? And actually I meant a graph like this which is always generated even if you don't store long term history data:

image
Colorado4Wheeler commented 3 months ago

No, inverse isn't on. I did try that yesterday to see if that was the problem because it made sense to me, but it just made things worse. Since I JUST set that shade to automate before I posted I don't have any adjustments as of yet, so what I posted is all I have. My system turns off AC on my covers each night when we "wind down" for the evening since that occurs before sunset, then turns it back on other events, the one for this just fired and went to 70%.

Colorado4Wheeler commented 3 months ago

Here's the graph where AC set the cover position (internally since it was disabled and thus the shade didn't actually move) at sunrise:

image

Colorado4Wheeler commented 3 months ago

Here's a snippet of when I started doing long term tracking of all sensors on the AC device yesterday. You can see it whittling down in percentages from about 10am to 12pm, I would have expected the opposite (this was before I tried inverse, this was in regular mode). On one of my shades I actually removed it from AC entirely and re-did it just in case there was something stuck in the system, it was doing the same thing (which is what prompted me to try inverse). However, given that the shade does actually work properly with HA's cover settings I always suspected that wouldn't have worked anyway.

image

basbruss commented 3 months ago

I did just some testing in my dev-environment with the timezone and location set to some random place around Denver, Colorado added your settings and this is the immediate result

image
Colorado4Wheeler commented 3 months ago

Hmm, that begs the question of why mine would be different. As I mentioned yesterday I did actually have it working at one point and then it stopped. Since then I have re-installed the component several times.

Colorado4Wheeler commented 3 months ago

And again it's going in the wrong direction (but started at the wrong level so it is acting like inverse right now, but it's not enabled):

image

Colorado4Wheeler commented 3 months ago

I dug directly into the HA core.config entities and here's is the raw config for this window:

      {
        "entry_id": "7ab9cda0515a1f86082b156035976e3b",
        "version": 1,
        "minor_version": 1,
        "domain": "adaptive_cover",
        "title": "REDACTED (Horizontal)",
        "data": {
          "name": "REDACTED",
          "sensor_type": "cover_awning"
        },
        "options": {
          "mode": "basic",
          "set_azimuth": 90.0,
          "window_height": 2.1,
          "distance_shaded_area": 0.5,
          "default_percentage": 50.0,
          "max_position": 70.0,
          "fov_left": 90.0,
          "fov_right": 90.0,
          "group": [
            "cover.REDACTED_shade"
          ],
          "inverse_state": false,
          "sunset_position": 0.0,
          "sunset_offset": 0.0,
          "sunrise_offset": 0.0,
          "length_awning": 0.5,
          "angle": 0.0,
          "slat_distance": null,
          "slat_depth": null,
          "tilt_mode": null,
          "temp_entity": null,
          "presence_entity": null,
          "weather_entity": null,
          "temp_low": null,
          "temp_high": null,
          "outside_temp": null,
          "climate_mode": false,
          "weather_state": null,
          "delta_position": 10.0,
          "delta_time": 15.0,
          "start_time": "00:00:00",
          "start_entity": null,
          "manual_override_duration": {
            "minutes": 15
          },
          "manual_override_reset": false,
          "height_awning": 0.1
        },
        "pref_disable_new_entities": false,
        "pref_disable_polling": false,
        "source": "user",
        "unique_id": null,
        "disabled_by": null
      }

I should note that I do not have any awnings, just soffits so I set the values as low as they would permit - even though technically I should set them to something small.

basbruss commented 3 months ago

Okay you've set the cover as a horizontal cover but they move up and down? Then it should be configured as a vertical cover, an awing height of 0.1 meters also makes no sense, that would mean the awning/soffit is 10 centimeters from the ground/work area height.

Colorado4Wheeler commented 3 months ago

Yea, I started to question how they were set up when I pulled that raw config! Can I change it in the core config and restart? I have so much stuff tied to these entity ID's now that I hate to re-do it all.

I bet during my re-installation of this I just got things backwards, at least that mystery is solved!

basbruss commented 3 months ago

First, delete this device, then add a new Adaptive Cover device, give it the same name and the entities all should inherit the old name. If not, you can change them manually to the correct name.

Colorado4Wheeler commented 3 months ago

So no other way than to delete and start over? Bummer, but I get it.

Colorado4Wheeler commented 3 months ago

It's truly amazing that if you set the system up the right way it works far better than if you screw it up! Thanks Bas!