mbillow / ha-chargepoint

Home Assistant ChargePoint EV Charger Integration
MIT License
44 stars 6 forks source link

Monitor public chargers? #31

Open dheera opened 10 months ago

dheera commented 10 months ago

For those of us that live in apartment complexes with a few shared chargers, any possibility of being able to monitor these chargers to know if there is one available?

mbillow commented 9 months ago

It’s definitely possible. I’m not sure there is a user friendly way of getting the charger IDs that would be needed to set this up, though.

The only way I’ve been able to find them in the past is to MITM the app as it’s making API requests. I guess we could take map coordinates and use the map search API. We’d need to support that API in the Python ChargePoint library though.

Is this something you’re interested in working on or just a feature request?

dheera commented 9 months ago

Might be interested if it fits into the existing framework. The other thing I imagine is the public chargers probably don't need any credentials?

dheera commented 9 months ago

2023-09-22_03-32 I think the charger IDs can be gotten from the website by clicking on a charger and looking at the URL.

mbillow commented 9 months ago

Might be interested if it fits into the existing framework.

Yah, if we can just tell people to get the charger IDs from the web URL, then it would just need to be a change to the config flow to allow users to provide a list of charger IDs to monitor and then adding the individual binary_sensor entities for each charger.

The other thing I imagine is the public chargers probably don't need any credentials?

Yah, this would make the config flow a bit more complex on our end, but we could ask if they have a home charger or public charger only available via ChargePoint Connections. Then only conditionally collect credentials.

I think the charger IDs can be gotten from the website by clicking on a charger and looking at the URL.

This is awesome, good find. If you end up making the changes, please include this in the documentation.

MoFa85 commented 2 months ago

Hi there, just found this great HA integration and was hoping it's able to display the public chargers, too... Maybe there's an easier way by polling the favorities in HA? I've marked a couple of public charge points as favorities. Can you feth that data from the account. This way the authentication method would be kept as is and any charge points that you're interested in just have to be setup within the account :-)