dan-r / HomeAssistant-Ohme

Unofficial Home Assistant integration for interacting with Ohme EV chargers (EVSE) πŸš—βš‘οΈ
MIT License
45 stars 13 forks source link

Some sensors don't update on my Ohme Go (Commando) #39

Closed jerbzz closed 9 months ago

jerbzz commented 10 months ago

Describe the bug The Ohme is charging the car (according to it, to the car, the Ohme app, and the CT clamp I have on it). But, the sensor "Car Charging" does not update. The "Current Draw" remains at 0.1 A despite the charger drawing considerably more. "Power Draw" remains at 0 W and "Voltage" at 2 V.

The Charge Slot sensors update as expected.

To Reproduce Have an Ohme Go cable, install the integration with default settings, add the card to the dashboard, charge the car, observe sensors.

Expected behavior I would expect the sensors either to update, or to not exist.

Screenshots From the Ohme integration: image

Simultaneously from my own instrumentation: image

Home Assistant Version Core 2024.1.3

Integration Version v0.3.1

Additional context My charger is one of the older Ohme cables as opposed to a Home Pro or ePod. Its firmware version is v1.27_202208221. In the Ohme app, the Max Charge Current, CT Clamp Reading, Load Balancing Active, and Load Limit always show blank values.

The Controls section appears to work - Approve Charge, Pause Charge, Max Charge etc all function as expected, as do the target percentage and time.

jerbzz commented 10 months ago

perhaps related here: https://github.com/dan-r/HomeAssistant-Ohme/issues/13

I think these sensors should just not exist for the Home/Go.

dan-r commented 10 months ago

These sensors are always a bit delayed - can you confirm you've left it 5/10 mins before checking?

If so, seems as if it could be a device issue. I believe @phiebs has the same charger and it works...

jerbzz commented 10 months ago

I'm sure I've left it long enough - here are screenshots of the sensor history of first my sensor based on measured current draw:

image

And second the integration sensor:

image

You mentioned in the issue I referenced that this is based on measured current draw from other integration sensors? I don't believe any Home/Go cables show current draw in the app.

However it definitely knows how much current (and power) it is drawing as it shows it on the local OLED display. Perhaps it's a hardware revision thing if other Home/Go users don't have this issue?

dan-r commented 10 months ago

None of the chargers show current/power draw in the app AFAIK (my Home Pro doesnt anyway), but it should still come in over the API. Do you have any info of the hardware revision of your charger?

jerbzz commented 10 months ago

I don't but I'll see if I can find anything when I get home. It's a pretty early one. Does the API say anything about the hardware anywhere?

dan-r commented 10 months ago

Not that I can see - looks like its only the firmware version.

phiebs commented 10 months ago

I have the same Ohme Go (Commando) and I can see these values: image image One point to note is that the voltage only seems to have a value while the car is actively charging, however. I'm on firmware V1.32_202307131 if that helps diagnose anything?

jerbzz commented 10 months ago

Didn't know there was newer firmware. I'll ask Ohme to update it and see if that makes any difference!

phiebs commented 10 months ago

