BottlecapDave / HomeAssistant-OctopusEnergy

Unofficial Home Assistant integration for interacting with Octopus Energy
https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/
MIT License
612 stars 61 forks source link

Rate does not reflect partial intelligent octopus slots #754

Closed apbarratt closed 7 months ago

apbarratt commented 9 months ago

Describe the bug

When I plug in my car and Octopus decides to start charging right away, I can see an intelligent octopus plan reflected in the integration that starts from the next 30-minute slot coming up. Unfortunately this means that the integration does not reflect the change in rate until that next 30-minute slot starts.

This is frustrating as it means that for up to 29 minutes and 59 seconds, I can be draining my household battery into the car, which Octopus has started charging.

The Octopus App reflects these "partial" slots, but it would appear (certainly in using the rate tracker component) that we don't get these :/

IMG_0487 IMG_0485 IMG_0486 Screenshot 2024-02-14 at 09 45 38

Recently with similar issues, it was suggested that I base my cheap electric time on the state of "Intelligent Octopus Dispatching" however, we discovered that this is made active when we've activated a bump charge too, so it can't be relied upon for assuming a low rate.

I would note that your recent work on improving this area has been very much appreciated, with the charging plan appearing in Home Assistant almost immediately, whereas before it could be quite a while before it reflected the changes that could be seen in the official app. It just seems to be these partial slots that seem problematic :)

Reproduction steps

With an intelligent octopus tarrif plug in your car or alter your ready by time during a time that is likely to trigger a car charge immediately but before the top or bottom of the hour. If you observe your car charging right away, observe that the rate is not reflected as now being cheap in the integration. Observe that the upcoming rates do show the rate as starting at the next top or bottom of the hour.

Expected behaviour

Ideally we would somehow reflect the partial rate in the event (I'm afraid I can't figure out how to view the event outside of the component shown in the screenshots so I can't confirm if this is the case or not). More importantly, the electric rate should reflect the cheaper rate right away.

Tariff Code

Sorry, brain not remembering where to find this

Integration Version

10.0.4

Home Assistant Version

Core 2024.2.1 Supervisor 2024.01.1 Operating System 11.5 Frontend 20240207.1

Fresh Install?

Not specified

Home Assistant Logs

n/a

Confirmation

BottlecapDave commented 9 months ago

Hello. This should be resolved in a future update as part of https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/issues/732, which encountered this issue as well.

Recently with similar issues, it was suggested that I base my cheap electric time on the state of "Intelligent Octopus Dispatching" however, we discovered that this is made active when we've activated a bump charge too, so it can't be relied upon for assuming a low rate.

The dispatching sensor as part of this integration should only come on for smart charges or during the standard off peak rates. It shouldn't turn on if a bump charge is activated. If you could provide the pending/completed dispatches provided as part of the attributes during a bump charge (when refreshed) it would be appreciated.

DanDon commented 9 months ago

Noticed this only today ... Really throwing off the energy dashboard as it's all recording peak rate during hours and hours of cheap rate. Hope this can get fixed soon so it can go back to accurate cost recordings.

BottlecapDave commented 9 months ago

Hello. This should hopefully be fixed in v10.1.1. Please confirm when you can :)

DanDon commented 9 months ago

Hello. This should hopefully be fixed in v10.1.1. Please confirm when you can :)

I have just installed 10.1.1 and unfortunately my gas smart meter manufacturer has changed and the model is now unknown. I have lost all entities for current gas consumption and only have previous consumption entities available. I do have a mini and these were working before update.

BottlecapDave commented 9 months ago

Do you have any errors in your logs? Please also follow the FAQ and paste your diagnostic information here. Also can you see current gas information from the Mini in the app?

DanDon commented 9 months ago

There doesn't seem to be any errors in the logs. Although I can see in the energy dashboard that all previous gas values were using the 'gas current consumption' and 'gas current cost' entities but they no longer exist in the gas device. Only previous consumption entities. Unless I have to wait a set period of time for them to populate??

BottlecapDave commented 9 months ago

The entities will be added upon initialisation based on what OE tells the integration. It will miss any entities that don't have an active tariff (based on OE data). If you don't see current entities but do see previous entities, then this implies OE have stated you don't have a home mini device registered against the gas meter.

As requested, please follow the FAQ and paste your diagnostic information here.

Also can you see current gas information from the Mini in the app?

