Ohme car charger integration

@phiebs interesting. Do you see much of a delay for the cars API to detect the car is charging? I have just checked the Mazda integration and it was a delay of 5 minutes from the car actually starting to charge to the HA entity showing the car is charging. The Mazda app/API also sadly doesnt show the rate of charge, there is just a switch to say charging or not lol. I can precondition the car via Mazda API, or report usual stats (milage, battery level, tire pressure etc) but cant set charge by. If I turn the switch on for charging then technically I get the boost charge functionality.

Because of the lack of Ohme integration I ended up throwing together some automations and entities so I can set the start time, end time etc for 4 slots (I just need to copy/paste to add more slots). When I get the Ohme notification with the times of charging I update these slots accordingly. Obviously it doesnt take into account any deviation from Octopus if they change the slots dynamically. Automation then kicks the utility meter into cheap rate and back out during the appropriate times (although I guess I could automate that based on the Mazda charging status)

Hi, I use a Shelly EM with a CT clamp on the live wire for the Ohme charger, so HA can instantly see when itā€™s charging, and at what rate.

I use this to control my home batteries, to prevent them draining into the car and to top them up when power is cheap, select tariff in utility meter etc.

3 Likes

Can you say a bit more about how you do this? I have a Ohme plug in charger and was thinking of doing something similar, how have you linked the CT to HA and how do you stop your batteries being used to charge the car?

In need of control of my OHME non api car . Just need pause and resume.

Was looking for an integration after getting my Ohme charger installed, and as there wasnā€™t anything Iā€™ve started work on one:

Currently it only fetches a few bits of data but Iā€™m planning to add more to it soon.

Might be a bit rough around the edges (itā€™s my first integration!) but Iā€™d appreciate any feedback and/or ideas for extra sensors.

Dan

4 Likes

Amazing - just set it up and worked first time! Now if there were some way to grab the slots given to it by Intelligent Octopus Go it would be a gamechanger! Happy to help test/debug etc but super well done for getting this far!

1 Like

Glad it worked for you!

Iā€™ve always found the intelligent dispatching a bit hit and miss and never seem to know when itā€™s working properly (and at what rate Iā€™m getting billed)ā€¦

There isnā€™t any ā€œintelligent slotsā€ API endpoint I can see but there is an array of ā€˜graph pointsā€™ that are used to plot the charge graph on the Ohme app Home Screen. I havenā€™t looked in to it enough, but it might be possible to work the slots out from that. Of course only after youā€™ve plugged a car in.

1 Like

@phiebs Iā€™ve had some luck adding in a ā€œNext Smart Charge Slotā€ sensor to this integration, would you mind testing it out? It does some rather inelegant calculations from the returned ā€˜graph pointsā€™ and seems to be accurate from my (very limited) testing. Its just looking for the start of a ā€˜riseā€™ in the graph which occurs after the current time.

You may need to remove/re-add the integration after updating, its changed quite a bit recentlyā€¦

1 Like

I see! Have updated and can now see the ā€œNext Smart Charge Slotā€ and appears to match whatā€™s on the (terrible!) Ohme graph. Didnā€™t have to remove/re-add, just update it and gave it a reload for the craic.
This is seriously awesome as it allows me to add in the prediction of smart slots to the house loads (battery and other high load devices)ā€¦ Not that we have many of them at the moment but want to take advantage!
I donā€™t suppose thereā€™s anything on the Ohme API that allows for ā€œUnlockā€ of the charger? I have mine set to ask for approval, mostly so I can see the schedules (as they are just a notification that once dismissed, is impossible to find other than the Ohme graph) however now that could be done in HA thanks to your great work.
Please let me know if thereā€™s anything else youā€™d like me to test out/help with!

Excellent news, might be worth keeping an eye on the slots and how they change as the charge progresses.

It looks relatively straightforward to add toggles to map to the 3 (at least on my Home Pro) ā€˜charger settingsā€™ - approve plug-ins, lock charger buttons, sleep when inactive. Iā€™ll add them in for now and then investigate adding an ā€˜approveā€™ button.

My initial idea for ā€˜approvingā€™ is to essentially abstract it and display it as a paused charge to the user, so ā€˜approvingā€™ is just ā€˜unpausingā€™, but Iā€™d appreciate your input :slight_smile:

I will do, we only have a PHEV so small battery = small amount of charge slots, and with it being the period between xmas and NY, not much driving! I will keep an eye on it though.
Oh yes of course, those buttons would be great to have - not often that I mess with the approve/lock/sleep but nice to have it in HA.
Yes thatā€™s a good idea on the ā€œapprovingā€, not sure how this will work with the plan Iā€™m on (Octopus Intelligent Go) but I can certainly give it a try and report back. Figuring that an automation that triggers on connect/disconnect on the car, sets the charge to paused, and then a notification to devices with a ā€œstart chargeā€ action which would then un-pause the charge. Just have to see how that plays with the IO plan Iā€™m on and when the notification of times comes in (although I suppose that can be obtained from the schedules in your integration and somehow diplayed as slots, e.g. 12:00-12:30, 13:00-14:00 etc).

1 Like

Great work with the integration. Seems to be working well.
It always pays to have ā€˜Approve each pluginā€™ turned on in the Ohme app so that you can catch it when the charger isnā€™t talking to Ohme, especially when on IOG so that you can catch a charge occurring that isnā€™t a smart charge. This functionality should be in the API somewhere

Thanks both for your testing!

@Townsmcp Iā€™ve just released an update (v0.1.7) which exposes the settings from that page as switches. I didnā€™t realise the options differed between models but Iā€™ve used some ā€˜capabilitiesā€™ returned by the API to only register the switches that are supported. Iā€™ve also added a sensor and button for pending/approve charge.
Would you be able to test it with yours to make sure ā€œlock buttonsā€ doesnā€™t appear as a switch, and that the approve charge button functions?

Thanks,
Dan

1 Like

Afraid my unit (one of the earlier ones) doesnā€™t have any buttons nor any ā€œLock buttonsā€ switch. However everything else is coming in nicely. The ā€œSleep when inactiveā€ and ā€œRequire approvalā€ toggles do indeed work!

It appears that when I plug the car in, the ā€œcar connectedā€ switches state, then Ohme sends me the approval request on their app (would be great to get this in HA if at all possible) and only once I approve it does anything show in the ā€œNext Smart Charge Slotā€. And then only once actively charging does the ā€œCar Chargingā€/ā€œCurrent Power Drawā€ activate. This is great because I know what state the charger is in, in HA. E.g. if plugged in but I forget to approve, then the ā€œNext Smart Charge Slotā€ will be ā€œUnknownā€ and I can trigger a reminder.

The killer part would be a button press in HA to ā€œApproveā€ in Ohme, because then I could still have the benefit of knowing itā€™s all working as expected but the additional ability to approve elsewhere (a zigbee button perhaps).

EDIT: I just saw thereā€™s a new version with the approve in - will check that now and report back!

1 Like

See below screenshots but it works an absolute charm! This is a real gamechanger for me (especially with the acceptance factor of my wife!)
Now I will make an automation that accepts when we are at home automatically and hopefully never have to interact with the Ohme app again!




All looks how Iā€™d expect it to. The ā€˜Lock buttonsā€™ switch not showing is what should happen for your model, so it looks like the capability detection is working.

The ā€˜Pending Approvalā€™ sensor should activate, but as theres no way for me to get a ā€˜pushā€™ from Ohme, it might take a minute or so to update until it polls again, but for using with an automation that shouldnā€™t matter too much (I did approval with the button so you can ā€˜approveā€™ before the state updates if you were doing it manually).

For now this does everything I need it to, but Iā€™m open to adding new functionality if you or anyone else has any suggestions. Let me know here or open an issue on GitHub :slight_smile:

Hi Dan, agree with all of that and understand the push/pull issue. I have another way of detecting connection (via the car) so I suppose if I wanted to make it as quick as possible I could write an automation to check if the car is at home and plugged in, and then push the approve button. But for the few minutes it may take Iā€™m not sure itā€™s worth doing.

Serioiusly well done on this, it provides all of the capability I need (and Iā€™m sure many others). The only bit missing would be to have all of the charge slots listed in an array, as that should come from Octopus but doesnā€™t when using Ohme chargers. Not sure how worth that is doing tbh as so long as the Ohme isnā€™t set to a bump charge then itā€™s quite easy to figure when the cheap rates kick in. In my case I charge a house battery, for those without one it could be useful to know if you can get through a washer/dryer cycle for example.

1 Like

I donā€™t want to be the downer in all this but just be prepared to have Ohme getting in touch if you use this. From personal experience (TerraVolt) they are monitoring this kind of thing. All the best though if you pull it off!

2 Likes

Definitely a possibility, and I did come across your site when I was researching for this.

From my point of view, its the only smart device I own that I canā€™t interact with in some way using Home Assistant.

This is mainly an attempt to avoid the buyers remorse of having an EVSE dependant on a locked down cloud service :slight_smile:

1 Like