Just to clarify, I get readings for all values except for the CT Reading (as the Ohme Go doesn't have an external CT connection). Everything else either updates as expected or in the case of voltage, only while the car is plugged in.

dan-r commented 9 months ago

@jerbzz did you get anywhere with this?

jerbzz commented 9 months ago

I've requested a firmware update but not heard anything back yet... I'll chase them in the week πŸ‘πŸ»

jerbzz commented 9 months ago

"Is it a commando cable?"

"Yes"

"We wont be able to remotely upgrade the firmware in that case, too risky, can only be done in the warehouse"

"Why is it too risky?"

"There is a risk of power loss."

🀷

phiebs commented 9 months ago

Strange as they clearly did mine remotely, and I've never even asked them to do anything firmware wise since I got it (and I got it about 4 ish years ago)...

dan-r commented 9 months ago

That's very strange, I count 6 seperate switches I could use to cause 'power loss' to my Ohme charger! 🀣 As @phiebs says I'd expect that to all be automatic anyway.

@jerbzz would you mind enabling debug logging and sending them over, just as a sanity check to make sure nothing weird is going on

jerbzz commented 9 months ago

I have a personal contact at Ohme and I've reached out to them to ask if it can be done anyway.

@dan-r I'll do that. How long a set of logs do you need, and what events should I do in that time?

[edit]

I do know they don't routinely push firmware updates to all devices - it's often by request only - they are quite conservative with the risk of accidentally remotely bricking something!!

dan-r commented 9 months ago

@dan-r I'll do that. How long a set of logs do you need, and what events should I do in that time?

Assuming you charge overnight, I'd just turn on debug logging before you plug in and turn them off when you wake up. When you disable debug logging it should give you a .zip filtered to the Ohme integration

jon798 commented 9 months ago

I have the commando cable on firmware V1.32_202307131 and am seeing the same stopping of sensor updates. If I reload the integration it shows current values, and it picked up the start of a charging session at 5am yesterday (that should have started at 23:45, but the Smart #1 is not playing nicely with Ohme), but the car has definitely not been charging at 30.3A for 25 hours! I'll turn on the debug logging before I next plug the car in and see if that helps capture anything.

jon798 commented 9 months ago

Logfile from this morning attached. Car started charging at 5am, wasn't showing in HA (all sensors 0). Reloaded the integration, enabled debug logging about 05:40. Sensors populated in HA, showing charging at 2.3A (which was probably about right as it was only topping up a few %). Left the house at 06:30 (in a different car), the car had stopped charging but was still plugged in. Checked from work about 09:30 - charger still showing as charging at 2.3A. Reloaded integration, sensors updated to correct values. Disabled debug logging (attached here).

home-assistant_ohme_2024-01-26T09-37-08.640Z.log

dan-r commented 9 months ago

Interesting - do you have any automations set up? From the 'Already running' messages it looks like something is getting stuck, but that could be the integration

jon798 commented 9 months ago

Yes - I have automations that are triggered by state changes of most of the Ohme sensors that wait a couple of seconds and then publish the state change out via MQTT (as my main home automation is HomeSeer).

dan-r commented 9 months ago

Okay - I'll put out an update that has a timeout on the HTTP requests incase it's getting stuck on that, and some more logging. I can't see why it's not updating from your logs, nothing obvious.

dan-r commented 9 months ago

@jon798 mind trying out v0.4.3-beta.1 for your next charge? Could you also make sure your Home Assistant is up to date (from the last few months). I'm on 2024.01 for reference.

jon798 commented 9 months ago

I'm on 2024.1.5 (I tend to take the latest releases as it's not my core system). Specifically v0.4.3-beta.1? Or beta.2?

dan-r commented 9 months ago

beta.2 has the changes for this plus for #47, so doesn't harm to use that

jon798 commented 9 months ago

Will test with debug logging enabled today/tomorrow, with just plugging in/unplugging if nothing else. What would you expect in terms of latency between an action and it showing up in HA sensors?

jon798 commented 9 months ago

Plugged in car about 6pm. Ohme schedule notification came through to my phone advising charge would start at 23:00. Remembered to enable debug logging and reloaded plugin about 19:45 Charge completed successfully (first time ever with the Smart #1). But no sensors updated. It looks as though the integration just stops after being loaded and getting first round of data from Ohme. I reloaded the integration twice around 07:15 (to see if it would pick up the accumulated power use, but it didn't), then disabled debug logging.

Log attached here, but not sure it will give you much. home-assistant_ohme_2024-01-28T07-13-55.638Z.log

dan-r commented 9 months ago

@jon798 can you check that 'Enable polling for updates.' is enabled under system settings for the integration?

Screenshot 2024-01-28 at 13 39 57 Screenshot 2024-01-28 at 13 40 12
jon798 commented 9 months ago

It was unchecked, now checked. Sorry I'd not seen the option there, somehow...

dan-r commented 9 months ago

No worries - I've been there. I hate how buried the setting is. Makes more sense to be more visible IMO.

@jerbzz have you checked this?

jerbzz commented 9 months ago

Hi Dan - sorry - been a bit busy!

I can confirm that Poll for Updates is on and has not been off.

I've now had a firmware update on the Ohme but I haven't yet checked whether that's changed the behaviour. I'll get back to you...

jerbzz commented 9 months ago

So it appears that the latest firmware has fixed this 😁 Sorry for the noise!!

dan-r commented 9 months ago

No worries, glad it's working for you now!