DanDon commented 9 months ago
{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.2.2",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.1",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/London",
    "os_name": "Linux",
    "os_version": "6.1.74-haos",
    "supervisor": "2024.01.1",
    "host_os": "Home Assistant OS 11.5",
    "docker_version": "24.0.7",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "localtuya": {
      "version": "5.2.1",
      "requirements": []
    },
    "meross_lan": {
      "version": "4.5.3",
      "requirements": []
    },
    "smartthinq_sensors": {
      "version": "0.38.1",
      "requirements": [
        "pycountry<23.0.0,>=22.1.10",
        "xmltodict>=0.13.0",
        "charset_normalizer>=3.2.0"
      ]
    },
    "octopus_energy": {
      "version": "10.1.1",
      "requirements": []
    },
    "hpprinter": {
      "version": "1.0.12",
      "requirements": [
        "xmltodict==0.12.0"
      ]
    },
    "aarlo": {
      "version": "0.7.4.2",
      "requirements": [
        "unidecode",
        "cloudscraper>=1.2.71",
        "paho-mqtt"
      ]
    },
    "tesla_custom": {
      "version": "3.19.8",
      "requirements": [
        "teslajsonpy==3.9.10"
      ]
    },
    "badnest": {
      "version": "5.0.1",
      "requirements": [
        "simplejson>=3.17.2"
      ]
    },
    "hacs": {
      "version": "1.34.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "tapo": {
      "version": "2.13.0",
      "requirements": [
        "plugp100==4.0.3"
      ]
    },
    "battery_notes": {
      "version": "2.0.16",
      "requirements": []
    },
    "energy_meter": {
      "version": "1.1.0",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "octopus_energy",
    "name": "Octopus Energy",
    "codeowners": [
      "@bottlecapdave"
    ],
    "config_flow": true,
    "dependencies": [
      "repairs",
      "recorder"
    ],
    "documentation": "https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy",
    "homekit": {},
    "iot_class": "cloud_polling",
    "issue_tracker": "https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/issues",
    "ssdp": [],
    "version": "10.1.1",
    "zeroconf": [],
    "is_built_in": false
  },
  "data": {
    "id": "A-3C5BFE8D",
    "octoplus_enrolled": true,
    "electricity_meter_points": [
      {
        "mpan": "**REDACTED**",
        "meters": [
          {
            "serial_number": "**REDACTED**",
            "is_export": false,
            "is_smart_meter": true,
            "device_id": "**REDACTED**",
            "manufacturer": "1057 - Honeywell Elster",
            "model": "00000201",
            "firmware": "09024009"
          }
        ],
        "agreements": [
          {
            "start": "2023-08-04T23:00:00+00:00",
            "end": "2023-08-05T23:00:00+00:00",
            "tariff_code": "E-1R-VAR-22-11-01-J",
            "product_code": "VAR-22-11-01"
          },
          {
            "start": "2023-08-05T23:00:00+00:00",
            "end": null,
            "tariff_code": "E-1R-INTELLI-VAR-22-10-14-J",
            "product_code": "INTELLI-VAR-22-10-14"
          }
        ]
      }
    ],
    "gas_meter_points": [
      {
        "mprn": "**REDACTED**",
        "meters": [
          {
            "serial_number": "**REDACTED**",
            "consumption_units": "m\u00b3",
            "is_smart_meter": true,
            "device_id": null,
            "manufacturer": "BK-G4E",
            "model": null,
            "firmware": null
          }
        ],
        "agreements": [
          {
            "start": "2023-08-04T23:00:00+00:00",
            "end": null,
            "tariff_code": "G-1R-VAR-22-11-01-J",
            "product_code": "VAR-22-11-01"
          }
        ]
      }
    ]
  }
}

The live view has never worked in the app from the mini but the 'current' entities that have always been there until today and are the ones used in the energy dashboard are definitely missing now and weren't before?

3 2 1

BottlecapDave commented 9 months ago

The diagnostics you've posted state there is no octopus home mini associated with your gas meter, only with the electricity meter, which is why you're seeing what you're seeing. Unfortunately, you'll need to contact octopus energy in regards to this either via email or on their forums

github-actions[bot] commented 8 months ago

This issue has become stale because it has been open for 30 days with no activity. If you still think it's an issue, please respond soon.

github-actions[bot] commented 7 months ago

This issue has been closed because it has been inactive for 14 days since being marked as stale. This is done to help keep on top of active issues. If you still think it's an issue, please respond to this issue