dan-r/HomeAssistant-Ohme

Incorrect Next Charge Slot End value

gb095666 opened this issue · 15 comments

After I plugged my car in yesterday I received the following charge slots

00:00-00:30
01:15-02:00
02:30-05:57

During the charging periods the Start and End slot gave the following figures

Next Charge Slot Start
Value Valid from Valid to
00:00 23:51:07 00:00:07
01:15 00:00:07 01:15:07
02:30 01:35:37 02:30:07
Unknown 02:30:07

Next Charge Slot End
Value Valid from Valid to
00:30 23:51:07 00:30:07
02:00 00:30:07 02:00:07
05:57 02:00:07 05:20:07
08:37 05:20:07 07:05:07
10:33 07:05:07 08:50:07
12:29 08:50:07 10:35:07
14:25 10:35:07 12:20:07
16:21 12:20:07 12:59:37
Unknown 12:59:37

As you can see the Start slot correctly changed to unknown at 2:30 due to no other slot being offered by Octopus.

However the End Slot should have changed to unknown after 05:57, but it didn't change until I unplugged my car at 12:59:37

I am sure this has worked in the past, but I don't charge my car up every day so can be sure when/if this has stopped working correctly

Ohme ePod [v2.12]
Ohme V0.5.1

Is that on the latest stable release?

I believe so.

The version I have installed is v0.5.1

I've made some changes to that area in the latest beta (v0.5.2-beta.4), so might be worth trying that. I'm going to charge tonight so will see if I can replicate on the beta anyway.

ok, I don't need to charge mine tonight, but will definitely need to tomorrow night, so will await your test result tonight and upgrade and test tomorrow.

Thanks for your help.

So from my charge last night it looks like everything is working as I'd expect. As a sanity check, does all of this appear how you'd expect it to?
If so, might be worth trying the latest beta and trying to recreate it?

Slots: 23:00-00:00, 00:15-00:30, 01:00-04:59

Sensor states:
Screenshot 2024-02-05 at 11 25 40

Yes, that's what I would expect.

I will test tonight and let you know.

I’ll test this as well as my car is on charge

Slots: 23:00-00:15, 00:30-02:00, 02:15-02:57

This is working for me on the latest beta

Hi, no, unfortunately it didn't work again for me last night, the last slot was supposed to finish at 05:55 and the "Next Charge Slot End" displayed that time until 05:00:12 when it updated to 07:59 then at 06:45:12 it updated it to 09:55, it just seems to get adding a couple of hours to the variable each time.

However, I am not sure if I screwed up the installation of the beta version, I thought the correct way to install it is to download the latest beta and follow the Manual install instructions then reboot HA, but after doing that I got the following error, so it may not have been a correct test.

Logger: homeassistant.helpers.integration_platform
Source: helpers/integration_platform.py:50
First occurred: 5 February 2024 at 13:02:26 (7 occurrences)
Last logged: 5 February 2024 at 17:02:19

Unexpected error importing ohme/logbook.py
Unexpected error importing ohme/diagnostics.py
Unexpected error importing ohme/recorder.py
Unexpected error importing ohme/hardware.py
Unexpected error importing ohme/energy.py

If the new version is working for yourself and other people I suggest you put it live, I will reinstall mine from scratch and retest tonight, rather than waste time trying to debug my setup.

@gb095666 if you're using HACS, the easiest way to install the beta is to follow these instructions:
https://hacs.xyz/docs/faq/beta/

Ahh, slightly embarrassed face.. I am using HACS, didn't even think to look to see if there was a way to do it using HACS.

Thanks for the link.

No worries - its hidden away somwhere you wouldnt know to look :)

I've promoted the current dev changes as version v0.6.0, so you should be able to just update to that as normal now. I'll leave this issue open though to see if you have can recreate the problem with the latest changes.

I have updated to v0.6,0 now and will test again tonight and report back.

I am still getting the following error message when I reboot HA though, could it be a problem with my setup ?

Logger: homeassistant.helpers.integration_platform
Source: helpers/integration_platform.py:50
First occurred: 12:11:57 (6 occurrences)
Last logged: 12:15:56

Unexpected error importing ohme/logbook.py
Unexpected error importing ohme/system_health.py
Unexpected error importing ohme/diagnostics.py
Unexpected error importing ohme/recorder.py
Unexpected error importing ohme/hardware.py
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/integration_platform.py", line 50, in _async_process_single_integration_platform_component
platform = integration.get_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 842, in get_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 859, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.ohme_backup.media_source'

Just letting you know that last night was successful, the End time slot was correctly updated

Glad its all working for you now. I'll close down this issue but please open another one if you see this behaviour again