Brandawg93 / homebridge-fordpass

Control your Ford vehicle in HomeKit using Homebridge.
GNU General Public License v3.0
61 stars 15 forks source link

[Feature Request]: EV charging control #204

Open Mebbz opened 1 year ago

Mebbz commented 1 year ago

Enhancement of issue

My charging box at home lacks any smart charging integrations, and with the last year's surge in electricity prices I would love to create my own smart charging automation through Homekit.

I already have a plugin which shows me the current and relative electricity price (https://github.com/robinjhector/homebridge-tibber-price#readme), but I need a way to start and stop the charging.

Solution

A trigger to start and stop vehicle charging, like an outlet or a switch. It could also be convenient with an accessory telling me the battery percentage (i.e. in the form of a humidity sensor showing 0%-100%).

I only want my custom smart charging automation to trigger when the car is at home or at a specific location to avoid it unintentionally triggering when I'm fast charging or emergency charging. Thus, a location function with be very useful, like triggering an occupancy sensor if the car is at a certain location. Fordpass already has a feature to set custom charging rules for preset locations, so maybe it's possible to reuse parts of that functionality somehow?

Alternatives

I don't really have an alternative smart charging solution. Now I have to check electricity prices every day and adjust the "preferred charge time" in Fordpass manually to try to avoid peak hours.

The alternative to a location trigger would be to link my automation to a dummy switch (https://plugins.hoobs.org/plugin/homebridge-dummy) in Homekit which I manually turn on or off to indicate if the vehicle is at home. That's an acceptable solution to me, so if you need to prioritize, I would vastly prefer the start/stop charging functionality.

Additional Context

If there's anything I can provide to help with this in form of logs or testing or similar, please let me know. I'm not familiar with programming, but I'm good at following instructions ;) The car in question is a 2021 Mustang Mach-E, but I'm guessing this would work similarly across different Ford EV/Hybrids?

julienpmorand commented 9 months ago

If it's of any help, I did something similar to that with a smart plug and a shortcut. I only use the charger that came with the car on the 120V AC, though. The Meross smart plugs handle the 15 amps just fine. On top of that, you can use the sensitivity sensors; one triggers when the plug is connected to the car (powered or not), and the other triggers when the car is done charging. For me the use case was that I didn't want someone else to use my outdoor plug, so I just wanted it to be off if the car is not charging, but I can very well see an automation that switches the smart plug on at specific times.